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

how to finetune whisper model with 'initial_prompt' #1712

Open
v-yunbin opened this issue May 6, 2024 · 4 comments
Open

how to finetune whisper model with 'initial_prompt' #1712

v-yunbin opened this issue May 6, 2024 · 4 comments

Comments

@v-yunbin
Copy link

v-yunbin commented May 6, 2024

when use 'initial_prompt', the decoding result of finetuning with my data on whisper model v2 is bad, on the contrary, the result is good.
however, when use 'initial_prompt' the decoding result of based whisper model v2 is also good, so it means If want to use 'initial_prompt' during decoding , must add it when training?

@BenjaminBossan
Copy link
Member

Sorry, I don't understand your issue. Could you please explain it in more detail, what you want to achieve and how? Ideally show the code that leads to good or bad results.

@v-yunbin
Copy link
Author

v-yunbin commented May 6, 2024

HI, Now, whisper can use context information to improve recognition accuracy:
And, if you want pass context information to whisper, you can use arg for cli:
https://github.com/openai/whisper/blob/main/whisper/transcribe.py#L531
parser.add_argument("--initial_prompt", type=str, default=None, help="optional text to provide as a prompt for the first window.")
when finetune the whisper model, not use "--initial_prompt", decoding result of finetuned model with using "--initial_prompt" will be worse.

@BenjaminBossan
Copy link
Member

I see. I don't really have any expertise in whisper and how the initial prompt affects the outcome. But my best guess is that yes, if you want to use it, you should also use it during training, using the same logic as in the script that you linked.

Copy link

github-actions bot commented Jun 5, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

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

2 participants