Views
No views yet
| File | Size |
|---|---|
| added_tokens.json | 0.0 MB |
| tokenizer_config.json | 0.3 MB |
| special_tokens_map.json | 0.0 MB |
| normalizer.json | 0.1 MB |
| preprocessor_config.json | 0.0 MB |
| config.json | 0.0 MB |
| vocab.json | 1.0 MB |
| vocabulary.json | 1.0 MB |
| model.bin | 2944.3 MB |
| merges.txt | 0.5 MB |
pip install faster-whisper1from faster_whisper import WhisperModel
2
3# Load the model
4model = WhisperModel("2snem6/fastr-whisper-large-v3-edacc-commonvoice-l2arctic-v3")
5
6# Transcribe audio
7segments, info = model.transcribe("audio.wav")
8
9print(f"Detected language: {info.language} (probability: {info.language_probability:.2f})")
10
11for segment in segments:
12 print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")1# With custom parameters
2segments, info = model.transcribe(
3 "audio.wav",
4 beam_size=5,
5 language="en", # Force English
6 condition_on_previous_text=False,
7 temperature=0.0
8)
9
10# Batch processing
11audio_files = ["file1.wav", "file2.wav", "file3.wav"]
12for audio_file in audio_files:
13 segments, info = model.transcribe(audio_file)
14 # Process segments...1# If you've downloaded the model locally
2model = WhisperModel("/path/to/downloaded/model")| Metric | Standard Transformers | FastWhisper (CT2) | Improvement |
|---|---|---|---|
| Speed | 1x | 2-4x | 2-4x faster |
| Memory | 1x | 0.5-0.8x | 20-50% less |
| Model Size | 1x | 0.5-0.8x | 20-50% smaller |
ct2-transformers-converter tool:1ct2-transformers-converter \
2 --model 2snem6/whisper-large-v3-edacc-commonvoice-l2arctic-v3 \
3 --output_dir fastr-whisper-large-v3-edacc-commonvoice-l2arctic-v3 \
4 --quantization float16 \
5 --copy_files tokenizer.json preprocessor_config.json1@misc{radford2022whisper,
2 title={Robust Speech Recognition via Large-Scale Weak Supervision},
3 author={Alec Radford and Jong Wook Kim and Tao Xu and Greg Brockman and Christine McLeavey and Ilya Sutskever},
4 year={2022},
5 eprint={2212.04356},
6 archivePrefix={arXiv},
7 primaryClass={eess.AS}
8}1@misc{ctranslate2,
2 title={CTranslate2: Fast inference with Transformers and OpenNMT models},
3 author={Guillaume Klein},
4 year={2020},
5 url={https://github.com/OpenNMT/CTranslate2}
6}