Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto to model/beam size to whisper #3859

Merged

Conversation

synesthesiam
Copy link
Contributor

@synesthesiam synesthesiam commented Dec 10, 2024

Bump wyoming-faster-whisper to 2.4.0: rhasspy/wyoming-faster-whisper@v2.3.0...v2.4.0

Adds auto for model and beam size (0), which are set as the new defaults.
These will select different models/beam sizes depending on the platform.

Summary by CodeRabbit

  • New Features

    • Updated default model selection to auto, optimizing performance based on device architecture.
    • Introduced a new auto option for model selection in the configuration.
    • Expanded the list of available models to enhance adaptability.
  • Bug Fixes

    • Adjusted default beam_size configuration for improved decoding performance.
  • Documentation

    • Updated documentation to reflect changes in model selection and configuration options.
    • Added new version entry for 2.4.0 in the changelog, highlighting recent enhancements.
  • Chores

    • Version updated to 2.4.0 across various configuration files.

Copy link
Contributor

coderabbitai bot commented Dec 10, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request involve updates to the Whisper add-on's documentation and configuration files. The default model selection has been modified to auto, which adapts based on the device architecture. The default beam_size has been set to 0, allowing for dynamic adjustments. Additionally, the version number has been updated across relevant files from 2.3.x to 2.4.0. These modifications enhance the adaptability and usability of the Whisper add-on across different hardware configurations.

Changes

File Change Summary
whisper/DOCS.md - Updated default model from tiny-int8 to auto.
- Changed default beam_size from unspecified to 0.
- Expanded list of available models to include auto.
whisper/build.yaml - Updated WYOMING_WHISPER_VERSION from 2.3.0 to 2.4.0.
whisper/config.yaml - Updated version from 2.3.1 to 2.4.0.
- Changed model from tiny-int8 to auto.
- Updated beam_size from 1 to 0.
- Expanded schema for model to include auto.
whisper/CHANGELOG.md - Added entry for version 2.4.0 detailing new features.
- Updated entry for version 2.3.1 regarding model list order.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WhisperAddOn
    participant Configuration

    User->>WhisperAddOn: Request model selection
    WhisperAddOn->>Configuration: Check default model
    Configuration-->>WhisperAddOn: Return model (auto)
    WhisperAddOn->>User: Provide selected model (auto)
    
    User->>WhisperAddOn: Request beam size
    WhisperAddOn->>Configuration: Check default beam size
    Configuration-->>WhisperAddOn: Return beam size (0)
    WhisperAddOn->>User: Provide selected beam size (0)
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
whisper/DOCS.md (1)

74-74: Fix typo in beam size documentation.

There's a small typo in the sentence.

-The default value of `0` will automatically select `1` of ARM devices like the Raspberry Pi 4 and `5` otherwise.
+The default value of `0` will automatically select `1` for ARM devices like the Raspberry Pi 4 and `5` otherwise.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 324751d and 7783006.

📒 Files selected for processing (3)
  • whisper/DOCS.md (2 hunks)
  • whisper/build.yaml (1 hunks)
  • whisper/config.yaml (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • whisper/build.yaml
🧰 Additional context used
📓 Path-based instructions (2)
whisper/DOCS.md (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

whisper/config.yaml (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (4)
whisper/config.yaml (3)

2-2: LGTM: Version update matches PR objective.

Version updated to 2.4.0 as intended.


16-18: LGTM: Default values updated for auto-selection.

The new defaults enable automatic selection based on device architecture:

  • model: auto - selects between tiny-int8 and base-int8
  • beam_size: 0 - selects between 1 and 5

22-22: LGTM: Model schema updated to include auto option.

The schema has been properly updated to include the new auto option while maintaining all existing model choices.

whisper/DOCS.md (1)

39-44: LGTM: Clear documentation of auto model selection.

The documentation clearly explains the auto-selection behavior and provides good context about model types and their trade-offs.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you adjust the changelog as well?

Thanks! 👍

../Frenck

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft December 11, 2024 07:52
@synesthesiam synesthesiam marked this pull request as ready for review December 11, 2024 15:05
@home-assistant home-assistant bot requested a review from frenck December 11, 2024 15:05
@synesthesiam
Copy link
Contributor Author

@frenck Changelog updated

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
whisper/CHANGELOG.md (1)

5-5: Enhance the change description with specific default values.

While the description captures the key changes, it would be more helpful to explicitly mention the new default values and their behavior.

-Add "auto" for model and beam size (0) to select values based on CPU
+Add "auto" as default model (tiny-int8 for ARM, base-int8 for others) and beam size (0) for CPU-based optimization
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7783006 and b0c6a0f.

📒 Files selected for processing (1)
  • whisper/CHANGELOG.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
whisper/CHANGELOG.md (6)

Pattern */**(html|markdown|md): - For instructional content in documentation, use a direct and authoritative tone. Avoid expressions of politeness such as 'may' or 'please', and ensure the goal of the instruction is fronted.

  • Apply the Microsoft Style Guide to ensure documentation maintains clarity and conciseness.
  • In step-by-step instructions, front the location phrase in the instructional sentence.
  • In step-by-step instructions, front the 'goal' in the instructional sentence.
  • In step-by-step instructions, if in doubt what to front, front the 'goal' before the location phrase in the instructional sentence.
  • do not hyphenate terms like 'top-right' or 'bottom-left' with 'corner'

Pattern */**(html|markdown|md): - Use bold to mark UI strings.

  • If "" are used to mark UI strings, replace them by bold.

Pattern */**(html|markdown|md): - Be brief in your replies and don't add fluff like "thank you for..." and "Please let me know if"


Pattern */**(html|markdown|md): - Use sentence-style capitalization also in headings.


Pattern */**(html|markdown|md): do not comment on HTML used for icons


Pattern */**(html|markdown|md): Avoid flagging inline HTML for embedding videos in future reviews for this repository.

🔇 Additional comments (1)
whisper/CHANGELOG.md (1)

3-4: LGTM!

Version entry follows the established format and correctly reflects the version update.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @synesthesiam 👍

../Frenck

@frenck frenck merged commit 7901ba4 into home-assistant:master Dec 11, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants