How to get text with timestamp?

#1
by InYourmemOry - opened

My code:
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
max_new_tokens=128,
chunk_length_s=30,
batch_size=16,
return_timestamps=True,
torch_dtype=torch_dtype,
device=device,
)

sample = 'd:\VedioProcess\test.mp3'

result = pipe(sample)

However, I can't get correct timestamp

Hello, may I ask if you have solved it?

BELLE-2 Group // Be Everyone's Large Language model Engine org

I didn't open timestamp mode during fine-tuning, so the timestamp accuracy maybe influenced

Sign up or log in to comment