Make Whisper to Recognise Names #400
Answered
by
jianfch
felipehertzer
asked this question in
Q&A
-
Hello, I would like to inquire whether it is possible to make whisper to transcribe names correctly, some sort of vocabulary input, or other technique. Thanks. I'm using Hugging Face model. |
Beta Was this translation helpful? Give feedback.
Answered by
jianfch
Sep 19, 2024
Replies: 1 comment 1 reply
-
Lets say the model transcribes "Emily" but you want it to be model = stable_whisper.load_hf_whisper('base')
prompt_ids = model._pipe.tokenizer.get_prompt_ids('Emilie', return_tensors="pt").to(model._pipe.model.device)
result = model.transcribe('audio.wav', prompt_ids=prompt_ids) If the prompt shows up at the beginning of the transcription (huggingface/transformers#27836), updating |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
felipehertzer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lets say the model transcribes "Emily" but you want it to be
'Emilie'
, you can prompt it with'Emilie'
:If the prompt shows up at the beginning of the transcription (huggingface/transformers#27836), updating
transformers
should fix it.