EveryVoice KSS (Korean)
A single-speaker Korean text-to-speech model trained with EveryVoice 0.3.1: a FastSpeech2 acoustic model trained from scratch for 250,000 steps on KSS (one professional female voice actress, 12.86 hours of read speech), and a HiFi-GAN vocoder fine-tuned on its output for 100,000 steps. Output: 22,050 Hz mono.
The model reads Korean as conjoining jamo (Unicode NFD), with numbers and Latin letters written out in Hangul. Each syllable of the training transcripts was decomposed into its letters (각 = ᄀ + ᅡ + ᆨ), and the input text must be decomposed the same way (
front_endbelow). Precomposed syllables (NFC, the usual form of Korean text) are not in the model's vocabulary. NFD text looks the same on screen, so check the length:len(front_end("안녕")) == 6.
Files
| File | Contents |
|---|---|
feature_prediction.ckpt |
FastSpeech2 (text -> mel spectrogram), EveryVoice checkpoint at step 250,000: weights and optimizer state |
vocoder.ckpt |
HiFi-GAN (mel spectrogram -> waveform), EveryVoice checkpoint at step 100,000: generator, discriminators and optimizer state |
config/ |
the EveryVoice project's configs (everyvoice-*.yaml), as trained; the data paths are those of the training cluster |
code/prepare_data.py |
corpus -> EveryVoice training data (front end, filtering, wav + metadata.psv) |
code/EveryVoice-Open-Bible-Korean.sh |
the Slurm job that trained the model (EveryVoice preprocess, both trainings, vocoder matching) |
How to use
Install
pip install "everyvoice>=0.3.1,<0.5" huggingface_hub
Tested from a clean install (Linux, Python 3.11, everyvoice 0.4.1, torch 2.7.1, pyopenjtalk 0.4.1) and in the training environment (Python 3.10, everyvoice 0.3.1, torch 2.3.1), on GPU and CPU; they give the same audio (on CPU up to floating-point differences). everyvoice 0.4.1 needs torch 2.7.1 and Python 3.10-3.12; for a specific CUDA or CPU build of PyTorch, install torch 2.7.1 first.
Do not use everyvoice 0.5.0. The checkpoints were written by everyvoice 0.3.1 (FastSpeech2 model version 1.2), which puts 12 built-in symbols (padding, space, punctuation classes) at the start of the symbol table. When 0.5.0 converts a 1.2 checkpoint to its format, it rebuilds the old table without them, so every row of the embedding table is attributed to the wrong symbol: the Japanese and Korean models load without error but speak gibberish, and the Indonesian one fails to load. 0.4.1 reads the checkpoints as they are (no conversion) and gives the same audio as 0.3.1. The snippet below stops on 0.5.
Synthesize
import shutil
import tempfile
import unicodedata
from importlib.metadata import version
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from packaging.version import Version
# everyvoice 0.5 converts these checkpoints wrongly (see Install): stop rather than synthesize gibberish
assert Version(version("everyvoice")) < Version("0.5"), "this model needs everyvoice 0.3.1-0.4.1: pip install 'everyvoice<0.5'"
from everyvoice.config.type_definitions import DatasetTextRepresentation
from everyvoice.model.feature_prediction.FastSpeech2_lightning.fs2.cli.synthesize import get_global_step, synthesize_helper
from everyvoice.model.feature_prediction.FastSpeech2_lightning.fs2.model import FastSpeech2
from everyvoice.model.feature_prediction.FastSpeech2_lightning.fs2.type_definitions import SynthesizeOutputFormats
from everyvoice.model.vocoder.HiFiGAN_iSTFT_lightning.hfgl.utils import load_hifigan_from_checkpoint
def front_end(text): # Korean text -> conjoining jamo (Unicode NFD), as the training transcripts
return unicodedata.normalize("NFD", " ".join(text.split()))
repo_id = "davidguzmanr/EveryVoice-KSS-Korean"
local = Path(snapshot_download(repo_id, allow_patterns=["*.ckpt"]))
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = FastSpeech2.load_from_checkpoint(str(local / "feature_prediction.ckpt"), map_location=device).to(device).eval()
model_step = get_global_step(local / "feature_prediction.ckpt")
vocoder_ckpt = torch.load(str(local / "vocoder.ckpt"), map_location=device, weights_only=True)
vocoder, vocoder_config = load_hifigan_from_checkpoint(vocoder_ckpt, device)
vocoder_step = vocoder_ckpt["global_step"]
# Symbols seen in training: the characters of the transcripts and the punctuation `,` `.` `?` `!`
symbols = model.config.text.symbols.model_dump()
TRAINED = {s for name, values in symbols.items() if name.endswith("_characters") for s in values} | set(",.?!")
def synthesize(text, wav_path, duration_control=1.0):
# Write `text` to `wav_path` (22,050 Hz mono). duration_control > 1 makes speech slower, < 1 faster.
model_text = front_end(text)
unknown = "".join(sorted({ch for ch in model_text if ch not in TRAINED and ch != " "}))
if unknown:
print(f"not in the training transcripts, dropped: {unknown}")
model_text = "".join(ch for ch in model_text if ch in TRAINED or ch == " ")
with tempfile.TemporaryDirectory() as tmp:
synthesize_helper(
model=model, texts=None, style_reference=None, language=None, speaker=None,
duration_control=duration_control, global_step=model_step,
output_type=[SynthesizeOutputFormats.wav], text_representation=DatasetTextRepresentation.characters,
accelerator="gpu" if device.type == "cuda" else "cpu", devices=1, device=device,
batch_size=1, num_workers=0, filelist=None,
filelist_data=[dict(basename="utt", characters=model_text, language="und", speaker="speaker_0",
duration_control=duration_control, is_last_input_chunk=True)],
output_dir=Path(tmp), teacher_forcing_directory=None, vocoder_model=vocoder,
vocoder_config=vocoder_config, vocoder_global_step=vocoder_step,
)
(wav,) = Path(tmp).glob("**/*.wav") # EveryVoice names the file after the text; move it to wav_path
shutil.move(wav, wav_path)
return model_text
print(synthesize("오늘은 날씨가 정말 좋네요!", "output.wav")) # 오늘은 날씨가 정말 좋네요!
The model has one speaker (speaker_0) and one language (und, EveryVoice's "undetermined"); both are fixed in
filelist_data. Call synthesize once per sentence: the models are loaded once, and each call writes one wav. EveryVoice
prints a progress bar and some logs on every call. Synthesis is deterministic: the same text gives the same audio.
The text front end
front_end turns the text into the symbols the model was trained on:
| Input | Model input |
|---|---|
| 오늘은 날씨가 정말 좋네요! | ᄋ ᅩ ᄂ ᅳ ᆯ ᄋ ᅳ ᆫ | ᄂ ᅡ ᆯ ᄊ ᅵ ᄀ ᅡ | ᄌ ᅥ ᆼ ᄆ ᅡ ᆯ | ᄌ ᅩ ᇂ ᄂ ᅦ ᄋ ᅭ ! |
| 저는 매일 아침 커피를 마셔요. | ᄌ ᅥ ᄂ ᅳ ᆫ | ᄆ ᅢ ᄋ ᅵ ᆯ | ᄋ ᅡ ᄎ ᅵ ᆷ | ᄏ ᅥ ᄑ ᅵ ᄅ ᅳ ᆯ | ᄆ ᅡ ᄉ ᅧ ᄋ ᅭ . |
| 2026년 12월 2일입니다. | 2 0 2 6 ᄂ ᅧ ᆫ | 1 2 ᄋ ᅯ ᆯ | 2 ᄋ ᅵ ᆯ ᄋ ᅵ ᆸ ᄂ ᅵ ᄃ ᅡ . (synthesize drops 0126) |
- The table shows each jamo separately and the spaces between words as
|;front_endreturns them joined, which displays exactly like the original syllables. - KSS's transcripts have numbers and Latin acronyms written out in Hangul (its
expanded_script: IMF -> 아이엠에프), so the model has never seen a digit or a Latin letter. Write them out before synthesis (2026년->이천이십육 년);synthesizedrops them with a warning otherwise. - Do not apply NFC normalization after
front_end: it recomposes the jamo into syllables. - Initial and final consonants are different symbols (ᄀ U+1100 vs ᆨ U+11A8), as Unicode NFD writes them. Hangul Compatibility Jamo (ㄱ U+3131, as typed on its own) are not in the vocabulary.
- The model's vocabulary is 65 characters:
ᄀ ᄁ ᄂ ᄃ ᄄ ᄅ ᄆ ᄇ ᄈ ᄉ ᄊ ᄋ ᄌ ᄍ ᄎ ᄏ ᄐ ᄑ ᄒ ᅡ ᅢ ᅣ ᅤ ᅥ ᅦ ᅧ ᅨ ᅩ ᅪ ᅫ ᅬ ᅭ ᅮ ᅯ ᅰ ᅱ ᅲ ᅳ ᅴ ᅵ ᆨ ᆩ ᆪ ᆫ ᆬ ᆭ ᆮ ᆯ ᆰ ᆱ ᆲ ᆴ ᆶ ᆷ ᆸ ᆹ ᆺ ᆻ ᆼ ᆽ ᆾ ᆿ ᇀ ᇁ ᇂ, plus the punctuation,.?!and the space.synthesizedrops anything else, with a warning.
Training data
KSS (Park, 2018), from the Hugging Face
copy Bingsu/KSS_Dataset: 12,854 utterances (12.9 h)
of one professional female voice actress reading sentences from Korean books, 44.1 kHz. All of them were used
(0.8-9.0 s, none longer than 15 s). The text is the dataset's expanded_script (numbers and Latin acronyms
written out in Hangul) with whitespace collapsed, decomposed into jamo with Unicode NFD. The dataset's own
decomposed_script column was not used: 22 of its rows are broken (e.g. 의미ᅡᆸ니까). One recording is stereo with
different channels and was downmixed to mono.
EveryVoice's preprocessing resampled the audio to 22,050 Hz. No sentence of the Multilingual-MOS listening test is in the training data. The audio and the training filelists are not included here.
Training procedure
- EveryVoice 0.3.1 with the recipe of the Open Bible EveryVoice models
(open-bible-models,
jobs/FastSpeech/): character input, all utterances for training (train_split1.0), validation on the first 511 training utterances. Changes: the corpus and its text front end,max_epochs10,000 (so that the step budget, not the epoch limit, ends training) and a checkpoint every 5,000 steps. - Audio features: 22,050 Hz, 80 mel bands up to 8 kHz, FFT and window 1,024, hop 256; utterances of 0.4-15 s.
- FastSpeech2 with Conformer encoder and decoder (4 layers each, dimension 256, 2 heads), duration, pitch and energy predictors (pitch and energy averaged per input symbol), alignment learned jointly (no external aligner), and a postnet; 18.2 M parameters. Trained 250,000 steps (1,249 epochs), batch 32 on each of 2 NVIDIA L40S (DDP, global batch 64), Noam schedule with learning rate 1e-3 and 1,000 warm-up steps.
- Vocoder: HiFi-GAN V1 (512 initial channels, upsampling 8 x 8 x 2 x 2), initialized from EveryVoice's universal
checkpoint (
hifigan_universal_v1_everyvoice.ckpt) and fine-tuned 100,000 steps (249 epochs) on the mel spectrograms this FastSpeech2 predicts for the training utterances with their true durations (teacher forcing), so the vocoder learns the acoustic model's output. Batch 32 on each of 2 GPUs, AdamW with learning rate 1e-5. - The whole job (preprocessing, both trainings, spectrogram generation) took 12 h 22 min on 2 NVIDIA L40S.
To retrain (source: everyvoice-tts/ in Multilingual-MOS):
python code/prepare_data.py --language Korean # writes data/EveryVoice/Korean/ (wavs/, metadata.psv)
everyvoice new-project # wavs/ and metadata.psv: psv, characters, no text transformation
sbatch code/EveryVoice-Open-Bible-Korean.sh # preprocess, text-to-spec, vocoder matching, vocoder
After the wizard, replace KSS_characters in config/everyvoice-shared-text.yaml with the jamo: the wizard groups the NFD text into Unicode grapheme clusters, i.e. whole syllables again. config/ here has the corrected list.
Evaluation
An intelligibility check, not a listening test: the 34 Korean sentences of the Multilingual-MOS listening test (from
Common Voice, FLEURS and the TAPS corpus; none is in the training data) were synthesized with the snippet above and
transcribed with Whisper (openai/whisper-large-v3-turbo, language set). Character error rate on Hangul syllables:
median 13.2% (mean 17.9%). On 20 of its own training sentences the model's CER is 0% (median; mean 5.4%), as for the real KSS recordings: the errors come from sentences longer than KSS's and unlike them, not from the front end.
Limitations
- One voice and one style: neutral read speech. No control of emotion or speaking style;
duration_controlsets the speed. - Trained on short sentences (0.8-9.0 s, 3.6 s on average): long sentences and words unlike KSS's are less reliable (see Evaluation). Pronunciation rules (liaison, tensification, nasalization) are learned from the data, not given by a front end.
- The voice is a real person's: do not use it to impersonate her or to pass synthetic speech off as hers.
License
CC BY-NC-SA 4.0, the licence of the KSS dataset: non-commercial
use, with attribution, and adaptations shared under the same licence. The scripts in code/ come from Multilingual-MOS (Apache 2.0); the Slurm job follows
open-bible-models (MIT).
Citation
@misc{park2018kss,
title = {{KSS} Dataset: {Korean} Single speaker Speech Dataset},
author = {Park, Kyubyong},
howpublished = {\url{https://kaggle.com/bryanpark/korean-single-speaker-speech-dataset}},
year = {2018}
}
@inproceedings{ren2021fastspeech2,
title = {{FastSpeech} 2: Fast and High-Quality End-to-End Text to Speech},
author = {Ren, Yi and Hu, Chenxu and Tan, Xu and Qin, Tao and Zhao, Sheng and Zhao, Zhou and Liu, Tie-Yan},
booktitle = {International Conference on Learning Representations},
year = {2021}
}
@inproceedings{kong2020hifigan,
title = {{HiFi-GAN}: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis},
author = {Kong, Jungil and Kim, Jaehyeon and Bae, Jaekyoung},
booktitle = {Advances in Neural Information Processing Systems},
volume = {33},
pages = {17022--17033},
year = {2020}
}