Whisper-medium for Huzhou dialect (湖州话)
Speech recognition for Huzhou dialect, a Wu Chinese dialect spoken in Huzhou, Zhejiang. Output is written in Mandarin (simplified) characters.
Standard speech recognition, Whisper included, is built for Mandarin and Cantonese and fails on regional dialects like this one. The project started because my grandmother mainly speaks Huzhou dialect.
This is v2 (November 2026). It starts from WenetSpeech-Wu's Whisper-medium-Wu, a Whisper-medium already trained
on about 8,000 hours of Wu Chinese. It was then fine-tuned on Huzhou news broadcasts plus recordings of ordinary
people. The original 2024 model (v1, news only, from plain Whisper-medium) is still here: load it with
revision="v1".
- Try it: huzhou-asr.com, or run the demo yourself: github.com/BillWang7/whisper-huzhou-asr
- Data: BillWang7/huzhou-dialect-speech
Results
Two scores on held-out test sets. All three models are decoded identically: language="zh", task="transcribe",
and Whisper's temperature fallback with compression_ratio_threshold=1.35 to stop repetition loops.
Character error rate (CER, lower is better): the share of characters that are wrong, averaged over clips (punctuation ignored).
| Test set | Clips | openai/whisper-medium (baseline) | v1 (2024) | v2 (this model) |
|---|---|---|---|---|
| News broadcasts (same channel as training) | 1,705 | 98.8% | 26.7% | 22.6% (95% CI 21.5–23.7%) |
| Real speakers (everyday sentences, mostly phone recordings), held-out sessions | 385 | 93.5% | 52.9% | 33.2% (95% CI 31.1–35.5%) |
BLEU (0–100, higher is better): how many runs of 1–4 characters match the reference (corpus BLEU, sacrebleu's
zh tokenizer). Writing Huzhou speech in Mandarin is close to translation, and BLEU is the usual score for speech
translation. It gives partial credit, so a reworded sentence loses less than under CER.
For scale, in translation research about 30 is understandable, 40–50 good and above 60 very good.
| Test set | baseline | v1 (2024) | v2 (this model) |
|---|---|---|---|
| News broadcasts | 3.6 | 63.0 | 68.6 |
| Real speakers, held-out sessions | 4.0 | 31.2 | 52.0 |
- Which real-speaker clips count: v2 trained on some of the real-speaker recording sessions. Every model is therefore compared on the 17 sessions (385 clips) that v2 never saw. Some of those sessions come from people who also recorded training sessions. v2 does just as well on the voices it never heard (experiment write-up).
- What CER doesn't show: it counts changed characters, not wrong sentences. Huzhou dialect has no standard written form, so a correct sentence in different Mandarin words still counts as errors. For example, 他们未必等得了半年 → 他们不一定等得了半年 (both "they may not be able to wait half a year") scores 33%. Short sentences are also penalised more. How often the meaning is fully kept hasn't been measured.
Per-clip outputs, the scoring code and a full technical report are on GitHub.
Example (held-out real-speaker clip, a phone recording):
| Transcript | |
|---|---|
| Reference | 爸今天刚有点胃口想吃点东西 ("Dad's appetite has only just come back today; he'd like to eat something") |
| v2 | 爸今天刚有点胃口想吃点东西 |
| v1 | 拜金到钢油店回客想吃点东西 (roughly "worship money, to the steel-oil shop, returning guest… wants to eat something": only the end is right) |
| Baseline | 把煎做光油的微可想其的东西 |
Usage
import torch, torchaudio
from transformers import WhisperProcessor, WhisperForConditionalGeneration
repo = "BillWang7/whisper-medium-ch-hz" # add revision="v1" to both calls for the 2024 model
processor = WhisperProcessor.from_pretrained(repo)
model = WhisperForConditionalGeneration.from_pretrained(repo).eval()
audio, sr = torchaudio.load("clip.mp3")
audio = torchaudio.functional.resample(audio, sr, 16000).mean(dim=0)
inputs = processor(audio.numpy(), sampling_rate=16000, return_tensors="pt", return_attention_mask=True)
with torch.inference_mode():
ids = model.generate(inputs.input_features, attention_mask=inputs.attention_mask,
language="zh", task="transcribe",
# retry with a little randomness if the output starts looping
temperature=(0.0, 0.2, 0.4, 0.6, 0.8, 1.0), compression_ratio_threshold=1.35)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
Works best on clips under 30 seconds (Whisper's input window).
Training (v2)
- Starting model: Whisper-medium-Wu from
WenetSpeech-Wu (file
whisper/whisper-medium.pt, Apache-2.0). It's whisper-medium trained on Wu Chinese, published in WeNet format. It was converted to Hugging Face format (training/convert_wenet.py). As a check, it scores 15.4% CER on 500 clips of their Wu benchmark; the paper reports 14.33% on all of it. - Data:
- 14,854 news clips from the dataset's
trainsplit. The other 500 were held out for choosing the checkpoint. - 365 real-speaker clips from the training recording sessions. They make up 15% of each epoch.
- 14,854 news clips from the dataset's
- Recipe:
- 4 epochs (2,185 steps), effective batch 32, learning rate 1e-5 with 300 warm-up steps;
- bfloat16, SpecAugment, dropout 0.1, seed 0.
- Code:
training/on GitHub.
- Checkpoint selection:
- The model was scored every 500 steps on a separate dev set (500 news clips plus 69 real-speaker clips from 3 more sessions).
- The best was at step 1,500 (2.7 epochs).
- Neither test set was used for any choice. v1, by contrast, had its checkpoint chosen on the news test split.
- Hardware: one NVIDIA L4 GPU (AWS), 4 h 16 min of training.
- Files:
v2/args.json: every setting;v2/log.jsonl: dev scores during training;v2/evaluation_*.csv: per-clip test outputs.- v1's 2024 notebooks and logs are in
v1/(and unchanged at tagv1).
Known Limitations
- Numbers: they're sometimes written in Chinese characters (九十四 instead of 94), a habit kept from the starting model. CER counts this as errors even when the number is right.
- Other Wu dialects: v2 does better than its starting model on Shanghai and Suzhou speech, but there it still writes Wu words (侬, 勿…) in about a quarter of outputs. On Huzhou speech this is rare.
- Small real-speaker test: 385 clips from 17 sessions and about 10 voices, so treat that number as approximate.
- Mostly news: 98% of the training clips are news broadcasts from one channel. Conversation, noisy rooms and older speakers are largely untested.
- Clip length: training clips are under 15 seconds, so long recordings should be cut into sentences first.
Credits
- WenetSpeech-Wu (ASLP Lab, Northwestern Polytechnical University): the starting model, Apache-2.0. Paper (arXiv 2601.11027).
- OpenAI Whisper: the original model.