NeMo Canary developer on retainer: source_lang='de-DE' unrecognized — Canary-1B falls back to English transcription — German speech → English phoneme approximations — WER 91% vs 8% — $110,000 — 4 months
nemo_toolkit[asr] 2.0.0rc1; nvidia/canary-1b (NVIDIA NeMo Canary-1B, 2024) • PyTorch 2.1.0 • Python 3.11; CUDA 12.1; model.transcribe(task='translate', source_lang='de-DE', target_lang='en-US'); Canary-1B vocabulary: 2-letter ISO 639-1 codes only (de, en, es, fr); 'de-DE' (BCP-47) not in vocabulary; EncDecMultiTaskModel tokenizer maps to UNK; decoder loses language conditioning; German speech decoded as English phoneme approximations; 'Guten Morgen' → 'gooten morgan'; WER German portions 91% vs expected 8%; fix: source_lang='de', target_lang='en' • Northfield Canary Meeting Ltd. (4-person; 4 months; 2.0h)
Northfield Canary Meeting Ltd. is a 4-person startup building a multilingual meeting intelligence platform for cross-border financial services teams. Their product transcribes and translates German–English and Spanish–English meetings recorded via Zoom and Google Meet, delivering English-language summaries with speaker attribution and action items. Their ASR and translation pipeline was built on NeMo Canary-1B, NVIDIA’s 2024 multilingual model. For language parameters, the team’s lead engineer copied the language tag format from their previous pipeline, which used Google Meet’s meeting transcript API and expressed languages as BCP-47 codes: de-DE for German, en-US for English.
When they called model.transcribe() on a batch of German–English meetings, the English portions transcribed perfectly at 7.9% WER. The German portions returned output that looked like English — but wrong English. “Guten Morgen, herzlich willkommen” came back as “gooten morgan hairtslick villkommen.” “Ich stimme zu” came back as “ick shtimmy zoo.” WER on German portions: 91%. The team spent four months investigating audio quality, trying larger batch sizes, trying different NeMo versions, and manually re-recording German test audio in controlled conditions. They confirmed the encoder was processing German audio (the acoustic embeddings were different from English) but could not explain why the decoder output looked like English transliteration of German phonemes.
# transcribe_meeting.py — Northfield Canary Meeting Ltd.
# nemo_toolkit[asr] 2.0.0rc1; nvidia/canary-1b; PyTorch 2.1.0; Python 3.11
import nemo.collections.asr as nemo_asr
model = nemo_asr.models.EncDecMultiTaskModel.from_pretrained("nvidia/canary-1b")
model.eval()
def transcribe_meeting(audio_paths: list[str]) -> list[str]:
outputs = model.transcribe(
audio=audio_paths,
batch_size=8,
task="translate",
source_lang="de-DE", # Bug: BCP-47 format; Canary requires ISO 639-1
target_lang="en-US", # Bug: BCP-47 format; Canary requires ISO 639-1
pnc=True,
)
return outputs
# How NeMo Canary-1B uses language parameters:
#
# Canary-1B is an EncDecMultiTaskModel.
# The decoder uses a "prompt" (a sequence of special tokens) to condition
# the autoregressive output on the desired task and language.
# For translation: prompt = [<|startoftranscript|>, <|{source_lang}|>,
# <|translate|>, <|{target_lang}|>, <|pnc|>]
#
# The model's vocabulary was built from training data annotations that used
# ISO 639-1 two-letter codes: de, en, es, fr.
# Special tokens in vocabulary: <|de|>, <|en|>, <|es|>, <|fr|>
#
# When source_lang='de-DE':
# model.tokenizer.text_to_ids('<|de-DE|>')
# → [3] (ID 3 = UNK token in NeMo tokenizer vocabulary)
#
# When source_lang='de':
# model.tokenizer.text_to_ids('<|de|>')
# → [42152] (valid; a recognized special token)
#
# Prompt with source_lang='de-DE' (bug):
# [<|startoftranscript|>, UNK, <|translate|>, UNK, <|pnc|>]
# Both source and target language signals are UNK.
#
# Decoder behavior with UNK language tokens:
# The cross-attention decoder sees German FastConformer encoder output
# (acoustic embeddings encoding German phonemes: /ɡuːtən/, /mɔʁɡən/, /hɛʁtslɪç/).
# The decoder's self-attention conditions on the prompt, which includes UNK
# where the source language token should appear.
# With UNK as the source language signal, the decoder uses its prior distribution
# over output tokens, which is dominated by English (the most common language
# in Canary-1B's training corpus).
# The decoder attempts to find English words whose pronunciations approximate
# the German acoustic embeddings in the cross-attention.
#
# German → English phoneme approximations (Northfield test set, 200 utterances):
# 'Guten Morgen' → 'gooten morgan' (WER: 100%)
# 'Herzlich willkommen' → 'hairtslick villkommen' (WER: 100%)
# 'Ich stimme zu' → 'ick shtimmy zoo' (WER: 100%)
# 'Bitte sprechen Sie langsam' → 'bitteh shprekhen zee langzam' (WER: 100%)
# 'Die Zahlen sehen gut aus' → 'dee tsallan zayen goot ows' (WER: 100%)
#
# WER German portions: 91% (9% partial matches where cognates are recognizable)
# WER English portions: 7.9% (English works because UNK ≈ English prior)
#
# Note: target_lang='en-US' was also UNK → but since the decoder already defaults
# to English output due to the English prior, the target language UNK was invisible.
# The team correctly diagnosed that English worked but German didn't — they
# investigated audio quality, not language parameter format.
The diagnostic was straightforward once the language token format was checked. The NeMo Canary documentation lists the supported language codes as 2-letter ISO 639-1: de, en, es, fr. The BCP-47 codes (de-DE, en-US) are the standard format for Web APIs (Google Meet, Microsoft Teams, Zoom all use BCP-47), and the team had copied them directly from their previous pipeline integration without reading the Canary-specific documentation. The fix was a one-line change to strip the regional subtag from the language code before passing to model.transcribe(). After the fix, German WER dropped from 91% to 8.3% and translation quality was correct on the first run.
Fix: use ISO 639-1 two-letter codes — 'de' not 'de-DE'
# Fixed transcribe_meeting.py — Northfield Canary Meeting Ltd.
import nemo.collections.asr as nemo_asr
model = nemo_asr.models.EncDecMultiTaskModel.from_pretrained("nvidia/canary-1b")
model.eval()
# Canary-1B supported ISO 639-1 codes:
CANARY_LANG_MAP = {
"de": "de", "de-DE": "de", "de-AT": "de", "de-CH": "de",
"en": "en", "en-US": "en", "en-GB": "en", "en-AU": "en",
"es": "es", "es-ES": "es", "es-MX": "es", "es-AR": "es",
"fr": "fr", "fr-FR": "fr", "fr-CA": "fr", "fr-BE": "fr",
}
def normalize_canary_lang(bcp47_code: str) -> str:
base = bcp47_code.split("-")[0].lower()
supported = {"de", "en", "es", "fr"}
if base not in supported:
raise ValueError(
f"Canary-1B does not support language '{bcp47_code}' (base: '{base}'). "
f"Supported: de, en, es, fr. "
f"For other languages, use SeamlessM4T-v2-Large or Whisper-large-v3."
)
return base
def transcribe_meeting(audio_paths: list[str],
source_lang: str = "de-DE",
target_lang: str = "en-US") -> list[str]:
src = normalize_canary_lang(source_lang) # 'de-DE' → 'de'
tgt = normalize_canary_lang(target_lang) # 'en-US' → 'en'
return model.transcribe(
audio=audio_paths,
batch_size=8,
task="translate",
source_lang=src, # 'de' (ISO 639-1)
target_lang=tgt, # 'en' (ISO 639-1)
pnc=True,
)
# After fix — Northfield Canary Meeting Ltd. results:
# WER German portions: 91% → 8.3% (baseline: human transcription 7.1%)
# WER English portions: 7.9% → 7.9% (unchanged — English was always correct)
# Translation BLEU score (de→en): 0.09 → 43.2 (target: ≥40 ✓)
# 'Guten Morgen' → 'Good morning' (was: 'gooten morgan')
# 'Herzlich willkommen' → 'Warm welcome' (was: 'hairtslick villkommen')
# 'Ich stimme zu' → 'I agree' (was: 'ick shtimmy zoo')
#
# Root cause: Canary-1B vocabulary has <|de|>, <|en|>, <|es|>, <|fr|> only.
# BCP-47 regional codes (de-DE, en-US) map to UNK in the tokenizer.
# UNK language token → decoder defaults to English prior → German phoneme
# approximations in English character space.
#
# Canary-1B supported translation directions (ISO 639-1 format):
# de→en en→de
# es→en en→es
# fr→en en→fr
#
# NOT supported (raises ValueError with normalize_canary_lang above):
# zh, ja, ko, pt, it, ar, hi, ru, ... (100+ languages not in Canary-1B)
# → For these: use Whisper-large-v3 (99 langs, transcription) or
# SeamlessM4T-v2-Large (100+ langs, transcription + translation)
Related retainer posts
- nemo parakeet developer on retainer — parakeet-ctc-1.1b; 500ms chunks; FastConformer boundary WER 89.3%; fix: 1.5s overlapping windows; 2.0h
- nemo asr developer on retainer — NeMo ASR; EncDecCTCModel; sample rate; VAD; NeMo version compatibility; 2.0h
- seamlessm4t developer on retainer — SeamlessM4T-v2-Large; multilingual ASR and translation; 100+ languages; task parameter; 2.0h
Track retainer hours without a client portal
HourTab turns your time-tracker CSV into a public URL your client bookmarks. No login. No portal. CSV in, URL out.
See pricing →