-
Rename the Python package from
pipertopiper_tts(#182)- The unrelated mouse configuration tool libratbag/piper also installs
site-packages/piper/and/usr/bin/piper, so a system package manager could not install both - Use
from piper_tts import PiperVoiceandpython3 -m piper_tts,python3 -m piper_tts.train, and so on; the PyPI name stayspiper-tts import piper,import piper.<module>andpython3 -m piper.<module>still work: they return the same module objects aspiper_ttsand raise aDeprecationWarningon import. They will be removed in 2.0- Nothing in
piper_ttsimportspiper, so system packages can leave outsite-packages/piper/and thepipercommand - New
piper-ttscommand, the same aspiper - Loggers are now named
piper_tts.*, so logging configured forpiper.*needs updating - Training checkpoints pickle no
pipermodule paths, so existing checkpoints keep working
- The unrelated mouse configuration tool libratbag/piper also installs
-
Add
sentence_silencetoSynthesisConfigfor silence between sentences in the Python API (#112)--sentence-silencewas only available on the command line and inpiper.http_server, each with its own code;PiperVoice.synthesize_wavput the sentences right after each othersynthesize_wav, thepipercommand andpiper.http_servernow all take the silence fromSynthesisConfig.sentence_silence;PiperVoice.synthesizestill yields one chunk per sentence without silence- The silence is aligned to a
_phoneme, so alignments fromsynthesize_wav(..., include_alignments=True)and the timeline of the web page add up to the audio /synthesizeacceptssentence_silence, which falls back to--sentence-silence
-
Add a
GET /healthendpoint topiper.http_server- Returns
{"status": "healthy"}, so clients and container health checks can see that the server is up without requesting/voices(which reads every voice config in the data directories) or synthesizing text
- Returns
-
Add
--extra-models-dirto thepipercommand andpiper.http_server- Chinese voices look for the g2pW model in
g2pW/under the current directory and download it there when it is missing, which fails where there is no network (such as a Nix build sandbox) and leaves a copy in every directory Piper runs from - The flag sets
download_dirofPiperVoice.load, so a prefetched model at<DIR>/g2pW/g2pw.onnxis used; without it, the current directory is used as before
- Chinese voices look for the g2pW model in
-
Add
-V/--versionto thepipercommand- Prints
piper <version>from the installedpiper-ttspackage metadata, orpiper unknownwhen Piper runs from a source tree without it
- Prints
-
Put the
--sentence-silencepause of thepipercommand between lines of input too- The silence was written before every sentence but the first of each line, so
This is a test.andThis is another.on two lines ran together in one WAV file, raw output or playback, while the same text on one line had the pause - Every sentence but the last now gets the silence, as the CLI docs say;
--output-dirstill writes one file per line
- The silence was written before every sentence but the first of each line, so
-
Stop
piper --output-dirfrom overwriting files on Windows- Each line's WAV file is named after
time.monotonic_ns(), which on Windows ticks only every ~16 ms, so short lines got the same name and only the last one was kept - A line now always gets a larger number than the one before it, so names are unique and still sort in input order
- Each line's WAV file is named after
-
Add a rule-table phonemizer for languages without a usable espeak-ng voice: isiXhosa (
xh), Sesotho (st) and Setswana (tn)"phoneme_type": "rules", withespeak.voicenaming the language; train with--data.phoneme_type rules --data.espeak_voice xh- One generic engine (
piper.phonemize_rules) and one JSON table per language inpiper/rules/: longest-match graphemes, context rules, an optional word lexicon, and tone diacritics written as the tone digits Thai and Chinese voices already use - Output stays inside the default phoneme id map (no tie bars or ejective marks), so these voices can warmstart from any IPA checkpoint
- The
xhtable matches 14,999 of the 15,000 words of the NCHLT-inlang isiXhosa pronunciation dictionary once notational differences are normalized
-
Phonemize Kyrgyz and Uzbek consonants as IPA
- espeak-ng's Kyrgyz phoneme table printed
tS dZ S N Xas literal ASCII instead oftʃ dʒ ʃ ŋ χ, and Uzbek inherits itstSfor "ch" - Piper's phoneme map has no
S, so Uzbek "ch" reached a voice as a plaint - The bundled espeak-ng is patched at build time until the upstream fix (espeak-ng/espeak-ng#2727) is in the pinned commit
- espeak-ng's Kyrgyz phoneme table printed
-
Write a valid, empty WAV file when the text has nothing to speak
PiperVoice.synthesize_wav, thepipercommand and/synthesizeinpiper.http_serverset the WAV format from the first audio chunk, so empty input left the format unset and closing the file raisedwave.Error: # channels not specified- The format now comes from the voice config before synthesis starts
-
Stream audio from
libpiperfor voices split into an encoder and a decoderpiper_synthesize_nextreturned one chunk per sentence, so the first sound of a long sentence came only after the whole sentence was synthesized (about 4 seconds for a 6 second sentence of a high voice used by VoiceOver on an Apple M3)python3 -m piper.split_voice_for_streaming model.onnxwritesmodel.encoder.onnxandmodel.decoder.onnx; when both are next to the model,piper_createloads them instead of the full model and the decoder runs in chunks- Chunks overlap by more than the decoder's receptive field, so the audio matches the unsplit voice; chunk sizes adapt to the measured decoder speed to keep playback gapless
- The first sound now comes after about 0.2 seconds regardless of the sentence length
- Split fp16 voices work too: the latent is converted to float16 when the decoder expects it
-
Run
libpiperinference on several threads- The onnxruntime session used a single intra-op thread, which made synthesis about three times slower than the Python API on the same machine
- It now uses the number of performance cores on Apple platforms and half of the hardware threads elsewhere, at most 4
-
Build
libpiperwith onnxruntime older than 1.22, such as the 1.21 in Debian 13Ort::Session::GetOutputNames()first appeared in onnxruntime 1.22; the output names are now read one at a time withGetOutputNameAllocated
-
Document when
piper_synthesize_nextreturnsPIPER_DONE- Since 1.5.0 it comes back from the same call as the final chunk (
is_last = true), and that chunk can contain audio, so a loop that stops atPIPER_DONEbefore using the chunk drops the end of the speech piper.hnow says so and shows a loop that keeps the final chunk
- Since 1.5.0 it comes back from the same call as the final chunk (
-
Remove
libpiper/ .clang-format, which clang-format never read because of the space in its name -
Stop training with an error when no utterance is usable
VitsDataModule.setup()skips an utterance whose audio or cached tensors are missing; when that leaves none, it now raisesValueErrorinstead of running epochs of zero steps
-
Phonemize Hebrew with
HebrewPhonemizerinpiper.train.infer_torch- The dispatch had no
HEBREWbranch, so a Hebrew checkpoint was inferred from raw espeak-ng output with no error - The espeak-ng fallback in
infer_torchand in the training dataset now raisesValueErrorfor any phoneme type other thanespeak, asPiperVoice.phonemizealready does, so a type without its own branch fails instead of training or inferring on the wrong phonemes
- The dispatch had no
-
Fix training failing on a clip shorter than
segment_size(#155)- A clip that ends up shorter than
segment_size(8192 samples) after VAD trimming makes the generator produce fewer samples than the reference slice, which the collate function pads tosegment_size; when every clip in a batch is that short (always with--data.batch_size 1), the discriminator feature loss failed withThe size of tensor a (8192) must match the size of tensor b (7424) - The generated and reference audio are now both trimmed to the shorter of the two before the discriminators, so the clip trains on its real content
- A clip shorter than the STFT window (1024 samples) still cannot be trained on
- A clip that ends up shorter than
-
Add synthesis settings and a speaker picker to the web page of
piper.http_server/synthesizehas always acceptedlength_scale,noise_scale,noise_w_scale, andspeaker/speaker_id, but the page sent nothing buttext, so the only way to hear a voice's other speakers or a different speaking rate was to leave the browser and usecurl- The page now has a Settings section with a slider and a number box per scale, plus a speaker drop-down for multi-speaker voices; Reset to voice defaults restores the starting values
- The settings start at the voice's defaults and survive each synthesis - only the first
/infofetch loads them, so the values a user picked are not thrown away when the page refreshes the alignment timeline - Emptying a number box drops that field from the request rather than sending
NaN, so the server falls back to its own default
-
Report the speakers and default synthesis settings of the current voice from
/info- The page needs them to populate its new controls, and nothing else exposed them:
/voiceshas the whole config of every downloaded voice, but not which voice the server is serving or what--length-scaleand friends were set to on the command line voice.speakerslists{"id", "name"}ordered by id, naming speakers the voice does not name itself (speaker_id_mapis empty on some multi-speaker voices) asSpeaker <id>voice.defaultsgives thespeaker_id/length_scale/noise_scale/noise_w_scalea request gets when it leaves them out, with the command-line arguments applied over the voice config
- The page needs them to populate its new controls, and nothing else exposed them:
-
Fix
/synthesizeaccepting a speaker id one past the last speaker- The bounds check was
speaker_id > num_speakers, so an id equal tonum_speakerspassed through to onnxruntime; negative ids were not checked at all - Out-of-range ids now fall back to speaker 0 with a warning, and a
speaker_idsent as a string is accepted
- The bounds check was
-
Send
Content-Type: audio/wavfrom/synthesizeinpiper.http_server, instead oftext/html -
Stop warning that speaker
Nonewas not found- Every request to a multi-speaker voice that did not name a speaker logged a "Speaker not found" warning before falling back to the default speaker, which is the documented behavior, not a problem; the warning is now logged only when a
speakername was actually given and did not match
- Every request to a multi-speaker voice that did not name a speaker logged a "Speaker not found" warning before falling back to the default speaker, which is the documented behavior, not a problem; the warning is now logged only when a
-
Resolve renamed voices in
piper.download_voicesusing thealiaseslist in voices.json- A voice that has been renamed keeps its old name in the
aliaseslist of its voices.json entry, but nothing honored it: the downloader builds its URL from the voice name alone and never reads voices.json, so every pre-1.0 name (de-karlsson-low,zh-cn-huayan-x-low, ...) failed - those names do not even match the<language>-<name>-<quality>pattern, so they raised before any download was attempted - A name that does not parse, or that parses but 404s, is now looked up in the
aliaseslists and downloaded under its current name, with a warning saying what it was renamed to - voices.json is only downloaded when a name actually has to be resolved, so a current name still costs the same two requests it always did
- A voice that has been renamed keeps its old name in the
-
Add Lithuanian phonemizer using espeak-ng plus a pitch accent dictionary
--data.phoneme_type lithuanianfor training;"phoneme_type": "lithuanian"in a voice config for synthesis- espeak-ng's Lithuanian voice phonemizes well but places stress incorrectly in roughly half of the words, and it cannot express the three Lithuanian pitch accents at all: it collapses them into one primary-stress mark, so kártas ("a time") and kar̃tas ("bitter") come out identical
- The phonemizer keeps espeak-ng as the phoneme source and moves the stress mark to the accented syllable using a dictionary built from the LIEPA corpus and the g2p-lt-lexicon, both CC-BY-4.0; words that are missing keep espeak-ng's own placement
- Accents reuse ˈ and ˌ and add ˋ (U+02CB) - one symbol appended to the default IPA map, so Lithuanian voices stay compatible with the IPA-based (espeak) warmstart
- The stress dictionary (3 MB, CC-BY-4.0) and the letter-name table ship with piper as package data, like the Hebrew model: pip install, download the voice, it works - no extra files and no new dependency; a voice may pass its own files to
LithuanianPhonemizerinstead - Lithuanian also has a vocative case spelled like the nominative but accented differently (mamà "mother" vs mãma "mum!"); a dictionary holding one entry per spelling cannot express it, so a short list of nouns that occur as address ships alongside, and a word on that list fenced off by commas is accented on the first syllable
- The shipped letter-name table also separates z and ž, which espeak-ng names identically (ʑˈee), so the initials of "Zigmas" and "Žygimantas" are no longer read the same, and names Š "šė" rather than "eš"
-
Add Japanese phonemization to
libpiperusing OpenJTalk- Voices with
"phoneme_type": "japanese"(e.g.ja_JP-hi_fi_captain-medium) could not be used fromlibpiper: the unknown phoneme type threw across the C API and crashed the host application - A C++ port of
phonemize_japanese.pydrives the OpenJTalk frontend, built as a pinned static dependency; its output is byte-identical to the Python phonemizer on the golden test sentences - The dictionary is not bundled: pass
piper_create_options.openjtalk_dict_dir, or put it in<data_dir>/openjtalk,<data_dir>or<model_dir>/openjtalk; the new option is guarded bystruct_size, so existing callers keep working
- Voices with
-
Fix
libpipercorrupting multi-codepoint phonemes inphoneme_id_map- Keys were reduced to their first codepoint, so diphthongs such as aɪ/aʊ/ɔɪ/eɪ/oʊ folded onto their vowel and every
ain the text also fed the model the diphthong ids; affected voices,tl_PH-filipinoamong them, produced random sounds instead of speech - Multi-codepoint keys now have their own map, and the config's
vowel_clustersare merged longest-match first before lookup, as in Python; voices withoutvowel_clusterskeep the old code path
- Keys were reduced to their first codepoint, so diphthongs such as aɪ/aʊ/ɔɪ/eɪ/oʊ folded onto their vowel and every
-
Fix the installed
libpiperCLI on Windows- The CLI was installed to
binbutpiper.dlland the bundled onnxruntime DLLs tolib, so it failed to start outside the build tree (0xC0000135); it also looked for the espeak-ng data beside the executable, where the install never put it - The runtime DLLs and a copy of the espeak-ng data now go beside the CLI; import libraries stay in
liband the data stays insharefor API callers
- The CLI was installed to
-
Use the
libpiperCLI's--espeak_datawithout looking up the executable's own path- The lookup is only needed to find
espeak-ng-databeside the executable, and it failed on systems without/proc/self/exe, such as QNX, even when--espeak_datawas given; QNX now reads/proc/self/exefile - MinGW builds include
windows.hand useGetModuleFileNameWlike MSVC builds, instead of failing to compile or falling back to/proc/self/exe
- The lookup is only needed to find
-
Write the real sizes into WAV files from the
libpiperCLI- Every WAV file had the open-ended stream header (about 2 GB of data); files written with
-for to an output directory now get the actual RIFF and data sizes, while stdout keeps the stream header - Synthesis, write and close errors are reported instead of ignored
- Every WAV file had the open-ended stream header (about 2 GB of data); files written with
-
Download
libpiper's onnxruntime from Microsoft's NuGet package- The release archives
libpiperdownloaded fromgithub.com/microsoft/onnxruntimestarted returning 404 on 2026-11-19, along with the repository itself, solibpiperno longer configured on any platform Microsoft.ML.OnnxRuntimeon nuget.org carries the same 1.22.0 build (the Linux x64 library is byte-identical) for Linux x64/aarch64, macOS x86_64/arm64 and Windows x64, with the headers; the build lays it out like the release archives, under the file names the libraries' install names and sonames refer to- The package is checked against a pinned SHA256, and a failed download now stops with
Failed to download <url>instead of saving the error page and failing later withCould not find ONNXRUNTIME_LIB -DONNXRUNTIME_URLstill takes an archive laid out like the release archives (as the 32-bit ARM build does), and-DONNXRUNTIME_SHA256checks it
- The release archives
-
Build
libpipersources as UTF-8 with MSVC- On a Windows machine with a non-UTF-8 code page (e.g. 936), the Chinese phonemizer's UTF-8 punctuation literals were read in the local code page and the build failed
-
Build espeak-ng with MSVC 14.52 (Visual Studio 2026), for
libpiperand for the Python package- espeak-ng's compat headers (
unistd.h,endian.h,getopt.h) test#if __has_include_next(...), and MSVC has no__has_include_next; MSVC 14.44 let it pass, but 14.52 stops with errors C7780 and C1017, so the espeak-ng build failed on current Windows runners - Both espeak-ng builds now patch the headers after checkout to define
__has_include_next(header)as 0 when the compiler lacks it, as espeak-ng itself does since 021e465; the patch is a no-op for GCC and Clang, which define it
- espeak-ng's compat headers (
-
Keep voice files intact when a download is interrupted
urlopenstops quietly when a connection drops, so a truncated model or config was written to its final path and treated as cached from then on, and--force-redownloadtruncated a working voice before the replacement had arrived- Files are now downloaded into a temporary directory inside the destination, checked against
Content-Length, and moved into place only once every file for the voice has arrived
-
Split
[[ raw phonemes ]]the same way as espeak-ng output- Raw phoneme blocks were split into codepoints as typed, so input that looked right did not match what espeak voices were trained on: the ligature
ʤhas no id and was silently dropped ("stonehenge" became "stone hen"), ASCIIgand'map to ids the model never learned, and neither NFD decomposition nor vowel-cluster merging was applied - Raw blocks are now NFD-normalized, ligatures and ASCII lookalikes are replaced with the symbols espeak-ng writes, and vowel clusters are merged
- Raw phoneme blocks were split into codepoints as typed, so input that looked right did not match what espeak voices were trained on: the ligature
-
Keep phoneme alignments when a phoneme is missing from the voice's id map
phonemes_to_idsskips such a phoneme with a warning, but the alignment code still expected its ids, so one unmapped phoneme setphoneme_alignmentstoNonefor the whole sentence
-
Fix a use-after-free when more than one espeak-ng phonemizer is created
- Every
EspeakPhonemizer()calledespeak_Initialize()again, which frees and reloads the phoneme tables while the current voice still points into the old ones, so the next phonemization read freed memory; whether that crashed depended on memory layout - espeak-ng is now initialized once per data directory, and switching directories terminates it first
- Every
-
Load CUDA and cuDNN from the
nvidia-*pip packages withuse_cuda=True(--cuda)- onnxruntime's CUDA provider doesn't look in site-packages, so CUDA installed with pip (
nvidia-cublas-cu12,nvidia-cudnn-cu12, ...) failed to load unless its directories were added to the library path by hand PiperVoice.loadnow callsonnxruntime.preload_dlls()(onnxruntime 1.21 and later) before creating the session; its messages go to stderr, so they can't mix with audio written to stdout
- onnxruntime's CUDA provider doesn't look in site-packages, so CUDA installed with pip (
-
Play audio through ffplay with any ffmpeg version
- Since 1.4.0,
piperwithout an output file passed-ch_layout monoto ffplay instead of-ac 1, which ffmpeg 7 rejects. But ffmpeg before 5.1 has no-ch_layout, so on Ubuntu 22.04 (ffmpeg 4.4) ffplay exited at once ("Option not found") andpiperfailed with a broken pipe - ffplay now gets no channel option: raw PCM input is mono by default in every ffmpeg version, and Piper's audio is mono
- Since 1.4.0,
-
Fix
piper -f -writing a truncated or empty WAV file to stdout- The temporary WAV file was copied to stdout before its writer was closed, so whatever was still buffered was lost and the header kept stale sizes; short single-sentence outputs could come out empty
-
Fix
piper -f -on Windows- The WAV writer reopened the temporary file by name, which Windows doesn't allow while it is open, so writing to stdout failed with
PermissionError; the writer now uses the open file
- The WAV writer reopened the temporary file by name, which Windows doesn't allow while it is open, so writing to stdout failed with
-
Add
requeststo thethextra- tltk imports
requestswhen the package is imported but does not declare it, so a cleanpip install piper-tts[th]failed at import time
- tltk imports
-
Include
CMakeLists.txtandespeakbridge.cin the source distribution- A wheel built from the sdist was pure Python, with no
espeakbridgeor espeak-ng data, soEspeakPhonemizerraisedImportErrorafter an install that seemed to succeed - CI now builds a wheel from the sdist, installs it and runs the espeak-ng tests against it
- A wheel built from the sdist was pure Python, with no
-
Build with scikit-build older than 1.0
- scikit-build 1.0.0 (2026-12-02) builds wheels without
espeak-ng-data(0 of its 373 files) and fails editable installs (pip install -e .) withsetuptools editable installs require editable.mode = 'inplace' pyproject.tomlnow requiresscikit-build<1to build Piper- The
trainextra includes it too, for thepython3 setup.py build_ext --inplacestep indocs/TRAINING.md
- scikit-build 1.0.0 (2026-12-02) builds wheels without
-
Fix the Docker build
.dockerignorelet only a few of the package's files through, so building the image failed withpackage directory 'src/piper/hebrew' does not exist, as it did in 1.8.0; the whole package now goes into the build, without local build output--build-arg lang=zh(orzh,ja,th) installs extra languages; the image always has thehttpextra
-
Fix the training learning rate never decaying
VitsModelsetsautomatic_optimization = False, and under manual optimization Lightning does not step the schedulers returned byconfigure_optimizers— nothing else did either, so the learning rate stayed pinned at its initial value for the whole run- Every checkpoint written before this reports
lr_schedulerslast_epoch=0no matter how many epochs it trained on_train_epoch_endnow steps both schedulers, and logslr_g/lr_d
-
Derive
--model.lr_decay/--model.lr_decay_dfrom--trainer.max_epochswhen they are not set explicitly- The old default (
0.999875, from upstream VITS) assumes a ~20,000-epoch schedule and decays the learning rate by only ~1% per 100 epochs, so simply stepping the scheduler would have changed almost nothing - The derived decay anneals to
--model.lr_final_ratio(default0.05) of the initial learning rate over the run;--model.lr_final_ratio 1.0keeps it constant - Open-ended runs (
max_epochs=-1, the default) have no run length to anneal over and still fall back to the upstream constants, with a warning - Resuming with
--ckpt_pathre-asserts the configured decay:ExponentialLR.state_dict()carriesgamma, so the restored value would otherwise silently replace it
- The old default (
-
Fix a resume silently reverting to the warmstart checkpoint
LightningCLI._parse_ckpt_pathmerges a resumed checkpoint's savedhyper_parametersback over the parsed config, so--model.warmstart_ckptcomes back even when it is absent from the command line- Trainer restores model weights before
on_fit_startand the optimizer/loop state after it, so the warmstart overwrote the resumed weights with the base model while keeping the restored epoch — discarding every epoch trained so far on_fit_startnow skips both warmstart paths whenevertrainer.ckpt_pathis set, and logs that it did
-
Fix exporting a checkpoint to ONNX with torch 2.9 or newer
- torch 2.9 made the dynamo-based exporter the default for
torch.onnx.export; it needsonnxscript, which Piper does not install, and it cannot traceinfer(), whose output length depends on the predicted durations, sopython3 -m piper.train.export_onnxfailed (GuardOnDataDependentSymNode) - The export now asks for the TorchScript exporter explicitly, and the
trainextra requires torch 2.5 or newer, the first version with that option
- torch 2.9 made the dynamo-based exporter the default for
-
Fix fine-tuning, exporting and inferring from the published checkpoints with torch 2.6 and later (#108, #132)
- torch 2.6 made
torch.loaddefault toweights_only=True, which refuses thepathlibpaths that the originalpiper_trainsaved in the hyperparameters of every published checkpoint, so--ckpt_path,piper.train.export_onnxandpiper.train.infer_torchfailed withUnsupported global: GLOBAL pathlib.PosixPath - Paths are now allowed under both of the names Python pickles them as. On Python 3.13 the class lives in
pathlib._local, so theadd_safe_globals([pathlib.PosixPath])that torch's error message suggests allowspathlib._local.PosixPathand not thepathlib.PosixPathin these checkpoints. A path saved on the other OS loads as a pure path - Once past that,
--ckpt_pathfailed withSubcommand 'fit' does not accept option 'model.sample_bytes': LightningCLI merges every saved hyperparameter into the config, and the published checkpoints have dozens thatVitsModelno longer takes. Those are now dropped and logged; the rest still override--model.*flags, as before export_onnx,export_generatorandinfer_torchalso failed on a checkpoint saved bypiper.trainwith a hyperparameterVitsModelno longer takes (e.g.phonemes_path), because Lightning rebuilt the model through LightningCLI's parser. They now pass the hyperparameters toVitsModeldirectly, which ignores unknown ones- The training docs now fine-tune with
--model.warmstart_ckpt, which starts a fresh optimizer and learning rate schedule, and keep--ckpt_pathfor resuming your own runs
- torch 2.6 made
-
Add
script/libritts_r_to_csv, which converts extracted LibriTTS-R splits to Piper's metadata CSV- Writes through
csv.writer(delimiter="|")so quoting round-trips through thecsv.readerthe trainer uses — a hand-rolled"|".join()silently drops the quotation marks that LibriTTS dialogue is full of - Falls back from
.normalized.txtto the chapter.trans.tsvto.original.txt, and skips utterances whose audio has no transcript - Optional
--min-seconds/--max-secondsfiltering and a--statsduration histogram
- Writes through
-
Save
last.ckptevery epoch, not only after a top-k savelast.ckptcame fromsave_laston theval_melcheckpoint callback, and Lightning 2.6 writes it only when that callback has just saved a top-k checkpoint, so onceval_melstopped improvinglast.ckptfroze and the remaining epochs - the end of the learning rate anneal - were never saved anywhere- Measured: a 2,000-epoch run's
last.ckptwas byte-identical to its epoch 1953 checkpoint last.ckptnow has its own callback and is rewritten at the end of every epoch; theval_melandval_mostop-5 checkpoints are unchanged, and runs started under the old callbacks resume cleanly
-
Start missing speaker conditioning at zero when warmstarting a multi-speaker voice from a single-speaker base
- The base has no speaker conditioning, so the projections that add the speaker embedding into the posterior encoder, flows, decoder and duration predictor came up at random and were added straight onto activations the copied weights were trained without; the model did not start from the base
- The scale and bias of each missing conditioning projection are now zeroed, so every speaker starts out reproducing the base exactly and still gets gradient from the first step; a base that already has speaker conditioning is copied as before
-
Fix a segfault in
monotonic_alignduring training- The backward loop of
maximum_path_eachreadvalue[y-1, ...]aty == 0, which is out of bounds with wraparound disabled
- The backward loop of
-
Stop the training step from waiting on the GPU once per utterance
slice_segmentsturned a GPU offset into a Python int for every utterance, three times per step; it is now one gather, and the random offsets, the discriminator losses and the duration predictor's noise stay on the device- Host syncs per step drop from 318 to 155 at batch size 16, about 2% faster on an RTX 3090; the gather is bit-identical to the old loop
-
Make vocoder and duration-predictor underfitting visible
val_melis an L1 over the same ~0.37 s window the decoder trains on, so it cannot show a vocoder that saw too few passes over the audio; a base model trained on 290 h finished its whole anneal audibly underfit with nothing in the logsval_vocoder_melis the teacher-forced decoder error over whole validation utterances, so it moves with vocoder fit alone- Vocoder coverage, in passes over the training audio, is reported when training starts, with a warning below ~150 passes
iterslogs the number of batches actually seen; Lightning'sglobal_step, also used in checkpoint filenames, counts two optimizer steps per batchgin_channels > 0withnum_speakers <= 1now raises, since that conditioning (~24% of the generator) could never be used- Optional
--data.length_bucketinggroups utterances of similar length into batches, cutting padding from ~61% to ~3% on a corpus with a long tail; it is off by default because it changes batch composition
-
Tag validation audio in TensorBoard by position (
val/00,val/01, ...) instead of by transcript- Transcripts with quotes, question marks or ampersands broke the key the dashboard fetches each clip by, so those clips showed as zero length; identical transcripts overwrote each other, and the tags changed whenever a run was resumed
- The transcript moves to the text dashboard under the same tag
-
Write per-phoneme training counts into voice configs as
phoneme_countsprepare_datacounts how often each phoneme occurs in the cached phoneme ids, so a voice records which symbols of its id map it was actually trained on; phonemes that never occur are left out, and so are PAD/BOS/EOS- Phonemes that share an id, like
。and.in the Chinese map, each get that id's count python3 -m piper.train.phoneme_countsbackfills the counts into the config of a voice trained before this, keeping keys it does not know- Also fix the dataset's missing-file checks, which tested a
Path's truthiness (always true) instead of whether the file exists
-
Document how long to train, how to read
val_mos, and how to choose a checkpoint indocs/TRAINING.md- Starting points from measured runs, counted in epochs: about 2,000 for fine-tunes on under ~5 h of audio, 650-850 for ~10-15 h
--ckpt_pathresumes the checkpoint's epoch counter and hyperparameters, so a fine-tune from lessac medium (epoch 2164,lr_decay0.999875) runs at a nearly constant learning rate;--model.warmstart_ckptdoes notval_mosmoves by 0.1-0.15 from epoch to epoch, reads lower for non-English voices, and does not hear pronunciation
-
Document voice licensing and commercial use
docs/LICENSING.mdexplains how to read a voice's model card and follow its fine-tuning chain, why lessac-derived voices are restricted, and the two bases (rdh and hifi_tts_92) that voices are now retrained fromdocs/COMMERCIAL_USE.mdlists the voices whose whole training chain uses recordings licensed for commercial use, what each license asks of you, and which voices are left out and why
-
Docs: list the older voices that drop nasal vowels (U+0303) in
docs/VOICES.md, addgit,python3-devandpython3-venvto the build requirements, quote pip extras for zsh, and describe the CLI's output options in--help