prj-beatrice/japanese-hubert-base-phoneme-ctc-v4, a Japanese phoneme recogniser, converted to ONNX for the browser: a 63 MB download.
f5fe07043bcb0b77a86faf72ac6d8fc1ae558f99 of the source model.The source model is rinna/japanese-hubert-base, fine-tuned by prj-beatrice on ReazonSpeech for CTC phoneme recognition with pyopenjtalk's phonemes. See the source model card for training details.
The model needs some silence around a lone syllable: on a clip trimmed tight to the sound, it can hear nothing. 150 ms either side is enough.
The vocabulary is OpenJTalk's phonemes (a i u e o N cl, k s sh ch ts j, ky ny hy …), with
PAD (id 0) as the CTC blank. The input isn't normalised (do_normalize: false).
import { AutoFeatureExtractor, AutoModelForCTC } from '@huggingface/transformers';
const id = 'air-air/japanese-hubert-base-phoneme-ctc-v4-ONNX';
const extractor = await AutoFeatureExtractor.from_pretrained(id);
const model = await AutoModelForCTC.from_pretrained(id, { dtype: 'q4' });
const { logits } = await model(await extractor(audio)); // audio: Float32Array, 16 kHz mono
Apache License 2.0, as the source model is released (see LICENSE). The source model was trained
on ReazonSpeech, whose data is licensed for the purposes of Japanese Copyright Act Article 30-4.
Reazon releases its own models trained on it under Apache 2.0.
prj-beatrice/japanese-hubert-base-phoneme-ctc-v4