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

Helping Whisper get certain words right #9358

Open
garcia-98 opened this issue Feb 13, 2025 · 3 comments
Open

Helping Whisper get certain words right #9358

garcia-98 opened this issue Feb 13, 2025 · 3 comments

Comments

@garcia-98
Copy link

Hi, guys! I just wanted to know if there is any possibility of feeding Whisper inside Subtitle Edit with a list of terms/names of people that might be on the video for example so it recognizes them better.

Right now I realize that it gets certain names wrong in many different ways, so it is hard to find a pattern.

Have a great day!

@darnn
Copy link

darnn commented Feb 13, 2025

Generally speaking, the first thing I'd try is using the --initial_prompt argument with a sentence containing all the terms you expect to encounter.

In vanilla Whisper, there's also this:
--carry_initial_prompt CARRY_INITIAL_PROMPT
if True, prepend initial_prompt to every internal decode() call. May
reduce the effectiveness of condition_on_previous_text (default: False)

And in Faster-Whisper-XXL (which I recommend), there's this:

--reprompt {0,1,2} (experimental) 0) Disabled. 1) Inserts initial_prompt after the prompt resets. 2) Ensures that
initial_prompt is present in prompt for all windows/chunks. Note: auto-disabled if
initial_prompt=None. It's similar to 'hotwords' feature. (default: 2)

But this is mostly hypothetical for me since I prefer to just let it do whatever it does and fix it later using search and replace, since it's more consistent that way (and I have different multiple replace groups for different types of content).

@Purfview
Copy link
Contributor

Purfview commented Feb 15, 2025

I would recommend not to touch "--initial_prompt" and use "--hotwords" for that.

@darnn
Copy link

darnn commented Feb 16, 2025

I thought there was something like that, but it's not in the help text...

fw.txt

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

No branches or pull requests

3 participants