Automatic Speech Recognition
Transformers
Safetensors
DiCoW
speech
whisper
multilingual
speaker-diarization
meeting-transcription
target-speaker-asr
BUT-FIT
custom_code
Instructions to use BUT-FIT/DiCoW_v3_3_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BUT-FIT/DiCoW_v3_3_large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="BUT-FIT/DiCoW_v3_3_large", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSpeechSeq2Seq model = AutoModelForSpeechSeq2Seq.from_pretrained("BUT-FIT/DiCoW_v3_3_large", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download utils.py from BUT-FIT/DiCoW_v3_3_large: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/BUT-FIT/DiCoW_v3_3_large/resolve/main/utils.py
- Command line
-
hf download hf://BUT-FIT/DiCoW_v3_3_large/utils.py
-
curl -L -o utils.py https://huggingface.co/BUT-FIT/DiCoW_v3_3_large/resolve/main/utils.py
540 Bytes
| import torch | |
| from transformers import WhisperTimeStampLogitsProcessor | |
| class WhisperTimeStampLogitsProcessorCustom(WhisperTimeStampLogitsProcessor): | |
| def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor: | |
| scores_processed = super().__call__(input_ids, scores) | |
| # Enable to early exit from silence via eos token | |
| if input_ids.shape[1] == self.begin_index: | |
| scores_processed[:, self.eos_token_id] = scores[:, self.eos_token_id] | |
| return scores_processed | |