VITS JSUT (Japanese)

A single-speaker Japanese text-to-speech model: VITS trained from scratch for 250,000 steps on the JSUT 1.1 corpus (one native female speaker, 10.18 hours of read speech) with Coqui TTS. Output: 22,050 Hz mono.

The model reads katakana, not ordinary Japanese text. Its training transcripts were converted to their katakana pronunciation with pyopenjtalk, and the input text must go through the same conversion (to_kana below). Kanji and hiragana are not in the model's vocabulary: Coqui TTS drops them with a warning, and the output is wrong or empty.

Files

File Contents
model_last.pth Coqui TTS checkpoint at step 250,000: weights and optimizer state (training can be resumed from it)
config.json Coqui TTS VitsConfig of the run
code/kana.py text front end: Japanese text -> katakana, used for the training transcripts and for inference
code/prepare_jsut.py JSUT -> training list (kana conversion, filtering)
code/preprocess_open_bible_audio.py resampling of the training audio to 22,050 Hz mono
code/train_vits.py, code/train_Japanese.sh training script and the Slurm job that ran it

How to use

Install

pip install torch torchaudio "coqui-tts[codec]" "pyopenjtalk==0.4.1" huggingface_hub six

Tested from a clean install (Linux, Python 3.11) with coqui-tts 0.28.0, torch 2.15.0, torchaudio 2.11.1, torchcodec 1.0.0 and pyopenjtalk 0.4.1. coqui-tts is the maintained fork of Coqui TTS. Since version 0.27.4 it no longer installs PyTorch, and PyTorch 2.9+ needs torchcodec (the codec extra). six is listed because coqui-tts 0.28.0 imports it without declaring it. For a specific CUDA or CPU build of PyTorch, install it first with the official instructions. The model was trained with the original TTS==0.22.0, which runs the same code. pyopenjtalk builds from source, so it needs CMake and a C++ compiler, and its first call downloads the Open JTalk dictionary. Use pyopenjtalk 0.4.1, the version the training transcripts were converted with: forks such as pyopenjtalk-plus use other dictionaries and read some words differently.

Synthesize

import re
import unicodedata

import pyopenjtalk
import torch
from huggingface_hub import hf_hub_download
from TTS.utils.synthesizer import Synthesizer

# Text front end, the same as code/kana.py, which converted the training transcripts
PUNCT = {"、": ",", ",": ",", "。": ".", ".": ".", "?": "?", "!": "!", "…": ",", "―": ",", "—": ","}
KEEP = re.compile(r"[ァ-ヺー,.?!]")


def to_kana(text):  # Japanese text -> katakana as pronounced, with 、。?! written as , . ? !
    raw = "".join(PUNCT.get(ch, ch) for ch in pyopenjtalk.g2p(text, kana=True))
    unread = [ch for ch in raw if not KEEP.match(ch) and unicodedata.category(ch)[0] in "LN"]
    if unread:
        print(f"pyopenjtalk could not read {''.join(unread)}: skipped")
    return "".join(ch for ch in raw if KEEP.match(ch))


repo_id = "davidguzmanr/VITS-JSUT-Japanese"
synthesizer = Synthesizer(
    tts_checkpoint=hf_hub_download(repo_id, "model_last.pth"),
    tts_config_path=hf_hub_download(repo_id, "config.json"),
    use_cuda=torch.cuda.is_available(),
)

text = "吾輩は猫である。名前はまだ無い。"
kana = to_kana(text)  # ワガハイワネコデアル.ナマエワマダナイ.
torch.manual_seed(0)  # the duration predictor samples noise: fix the seed for repeatable output
wav = synthesizer.tts(text=kana, split_sentences=True)
synthesizer.save_wav(wav, "output.wav")  # 22,050 Hz mono

Speed: synthesizer.tts_model.length_scale = 1.2 makes speech slower (durations x 1.2), values below 1 faster. Different seeds give different rhythm and pauses. Inference uses inference_noise_scale 0.667 and inference_noise_scale_dp 1.0 from config.json.

The text front end

to_kana writes the text as it is pronounced, not as it is spelled:

Input Model input
吾輩は猫である。名前はまだ無い。 ワガハイワネコデアル.ナマエワマダナイ.
今日は2026年12月2日です。東京の天気は晴れ、気温は15度でしょう。 キョーワニセンニジューロクネンジューニガツフツカデス.トーキョーノテンキワハレ,キオンワジューゴドデショー.
NHKのニュースを見ましたか? エヌエイチケイノニュースヲミマシタカ?
  • Particles は and へ become ワ and エ, long vowels become ー, and numbers, dates and Latin letters are read out.
  • 、 。 ? ! become , . ? ! (… and dashes become ,). Japanese has no spaces, so these marks are the only phrase boundaries the model sees: keep them in the input.
  • Everything else is dropped: brackets, quotes, spaces, symbols, and any character pyopenjtalk cannot read (a rare kanji missing from its dictionary; to_kana prints it).
  • The readings come from the Open JTalk dictionary. Names, rare words and words with several readings can be misread. Check the katakana, and fix a reading by writing that part in katakana yourself: katakana passes through unchanged.
  • The model's vocabulary is 82 katakana symbols plus the punctuation !"'(),-.:;? (only , . ? ! occur in training): ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロワヲンヴー. Katakana carries no pitch accent; the model infers it from context and can get it wrong.

Training data

JSUT 1.1 (Sonobe, Takamichi and Saruwatari, 2017): 7,696 utterances (10.3 h) of one native Japanese female speaker reading Japanese sentences, recorded in an anechoic room at 48 kHz, in nine subsets (basic5000, utparaphrase512, onomatopee300, countersuffix26, loanword128, voiceactress100, travel1000, precedent130, repeat500). All nine were used. code/prepare_jsut.py converts every transcript with code/kana.py and keeps 7,661 utterances (10.18 h): it drops 4 longer than 15 s and 31 containing characters pyopenjtalk could not read (rare kanji, lone Latin letters). code/preprocess_open_bible_audio.py downmixes to mono and resamples to 22,050 Hz (torchaudio). There was no validation split: every kept utterance was used for training. The JSUT audio is not included here.

Training procedure

  • Coqui TTS 0.22.0 VITS with the recipe of the Open Bible VITS models (open-bible-models, VITS-TTS/), trained from scratch. The only change for Japanese is the input text: katakana instead of the original script (the recipe reads characters and has no phonemizer, and JSUT's kanji would give a vocabulary of 2,723 characters, half of them seen fewer than 10 times).
  • Character input (Graphemes, basic_cleaners, blank token between characters), stochastic duration predictor, HiFi-GAN decoder, multi-period discriminator (periods 2, 3, 5, 7, 11) plus a scale discriminator (config.json has every setting).
  • 250,000 steps (2,084 epochs), global batch 64 (32 on each of 2 NVIDIA L40S, DDP), fp16 mixed precision, 24 h 37 min.
  • AdamW (betas 0.8 and 0.99, eps 1e-9, weight decay 0.01), learning rate 2e-4 for the generator and the discriminator with exponential decay (gamma 0.999875 per epoch), gradient clipping at 1.0, mel loss weight 45.
  • Audio features: 1,024-point FFT, window 1,024, hop 256, 80 mel bands.

To retrain (the scripts carry the cluster paths of the original run; source: vits/ in Multilingual-MOS):

python code/prepare_jsut.py --jsut jsut_ver1.1 --out JSUT-VITS        # needs pyopenjtalk 0.4.1
python code/preprocess_open_bible_audio.py --metadata JSUT-VITS/metadata.csv --output-dir JSUT-VITS-22k
python code/train_vits.py --metadata JSUT-VITS-22k/metadata.csv --language ja --output_path runs \
    --global_batch_size 64 --num_gpus 2 --target_steps 250000 --sample_rate 22050 --win_length 1024 \
    --hop_length 256 --num_mels 80 --save_step 5000 --print_step 5000 --no_eval --run_name vits_japanese

With 2 GPUs, train_Japanese.sh launches the last command through python -m trainer.distribute --script code/train_vits.py --gpus 0,1.

Evaluation

An intelligibility check, not a listening test: 34 Japanese sentences that are not in JSUT (11 from Common Voice, 11 from FLEURS, 12 from the Kokoro audiobook corpus) were synthesized with seed 0 and transcribed with Meta's omniASR (omniASR_LLM_1B_v2). Character error rate is computed on katakana (reference and transcript both converted with to_kana), so the ASR's choice between homophone kanji does not count as an error. Median 2.9% (mean 4.1%), against 1.9% (mean 3.7%) for the human recordings of the same sentences.

Limitations

  • One voice and one style: neutral read speech at JSUT's pace. No control of emotion or speaking style.
  • Pronunciation is only as good as pyopenjtalk's reading of the text; pitch accent is not in the input.
  • Trained on about 10 hours from a single speaker: rare katakana sequences and very long sentences are less reliable.
  • The voice is a real person's: do not use it to impersonate her or to pass synthetic speech off as hers.

License

Research and non-commercial use only, following the terms of the JSUT audio: research at academic institutions, non-commercial research (including within commercial organizations) and personal use. Commercial use needs permission from the JSUT rights holders (University of Tokyo); see the JSUT page. The JSUT transcripts are CC BY-SA 4.0. The scripts in code/ come from open-bible-models (MIT; train_vits.py, preprocess_open_bible_audio.py) and Multilingual-MOS (Apache 2.0; the rest).

Citation

@article{sonobe2017jsut,
  title   = {{JSUT} corpus: free large-scale {Japanese} speech corpus for end-to-end speech synthesis},
  author  = {Sonobe, Ryosuke and Takamichi, Shinnosuke and Saruwatari, Hiroshi},
  journal = {arXiv preprint arXiv:1711.00354},
  year    = {2017}
}

@inproceedings{kim2021vits,
  title     = {Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech},
  author    = {Kim, Jaehyeon and Kong, Jungil and Son, Juhee},
  booktitle = {Proceedings of the 38th International Conference on Machine Learning},
  pages     = {5530--5540},
  year      = {2021}
}
Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Papers for davidguzmanr/VITS-JSUT-Japanese