Skip to content

No condition on text & load models from external directory#118

Open
peymvn wants to merge 2 commits into
m1guelpf:mainfrom
peymvn:no-condition-on-text
Open

No condition on text & load models from external directory#118
peymvn wants to merge 2 commits into
m1guelpf:mainfrom
peymvn:no-condition-on-text

Conversation

@peymvn

@peymvn peymvn commented Aug 17, 2025

Copy link
Copy Markdown

I made two minor changes:

  1. Added an option for condition_on_previous_text with the default value set to False. I noticed that Whisper often gets confused when conditioned on previous text, especially during scenes with unusual background sounds (e.g., crowd noise, overlapping speech, etc.), particularly when the language is not English. In these cases, even a quick moment of a confusing sound can generate nonsense that ruins the next 30 seconds.

  2. Added model_weights_root to avoid re-downloading the large checkpoints. I already have them stored elsewhere, so this is convenient for my setup and people like me.

@what-the-diff

what-the-diff Bot commented Aug 17, 2025

Copy link
Copy Markdown

PR Summary

  • Inclusion of .vscode/ directory in .gitignore
    We've updated the .gitignore file to hide settings specific to the personal Visual Studio Code IDE, which helps maintain a clean codebase and avoid unnecessary version control changes.

  • Introduction of new command-line arguments in cli.py

    • --model_weights_root: Allows users to specify the base directory for storing the model's weight files, affording flexibility and improved organization.
    • --condition_on_previous_text: Enables the model to condition its output on previous text, facilitating continuity and coherence in the model's output.
  • Use of model_weights_root for model loading
    The PR modifies the line of code that loads our Whisper model, which now takes advantage of the model_weights_root parameter, reinforcing the use of specified directories for model weight storage.

  • Update to subtitle retrieval process
    The subtitle retrieval process now involves the condition_on_previous_text parameter. This change helps to improve the relevance of transcriptions provided by our service, as they can now take into consideration prior textual context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant