transcribe abstract method

Future<String> transcribe(
  1. Uint8List pcm16kMono, {
  2. String? language,
})

Transcribe 16 kHz mono 16-bit little-endian PCM. Batch (fixed-window) for now; streaming is a follow-on.

language selects the OUTPUT language for this call (Whisper only): a bare lowercase code such as 'en', 'de', 'uk', any of Whisper's 99. null uses the recognizer's current default.

Whisper's shipped checkpoints are multilingual (no .en suffix), so this changes what the model WRITES, not what it understands. Measured on one German clip, same audio and build, one token apart:

'en' -> " This weather is very beautiful and the sun is shining."
'de' -> " Das Wetter ist heute sehr schön und die Sonne scheint."

So asking for the wrong language does not garble the output — it TRANSLATES, fluently and without error, which is why a value that silently failed to take effect was worth treating as a bug (#500).

Cheap by construction: the decoder's seed prompt is rebuilt per call, so switching language costs a map lookup and never reloads the model. Throws ArgumentError for a code this checkpoint's tokenizer does not have, and for any language on a model whose prompt has no language slot (moonshine, parakeet) — it is never silently ignored.

Implementation

Future<String> transcribe(Uint8List pcm16kMono, {String? language});