Downloads · 30 days
97
43% of all-time downloads
amalia-llm/CAMOES-whisper-asr
CAMOES-whisper-asr is a automatic speech recognition model from amalia-llm. Use it when you need speech turned into text. It is set up for transformers.
Fine-tuned Whisper large-v3 model for European Portuguese automatic speech recognition using CAMOES (Capitalized, Punctuated and Pós-Acordo).
Downloads · 30 days
97
43% of all-time downloads
All-time downloads
224
Public
Parameters
1.5B
6.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
Fine-tuned Whisper large-v3 model for European Portuguese automatic speech recognition using CAMOES (Capitalized, Punctuated and Pós-Acordo).
pip install -U torch transformers accelerate soundfile
import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
model_id = "amalia-llm/CAMOES-whisper-asr"
# Use the base Whisper large-v3 processor.
# This is needed because the fine-tuned model repo may not include processor files.
processor_id = "openai/whisper-large-v3"
device = 0 if torch.cuda.is_available() else -1
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
processor = AutoProcessor.from_pretrained(processor_id)
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id,
torch_dtype=torch_dtype,
low_cpu_mem_usage=True,
use_safetensors=True,
)
if torch.cuda.is_available():
model.to("cuda")
forced_decoder_ids = processor.get_decoder_prompt_ids(
language="portuguese",
task="transcribe",
)
asr = pipeline(
task="automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
generate_kwargs={
"forced_decoder_ids": forced_decoder_ids,
"num_beams": 1,
},
)
result = asr("audio.wav")
print(result["text"])
This model is intended for:
BibTeX:
@inproceedings{camoes,
title={{CAMÕES: A Comprehensive Automatic Speech Recognition Benchmark for European Portuguese}},
author={Carlos Carvalho, Francisco Teixeira, Catarina Botelho, Anna Pompili, Rubén Solera-Ureña, Sérgio Paulo, Mariana Julião, Thomas Rolland, John Mendonça, Diogo Pereira, Isabel Trancoso, Alberto Abad},
booktitle={Proceedings of the IEEE Automatic Speech Recognition and Understanding Workshop (ASRU)},
year={2025},
}