Usage
Cohere Transcribe Arabic is supported natively in transformers. This is the recommended way to use the model for
offline inference. For online inference, see the vLLM integration example below.
pip install transformers>=5.4.0 torch huggingface_hub soundfile librosa sentencepiece protobuf accelerate
Quick Start 🤗
Transcribe any audio file in a few lines:
from transformers import AutoProcessor, CohereAsrForConditionalGeneration
from transformers.audio_utils import load_audio
from huggingface_hub import hf_hub_download
processor = AutoProcessor.from_pretrained("CohereLabs/cohere-transcribe-arabic-07-2026")
model = CohereAsrForConditionalGeneration.from_pretrained("CohereLabs/cohere-transcribe-arabic-07-2026", device_map="auto")
audio_file = "your_audio.wav"
audio = load_audio(audio_file, sampling_rate=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", language="ar")
inputs.to(model.device, dtype=model.dtype)
outputs = model.generate(**inputs, max_new_tokens=256)
text = processor.decode(outputs, skip_special_tokens=True)
print(text)
For audio longer than the feature extractor's max_audio_clip_s, the feature extractor automatically splits the waveform into chunks.
The processor reassembles the per-chunk transcriptions using the returned audio_chunk_index.
from transformers import AutoProcessor, CohereAsrForConditionalGeneration
import time
processor = AutoProcessor.from_pretrained("CohereLabs/cohere-transcribe-arabic-07-2026")
model = CohereAsrForConditionalGeneration.from_pretrained("CohereLabs/cohere-transcribe-arabic-07-2026", device_map="auto")
audio = load_audio("your_long_audio.wav", sampling_rate=16000)
sr = 16000
duration_s = len(audio) / sr
print(f"Audio duration: {duration_s / 60:.1f} minutes")
inputs = processor(audio=audio, sampling_rate=sr, return_tensors="pt", language="ar")
audio_chunk_index = inputs.get("audio_chunk_index")
inputs.to(model.device, dtype=model.dtype)
start = time.time()
outputs = model.generate(**inputs, max_new_tokens=256)
text = processor.decode(outputs, skip_special_tokens=True, audio_chunk_index=audio_chunk_index, language="ar")[0]
elapsed = time.time() - start
rtfx = duration_s / elapsed
print(f"Transcribed in {elapsed:.1f}s — RTFx: {rtfx:.1f}")
print(text)
The model also supports English. Specify language="en":
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", language="en")
inputs.to(model.device, dtype=model.dtype)
outputs = model.generate(**inputs, max_new_tokens=256)
text = processor.decode(outputs, skip_special_tokens=True)
print(text)
vLLM Integration
For production serving we recommend running via vLLM following the instructions below.
First install vLLM (refer to vLLM installation instructions):
uv venv --python 3.12 --seed
source .venv/bin/activate
uv pip install -U vllm==0.19.0 --torch-backend=auto
uv pip install vllm[audio]
uv pip install librosa
Start vLLM server
vllm serve CohereLabs/cohere-transcribe-arabic-07-2026 --trust-remote-code
Send request
curl -v -X POST http://localhost:8000/v1/audio/transcriptions \
-H "Authorization: Bearer $VLLM_API_KEY" \
-F "file=@$(realpath ${AUDIO_PATH})" \
-F "model=CohereLabs/cohere-transcribe-arabic-07-2026"
Results
Link to the live leaderboard: Open Universal Arabic ASR Leaderboard.
Resources
For more details and results:
Strengths and Limitations
Strengths
Cohere Transcribe Arabic demonstrates strong transcription accuracy for Arabic and English. As a dedicated speech recognition model, it benefits from efficient inference via the Conformer encoder-decoder architecture.
Limitations
-
Single language. The model performs best when remaining in-distribution of a single, pre-specified language. It does not feature explicit, automatic language detection and exhibits inconsistent performance on code-switched audio.
-
Timestamps/Speaker diarization. The model does not feature either of these.
-
Silence. Like most AED speech models, Cohere Transcibe Arabic is eager to transcribe, even non-speech sounds. The model benefits from prepending a noise gate or VAD (voice activity detection) model in order to prevent low-volume, floor noise from turning into hallucinations.
For errors or additional questions about details in this model card, contact labs@cohere.com or raise an issue.
Terms of Use:
We hope that the release of this model will make community-based research efforts into Arabic speech more accessible. This model is governed by an Apache 2.0 license.