Problems with timestamps

#2
by jalberth - opened

I can't get return_timestamps=True to save the transcription with timestamps. I'm using the simple code from the model card and saving the res variable as JSON.

pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
return_timestamps=True,
)

I tried with a short audio.mp3, so I had to decrease chunk_length_s to 10 in the call to pipe to get it to work.

Perfect, now I got it to work. I wrongly put the argument in the generate_kwargs.

thx for the clarification.

Sign up or log in to comment