Repository navigation
[0.2.0] - 2026-11-10
Added
- Cached voice state: the trunk state of the voice prefix is computed once per voice and model and reused, so a prime
pass runs only the text rows. A session keeps the voice from its first prime on (re-priming is cheaper), and a
prepared voice gives new sessions the same head start: RustLinnet::voice_state+Session::with_voice_state
(+Linnet::synthesize_with_state,Session::collect,Session::voice_kept), Clinnet_voice_prepare/
linnet_voice_is_prepared, PythonModel.prepare_voice/is_prepared, KotlinLinnetModel.prepare/isPrepared,
SwiftLinnetModel.prepare(voice:)/isPrepared(voice:);load_voice/loadVoice/voiceFromNpyprepare the
voice they return. New public types and methods in Rust:VoiceState(frames,dim,prefix_len,is_for),
FlowLm::build_voice_rows/build_text_rows,TrunkState::truncate/grow. The audio is bit-identical to a full
prime pass, hence to 0.1.x (the golden vectors are unchanged;kept_voice_prefix_is_bit_exactin
runtime/linnet-tts/tests/golden.rschecks fp16 and fp32, with and without guidance, one and four threads). One Core
i9 core, 44-character sentence: prime 14 ms instead of 67 ms, first audio 22 ms instead of 75 ms; preparation 66 ms
once per voice, about 2 MB per voice in memory. Behaviour change for existing users:load_voice/loadVoice/
voiceFromNpynow run one prime pass over the voice (tens of milliseconds, off the main thread like the model load)
and can fail for that reason;Voice.loadplus an explicitpreparekeeps the old split. stream.cprepares the voice and prints the preparation time; the sample apps log the weights and voice load times
separately.bindings/ios/device-smoke.shpasses the sample's arguments after--(devicectl took-autospeakas its own
flag and the launches failed silently) and keeps the continuation lines of the app's log.WEIGHTS_PERMISSIONS.md: written permissions under Section 15.2 of the weights license, starting with one that lets a
product store a prepared voice state on its own device or server.
Fixed
- Android
AudioTrackPlayerplayed nothing on a Snapdragon 662 (Redmi 9T) and most likely on other Qualcomm devices:
its 8 s track buffer made the audio policy route the track to a "direct PCM" output that waits for the whole buffer
to fill, so a short utterance never started anddrain()returned after its 150 ms no-progress timeout (the 0.1.1
drain()change was a symptom of this). The track is now about 160 ms, asks for the low-latency performance mode
and runs on the mixer's fast path; the 8 s queue lives in the player and is fed by a thread, sowrite()still
returns without pacing the synthesis. Consequences for callers:write()copies the chunk (the caller may reuse
its buffer at once); a failure of the track surfaces at the nextwrite()ordrain()as anIllegalStateException
with the original error as its cause, rather than from thewrite()that hit it;write()afterclose()throws;
stopNow()pauses the track at once and the feeder thread flushes it.
Changed
AudioTrackPlayer.timing/LinnetPlayer.timingreport when the first chunk reached the output (onset, first
chunk fully played), andprewarm()opens the output route before the first chunk; the sample apps take
prewarm(Android: intent extrasautospeak,prewarm,repeat; iOS:-prewarm) and log the figures.- Python extension built on pyo3 0.30 (was 0.22.6, the version of three Dependabot advisories that the extension did not
exercise; issue #2). Same API, sameabi3-py39wheel; the extension releases the GIL aroundload,load_voice,
prepare_voice,prime,step,synthesizeanddecode, as 0.1 did for the calls that existed.
Model weights are published separately (release weights-vN, see README.md).