Instructions to use BELLE-2/Belle-whisper-large-v3-zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BELLE-2/Belle-whisper-large-v3-zh with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="BELLE-2/Belle-whisper-large-v3-zh")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("BELLE-2/Belle-whisper-large-v3-zh") model = AutoModelForSpeechSeq2Seq.from_pretrained("BELLE-2/Belle-whisper-large-v3-zh", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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?
I didn't open timestamp mode during fine-tuning, so the timestamp accuracy maybe influenced