Languages
Whisper is one program for 99 languages. This chapter covers the three things that means in practice: it can guess the language, you can tell it the language, and it can translate to English as it transcribes.
The lab's test piece (transcript t04) was 30 seconds of Spanish — the opening of La Regenta, read for LibriVox.
Detection: let it guess
Give no language and Whisper examines up to the first 30 seconds and decides:
Detecting language using up to the first 30 seconds.
Use `--language` to specify the language
Detected language: Spanish
The result is written into every output;
in the JSON file it is the "language"
field — "es" for our clip. The guess
was right, and the base transcript is
good Spanish, with one systematic flaw:
accents quietly go missing ("Prologo"
for "Prólogo"). Proofread non-English
output with extra care; the words are
right more often than the spelling is
complete.
Model size matters much more here than
in English. The same clip through tiny
(chapter 8's run) came back garbled —
"Pero el logo de la regenta", "Libri
Box", mangled names. For languages other
than English, treat base as the floor,
not the ceiling.
--language: tell it instead
whisper clip.mp3 --language Spanish
(A code works too: --language es.)
Telling it the language skips detection —
which saves a little time, but matters
more for correctness: a short clip, a
clip that opens with music, or speech
that switches languages can mislead the
detector. If you know the language, say
so. The flag also decides the output
language of translation, next.
Translation: speech in, English out
whisper clip.mp3 --task translate
Whisper always translates into English — that is the only direction it knows. The lab's run on the Spanish clip produced this for the opening:
Prologue of La Regenta. This is a LibriVox
recording. All LibriVox recordings are in the
public domain...
Creditable — and rough at the edges, at
base size. "LibriVox" became
"libribox", and the closing sentence,
"Creo que fue Irland quien dijo que..."
("I think it was Irland who said
that..."), came out as "I think it was a
long time ago that I said okay." Small
models translate gist, not nuance. For
anything that will be published or acted
on, transcribe in the original language
and have the translation checked by a
human or a dedicated translation tool.
Two boundaries to remember:
- turbo cannot translate. It was not
trained for the task; use a
multilingual model (
base,small,medium,large) instead. - Quality varies by language — a lot. The project's paper charts word error rates per language, and the spread between the best- and worst-served languages is wide. The honest test is your own recording: transcribe a minute, compare it with what was said, then decide.
Check: the JSON "language" field
matches the language you hear, and on a
known-language clip, naming it with
--language gives output at least as
good as detection did.