Automatic Speech Recognition
Transformers
Safetensors
prosody_to_text
feature-extraction
prosody
speech-recognition
custom_code
Run this model with HF Jobs
Run Daporte/prosody2text-weights on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Daporte/prosody2text-weights. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Daporte/prosody2text-weights on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Daporte/prosody2text-weights with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Daporte/prosody2text-weights with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Daporte/prosody2text-weights", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Daporte/prosody2text-weights", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Filter the max_length warning by message, since unsetting it does not work
Browse filesgeneration_config.max_length is already None after load -- checked at
runtime -- so the previous commit's assignment changed nothing. Whisper's
generate() reconstructs max_length from config.max_target_positions (448)
internally, which is why the warned value is exactly 448 and why nothing on
this side can unset it. max_new_tokens takes precedence either way.
So filter that one message on the transformers logger instead of implying
the cause was fixed.
163 unmodified lines164165166167168169170171172173174175176177163 unmodified linesself.model.eval().to(self.device)self.mel_bins: int = self.model.config.num_mel_bins# The checkpoint's generation_config carries max_length=448, and# every call here passes max_new_tokens, which transformers warns# about once per generate(). Over a few thousand utterances that is a# few thousand lines burying the running WER. max_new_tokens wins# either way -- the warning says so -- so drop the field that is# being overridden rather than silence the warning and keep the# ambiguity.self.model.generation_config.max_length = None# The checkpoint carries no tokenizer of its own; it is the stock# whisper-medium one. Loading it from a local directory keeps first163 unmodified lines164165166167168169170171172173174175176177178179180181182183184185186187188189190191163 unmodified linesself.model.eval().to(self.device)self.mel_bins: int = self.model.config.num_mel_bins# Silence one warning, per process, by message.## Every call here passes max_new_tokens, and Whisper's generate()# fills max_length in from config.max_target_positions (448) on its# way through, so transformers reports them both set -- once per# utterance, which over a few thousand buries the running WER.## Clearing generation_config.max_length does not stop it: it is# already None after load (checked), because the value is# reconstructed inside generate() rather than read from the# checkpoint. Nothing on this side can unset it, and max_new_tokens# takes precedence regardless -- the warning says so itself. So drop# the record rather than pretend to fix the cause.import loggingclass _NoMaxLengthClash(logging.Filter):def filter(self, record: logging.LogRecord) -> bool:return "seem to have been set" not in record.getMessage()logging.getLogger("transformers.generation.utils").addFilter(_NoMaxLengthClash())# The checkpoint carries no tokenizer of its own; it is the stock# whisper-medium one. Loading it from a local directory keeps first
whisper_decoder.py+22-8