kaiwa-kana-ctc
A Japanese CTC model that writes what was pronounced, in hiragana: long vowels as ー,
は as わ, っ and ん as spoken. It was trained for Kaiwa,
a Japanese conversation trainer, to check mora lengths. It finds where a learner
shortens a long vowel or leaves out っ.
It is not a general speech recogniser. Its output has no kanji and no punctuation.
How Kaiwa uses it
Kaiwa knows the sentence the learner meant to say. It scores the meant kana and variants with one
error each (とうきょう → ときょう, きって → きて) under the model's CTC probabilities. When a
variant beats the meant kana by more than a threshold, Kaiwa reports it as a hint. thresholds.json
holds those thresholds and names the error kinds that are checked: long- (long vowel too short) and
q- (っ left out).
Files
| File | What |
|---|---|
model.safetensors, config.json, vocab.json, … | PyTorch weights for transformers (Wav2Vec2ForCTC) |
model.int8.onnx | ONNX, int8 for the matrix multiplications only (356 MB). Input samples (1 × n, float32, 16 kHz, normalised to zero mean and unit variance), output logits (1 × frames × vocab) |
thresholds.json | Thresholds per error kind, calibrated for ≤ 5 % false alarms on real voices |
Training
- Base:
reazon-research/japanese-wav2vec2-large(Apache-2.0), revision55969d37. - Data: Common Voice 19.0 Japanese (CC0), 49 h. It uses
train,devand theotherclips that got votes for and none against. Speakers of thetestsplit are left out, and so are 40 dev speakers. - Targets: the pronunciation of each sentence from OpenJTalk (pyopenjtalk), converted to hiragana. Sentences with digits or Latin letters are dropped.
- Steps: 7000 steps, CTC loss. Code:
spikes/s06-moren/finetune.pyin the Kaiwa repository.
Results
-
Character error rate against the OpenJTalk kana: 22.1 % on the 40 held-out speakers.
-
Mora check on real voices: 500 Common Voice
testspeakers. Shortenings are cut into their own recordings at pitch periods. The thresholds are calibrated on one half of the speakers and counted on the other.Errors checked Detected False alarms shortenings ( long-,q-)61.2 % (long vowel 59 %, っ64 %)4.8 % all kinds, lengthenings and inserted っincluded22.9 % 5.7 % When it detects an error, it names the right kind in 97 % of cases.
Limits:
- The errors are spliced into native speech, not made by learners.
- Common Voice is read speech from laptop and phone microphones.
- Lengthened vowels and inserted
っare hardly detected (under 18 %), so Kaiwa reports only shortenings. - Readings come from OpenJTalk. Where a sentence can be read in more than one way, the model was trained on OpenJTalk's choice.
Licence
Apache-2.0, like the base model. Common Voice is CC0.