0
$\begingroup$

I was able to generate text from an audio file using huggingface, using this code

transcriber = pipeline(
  "automatic-speech-recognition", 
  model="fsicoli/whisper-large-v3-pt-mzcv16"
)

transcriber.model.config.forced_decoder_ids = (
  transcriber.tokenizer.get_decoder_prompt_ids(
    language="pt", 
    task="transcribe"
  )
)

transcription = transcriber("half0.mp3")

Is there a way to output a vtt file? I get the transcription but not the timestamps

$\endgroup$

1 Answer 1

2
$\begingroup$

Have you looked at using the return_timestamps keyword? It seems you can also get the timestamps on either the word on text segment level (for the Whisper model at least).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.