tujia-ctc v0.4

Syllable-level speech recognition for Tujia with tone marks. Takes 16 kHz mono audio and returns a sequence of toned syllable labels with time spans, e.g. la35, tsΚ°i53, Ι•ie35.

  • Architecture: wav2vec2-xlsr-53-espeak-cv-ft (fine-tuned encoder, run v03f)
    • LayerNorm + 2Γ—BiLSTM(256) + a 932-class toneless syllable head and a 4-class tone head. The two heads are combined at each syllable's peak frame.
  • Labels: 932 toneless syllables + blank; tones are 21 / 35 / 53 / 55
  • Trainable parameters: ~4.69 M (head only, 19 MB); the fine-tuned encoder is distributed separately
  • Training data: an earlier third-party Tujia corpus plus field-survey recordings from northern and southern survey areas, 17,134 rows / 16.2 h in total
  • Best epoch: 34
  • Encoder: fine-tuned from facebook/wav2vec2-xlsr-53-espeak-cv-ft (Apache-2.0); v0.4 uses the same encoder as v0.3

What changed from v0.3

v0.3 v0.4
Output head one 1,198-class toned head 932-class toneless head + 4-class tone head
Training data third-party corpus only third-party corpus + field-survey recordings
Test syllable SER 0.7652 0.2132
Test tone SER 0.5616 0.2054
Test joint toned SER β€” 0.3543
Old-data validation SER 0.6490 0.5571

The 0.21 / 0.20 numbers are measured on an 840-clip field-survey test set (0.25 h, split by lexical item) that v0.3 was never trained on; v0.3 is shown on the same clips for reference. The speakers in the test set also appear in the training set, so this is not a speaker-held-out score.

Package contents

tujia-ctc-0.4/
β”œβ”€β”€ model/
β”‚   β”œβ”€β”€ tujia-ctc-v0.4.pt    head weights (includes vocab, head args, tones)
β”‚   β”œβ”€β”€ vocab.txt            933 toneless labels, one per line (blank is index 0)
β”‚   └── model_card.json      architecture, metrics, license
β”œβ”€β”€ infer.py                 standalone inference script
β”œβ”€β”€ fetch_encoder.sh         downloads the fine-tuned encoder (~1.26 GB)
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ SHA256SUMS
β”œβ”€β”€ MANIFEST.json
β”œβ”€β”€ NOTICE
└── LICENSE                  MIT (code only)

Quick start

pip install -r requirements.txt
./fetch_encoder.sh ./models            # Hugging Face by default
# mainland mirror: TUJIA_ENCODER_SOURCE=modelscope ./fetch_encoder.sh ./models
TUJIA_XLSR=./models/tujia-xlsr53-v03f python infer.py your_audio.wav

The encoder is hosted on Hugging Face (TujiaNLP/tujia-xlsr53-v03f) and mirrored on ModelScope under the same id. It is not bundled here because of its size.

Mainland China. Hugging Face is normally unreachable without a proxy. Two options:

TUJIA_ENCODER_SOURCE=modelscope ./fetch_encoder.sh ./models   # ModelScope mirror
HF_ENDPOINT=https://hf-mirror.com ./fetch_encoder.sh ./models # HF mirror

Output (one toned syllable per line):

    0.00     0.42  xei35       0.912
    0.66     1.04  tΚ°a21       0.884
    1.04     1.42  tΙ•Κ°i55     0.803

--json out.json writes structured output; --start / --duration decode a single span; --format ipa|ye changes the printed form.

Manual encoder setup (no fetch_encoder.sh)

--encoder and TUJIA_XLSR accept any directory containing a complete encoder (config.json plus weights). models/tujia-xlsr53-v03f is only the default that fetch_encoder.sh writes to, so an existing v0.3 encoder directory can be pointed at directly.

Input formats

16 kHz mono WAV is read directly. Other sample rates are resampled on the fly with torchaudio. Multi-channel input is mixed down to mono. Very short clips (< 8 encoder frames) return no syllables.

How the two heads are combined

Both heads run at 50 Hz. For every frame the tone head predicts one of {none, 55, 35, 21, 53}; the decoder ignores none, takes the four-way argmax, and assigns the tone at the frame where the syllable's main-head probability peaks. This keeps the syllable sequence and the tone sequence aligned even when the two heads disagree on length.

Limitations

  • Seen speakers. The test split is by lexical item, not by speaker; every test speaker also appears in training. A speaker-held-out score is not yet available and will be higher (worse) than 0.21.
  • Deletions on faint or fast speech. The model under-generates in low-energy regions; check the prob column and the syllable count when proofreading.
  • Unified inventory. The syllable table merges notation variants across survey areas. Rare dialect syllables outside the 932-label inventory cannot be emitted; they surface as the nearest label or as a deletion.
  • No language model. Output is greedy CTC; no lexicon or n-gram rescoring is applied here. The tujia-asr package adds optional lexicon decoding.

License and attribution

Code: MIT. Weights: research use only; no rights to the underlying recordings or transcripts are granted, and neither is distributed with this package. The encoder is a fine-tune of facebook/wav2vec2-xlsr-53-espeak-cv-ft (Apache-2.0) and must retain the upstream attribution. See NOTICE.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support