C-Kernel-Engine / TTS bring-up

Kokoro TTS bring-up

P3 transposed-convolution optimization — 2026-11-08

Three alternating pairs on the same resident Kokoro bundle measured 9.779 seconds baseline versus 6.617 seconds candidate median for 5.55 seconds of speech: 32.3% less synthesis time (1.48× throughput). All three WAV hashes matched exactly in every attempt. These are native request timings including WAV writing, excluding model load and frontend planning. The live HTTP deployment was not changed.

VTune attributed 69.3% of sampled CPU time to ordinary convolution, but per-operation wall timers identified dense transposed convolution as the larger latency target: 1.916 of 4.271 seconds on the measured 2.45-second chunk. Parallel CPU work and wall latency are different measurements. Ordinary-convolution tiling trials produced only small gains and were not included in this change.

The checked dense transposed-convolution provider now uses AVX2/FMA where available, reuses channel-local output storage and vectorizes independent taps. Each result retains its input-channel and input-frame accumulation order. Validation, caller-owned scratch, atomic output commit, cropping and the portable scalar fallback remain intact. No model-name branch or new workspace is introduced. Generated libraries must be rebuilt to use it.

The existing nightly dense-deconvolution test now also checks exact FP32 FMA bits at 7/8/9 and 15/16/17-tap boundaries, padded strides, mixed magnitudes, and a rounding-sensitive case that detects unfused multiplication/addition. Existing independent PyTorch, rejection/recovery and generated Qwen codec consumer tests remain separate gates; unavailable pinned assets are SKIP.

This short P3 workload is still slower than real time. It does not certify Ryzen performance, Qwen TTS speed, headset latency or equivalence to OpenVINO. See the retained trial timings, token IDs, hashes and build commands.

Current generated execution status

Long-document planning, asset-free contract: version/v8/tts/prepare_kokoro_document.py partitions up to 1,000,000 UTF-8 bytes at checked sentence or whitespace boundaries, delegates every window to the existing pinned Kokoro text planner, and maps every speech chunk back to an absolute original-document span. It rejects unsupported windows and changed frontend/bundle identities before playback. ck_kokoro_play.py --incremental --document then uses the existing bounded audio spool and keeps its native worker loaded across document chunks. The source-coverage test includes a synthetic document over 10,000 words; it does not claim that a real 10,000-word document was synthesized or heard. An optional private progress file records only chunks whose player has exited successfully. --resume rechecks document, seed, frontend, voice and bundle identities, then restarts at the next chunk. An interrupted sentence may replay when its completion was not acknowledged. Audio files stay in a bounded temporary spool; the whole document WAV is never held in memory. Continuous listening is not certified while synthesis may be slower than audio playback. For a local asset-backed trial, use ck_kokoro_play.py --incremental --document --text-file DOCUMENT --config CONFIG --bundle-dir BUNDLE --player PLAYER --progress-file PROGRESS --session-id DOCUMENT-SESSION, adding --resume after an interruption. Keep a new report path for each invocation. Run python3 scripts/nightly_runner.py --tests tts_kokoro_document_plan tts_kokoro_voice_playback for the asset-free contracts. A real Sony headset trial and connected waveform parity remain separate gates.

Local accessible voice control, first slice: version/v8/scripts/ck_accessible_voice.py can explicitly record a 16 kHz mono WAV from a selected ALSA input, run CKE Whisper, show an editable transcript, require confirmation, submit it to one local CKE Responses server, and speak the correlated answer through a local system-voice command. The client journals submission intent before network delivery and distinguishes a server acceptance ID, completion, explicit rejection and uncertain delivery. It never retries uncertain delivery automatically. The system voice is announced and can be stopped or repeated; this is not Kokoro or Qwen generated speech. The local request targets one configured CKE chat server. It does not route to coding-agent sessions or establish a LinuxUtilities integration.

python3 version/v8/scripts/ck_accessible_voice.py \
  --record --capture-device <explicit-ALSA-Sony-source> \
  --encoder-run-dir <Whisper-encoder-run-dir> \
  --decoder-run-dir <Whisper-decoder-run-dir> \
  --server-url http://127.0.0.1:8080 --model ck-v8 \
  --agent-id cke-chat --project-id cke \
  --journal <private-local-journal.jsonl> \
  --speech-exe <local-system-speech-executable>

Recording starts only after Enter and the temporary microphone WAV is deleted after transcription. --wav accepts an already recorded file; --text exercises the confirmation and server path without audio. The speech executable must accept the answer as one argument and block while speaking. The user must select the desired output device in the local audio configuration. The fake-device/HTTP nightly suite tests control contracts; real Sony input, playback, latency and ten-turn acceptance remain NOT_TESTED.

Whole-text WAV command (bounded, diagnostic): version/v8/tts/speak_kokoro_text.py accepts a text file or standard input, runs one full-context pinned English phonemization pass, and sends its checked chunks to one persistent native host. The host appends only returned valid PCM samples and publishes one 24 kHz mono WAV after all chunks succeed. It discards partial output after a rejected chunk; the next sequence can run without reloading weights. Python owns text preparation and chunk requests; circuits and generated C still own all neural stages. This is not streaming playback or certified connected waveform parity. The output remains diagnostic until listening and independent waveform checks pass. Reproduce with PYTHONPATH=<pinned-frontend-site-packages> <pinned-python> version/v8/tts/speak_kokoro_text.py --text-file server_summary.txt --config <pinned-kokoro-config> --bundle-dir <current-runtime-range-bundle> --output /tmp/kokoro-summary.wav --report /tmp/kokoro-summary.json. A bundle built before persistent-session support must be rebuilt from the pinned model assets; the command verifies the bundle through its native dispatcher and reports each source span and sample count. Run the cheap contract lane with python3 scripts/nightly_runner.py --tests tts_native_kokoro_wav_host tts_kokoro_whole_text_wav.

Technical decimal pronunciation: The pinned G2P can omit the audible decimal point inside a version-shaped token such as Qwen3.8 and after a leading plus sign such as +3.5. The checked text frontend now records an explicit pronunciation expansion for embedded versions and signed decimals, preserving each original source span and rejecting incomplete pronunciations before synthesis. The 1,133-word technical reply still plans into 316 chunks within the declared ID capacity. In a short, same-model, same-seed generated-audio comparison, CKE Whisper transcribed the old Qwen3.8 bundle. WAV as “Q and 3, 8 bundle” and the expanded WAV as “QN 3.8 bundle.” Both old and new signed-decimal WAVs transcribed as “minus 3.5, not plus 3.5”; this is evidence of a corrected phoneme contract, not a demonstrated ASR improvement for that phrase. The full long-reply WAV and its exact-number score have not been rerun with the changed frontend. Waveform numerical parity and human listening remain separate.

Local Kokoro playback adapter: the confirmed voice client can now select --kokoro-config <pinned-config> --kokoro-bundle-dir <range-bundle> --audio-player <local-player> in place of --speech-exe. It sends the complete answer to CKE's checked whole-text command, verifies its report and PCM WAV before starting the player, and owns both processes in the client's stoppable group. This provides a bounded local playback trial, not streaming audio: the entire WAV is synthesized before playback. Each selected native worker keeps its weights loaded across its assigned chunks of one answer; the adapter starts fresh workers for the next answer. Asset-free playback and invalid-output checks run in standard nightly as tts_kokoro_voice_playback. Sony playback, full-reply latency and connected waveform parity remain separate acceptance gates.

Native Kokoro VTune profile (2026-11-06): Profiling two generated native requests on an Intel i7-14700T, with the pinned af_heart bundle and the selected eight-worker AVX2 Conv1D provider, produced the same WAV hashes as the unprofiled session. VTune attributed 34.9% of sampled CPU time to Conv1D, 25.5% to checked linear projections, and 13.2% to dense transposed convolution. The P-core top-down sample reported 7.1% memory bound and 36.1% core bound; these figures identify a compute-focused experiment on this host, not a general roofline conclusion. The next bounded experiment is an explicitly selected reusable linear provider, benchmarked against the existing scalar FP64 reduction contract with complete-WAV and rejection parity. No performance improvement or headset result is claimed by this profile. The retained measurements and limitations are in version/v8/tts/evidence/kokoro_vtune_native_hotspots_20261106.json.

Checked linear one-pass optimization: The reusable FP64 linear provider now checks all inputs and a conservative absolute output bound before computing each output once. When the bound cannot prove safety, the original two-pass result staging remains; rejected calls still leave output untouched. On the pinned 36-by-128-to-768 projection fixture, median kernel time fell from 4.2248 to 2.1458 ms with bitwise-identical output. Two paired native Kokoro sessions using the same loaded model package, voice, seeds and phoneme IDs took 13.5087/13.4525 seconds before and 11.1428/11.0564 seconds after, a 17.66% reduction in median elapsed time. Both complete WAV hashes matched exactly. These are two samples on one Intel host, not a long-document or headset latency result. Evidence and limitations are retained in version/v8/tts/evidence/kokoro_linear_one_pass_20261106.json.

Incremental long-reply execution: --kokoro-incremental keeps the existing one-worker path by default. --kokoro-synthesis-workers 3 opts into three independently loaded native workers for a long reply. The adapter submits at most one checked chunk per worker, validates each 24 kHz PCM16 WAV, retains source spans and WAV hashes, and plays chunks in source order. It reports first playback start, valid samples, gaps and actual model loads through ck_kokoro_play.py --report <private-report.json>. A failed chunk stops publication; SIGTERM during synthesis or playback kills the owned workers and player. The planner retains its 8,192-byte and 512-chunk bounds.

Incremental reader identity: Each completed chunk report now binds its checked source-codepoint span and source text to the whole-source SHA-256, bundle identity, optional agent/request/session IDs, and start/end sample offsets in the concatenated PCM timeline. Resume keeps the prior completed-sample offset and rejects a changed agent or request identity. The optional IDs are limited to letters, digits, underscore and hyphen; both must be supplied together. This gives a reader enough identity to reject late audio or stale highlighted text from an older reply. These offsets describe generated PCM order, not measured audible onset; headset timing still requires a device-backed trial. On 2026-11-07 the current 319-word server_summary.txt (SHA-256 a0134675eadebe16ebc938eb70213fe6eb84630c5505ca979b90fe592eec5a18) planned into 87 checked chunks spanning every source character with 5–40 phoneme IDs per chunk. This is a planning PASS; P3 synthesis and Sony playback were NOT_TESTED because p3 did not resolve from this host. The plan identity and limits are retained in version/v8/tts/evidence/kokoro_319word_summary_plan_20261107.json.

Playback stop and latency diagnostics: The incremental player and each native worker now run in private process groups. Cancellation stops the groups, including audio or synthesis children started by wrappers. Asset-free regressions verify that parent and child processes stop. The report separates planning, native-worker startup, synthesis underrun gaps, controller/player handoff delay, and player-process lifetime. first_playback_start_seconds is a process-launch timestamp, not a measured first audible sample; the report explicitly marks first_audible_audio as not_measured. Real headset listening and audible stop latency still need device-backed measurement. On this Intel i7-14700T host, a two-chunk generated request produced 5.125 seconds of audio. With a non-audible player timed to each WAV, one loaded worker took 19.130 seconds end to end with a 4.444-second gap, of which 4.443 seconds was synthesis underrun; two loaded workers took 14.976 seconds with a 0.001-second gap. First player launch was 9.408 versus 9.686 seconds, and both chunk WAV hashes matched. These are single observations, not a headset or sustained-throughput certificate. The retained timing report records the bundle and limitations.

On P3 with the eight-worker AVX2 Conv1D bundle, the same 52-word repeated phrase produced 647,400 samples and identical WAV hashes with one or three synthesis workers. Three workers reduced wall time from 68.2 to 36.3 seconds and simulated playback gaps from 32.43 to 0.012 seconds; first playback began at 8.91 versus 8.44 seconds. Peak process-tree PSS rose from 2.83 to 7.60 GiB. A 200-word trial completed 50 ordered chunks, 103.75 audio seconds and 0.051 seconds of simulated gaps. A 1,000-word trial completed 250 contiguous source spans, 12,450,000 samples (518.75 audio seconds) in 532.26 seconds, with 0.256 seconds of total gaps and a 0.0038-second maximum gap. Measured stop-to-process-release times were 0.566 seconds during synthesis and 0.767 seconds during playback, with no live descendants or completion report. The scoped P3 evidence records identities and limits; the earlier one-worker trial remains historical.

The player in these measurements was non-audible and slept for each WAV's exact duration. The input repeated one known phrase; it does not certify natural sentence joins, arbitrary technical text, Sony headset playback, 10,000 words or connected PyTorch waveform parity. That numerical verdict remains FAIL. The three-worker option is an explicit memory tradeoff, not the default accessibility setting.

Technical paths: the pinned G2P left the leading slash in the real server summary unspoken and represented its remaining path as one 230-phoneme token, beyond the 48-ID native request limit. The text frontend now applies an explicit path pronunciation policy before checked chunk planning. Natural mode speaks path components and separator names, spelling a component when its pinned pronunciation exceeds one request; --technical-mode exact spells each path character. A leading slash is spoken as “root slash.” Each pronunciation expansion records its original source span, and every chunk still passes the native ID-capacity check. The current 387-word summary snapshot plans into 111 natural-mode or 116 exact-mode chunks with complete source-span coverage. Natural-mode generated execution played 6,044,400 samples (251.85 audio seconds) through a non-audible duration-matched player in 263.40 seconds wall time, with first simulated playback at 9.27 seconds and 0.131 seconds of total gaps. Use ck_kokoro_play.py --text-file server_summary.txt --config <pinned-config> --bundle-dir <verified-bundle> --player <audio-player> --incremental --synthesis-workers 3; the scoped P3 evidence retains identities and limits without committing the private summary text. This is execution evidence; URL syntax, unsupported symbols, natural listening quality, Sony playback and connected waveform parity remain separate checks. The same mode is available as --kokoro-technical-mode exact in the confirmed voice client.

Measured parallel Conv1D bundle option: the offline bundle builder can select the existing checked avx2_parallel Conv1D map with --conv-provider avx2_parallel --conv-workers 4. The native host creates one worker pool per loaded session and passes it into the circuit-declared generated entry; generic lowering and Kokoro arithmetic are unchanged. On P3, one loaded 64-token-capacity library produced byte-identical serial AVX2 and four-worker WAVs for 25-ID → 8-ID → 25-ID requests. Warm 25-ID synthesis and WAV writing took 11.18 seconds serial versus 6.14 seconds parallel; the 8-ID request took 7.07 versus 3.56 seconds. The build identities, request timings and WAV hashes are retained in the P3 measurement. This remains slower than real time and does not certify pinned-PyTorch waveform parity, headset playback or a 1,000-word trial.

Pinned text preparation and chunk planning: version/v8/tts/prepare_kokoro_accessibility_text.py uses pinned Kokoro 0.9.4/Misaki 0.9.4 English G2P, its US lexicon and eSpeak fallback to turn ordinary text into phoneme-ID requests. It checks code, dictionary, eSpeak library/data, vocabulary and bundle identities; keeps every source span; and rejects unspoken or unsupported input. The first committed reference cases cover the previously rejected “words,” an abbreviation, numbers, technical terms, a list, an equation and a multi-sentence reply. The current pinned frontend leaves the dollar sign in “$1.25” unspoken, so the planner rejects that expression rather than silently speaking a different amount. An opt-in range bundle permits individual requests of 3–48 IDs; the planner records each chunk's source text, IDs and voice row. The cheap fixture test is registered in standard nightly; live pinned-oracle and two-chunk generated-audio checks run only with their assets and otherwise report NOT_TESTED. The two-chunk local run produced 56,400 and 66,600 samples at 24 kHz, with about 14 and 16 seconds of synthesis on that host; these are execution measurements, not a latency target. Reproduce the cheap lane with python3 scripts/nightly_runner.py --tests tts_kokoro_accessibility_text_plan, or enable the live/audio lanes with CKE_TTS_RUN_PINNED_ACCESSIBILITY_TEXT=1 CKE_TTS_RUN_ACCESSIBILITY_TEXT_AUDIO=1 CKE_TTS_ACCESSIBILITY_CONFIG=<pinned-config> CKE_TTS_ACCESSIBILITY_BUNDLE=<range-bundle> python3 -m unittest tests.test_v8_kokoro_accessibility_text_plan in the pinned frontend environment. That older test produces a plan and individual WAVs. The whole-text command above uses one retained native worker and one aggregate WAV. Queued playback, Sony device handling and in-graph cancellation remain unestablished. Connected waveform numerical parity remains FAIL. Python performs declared text conversion only; the model's neural schedule remains in generated C.

Bounded native number preparation: the dictionary frontend now expands isolated unsigned cardinals 0–20 to their English words, then obtains phoneme IDs from the hash-pinned Misaki US gold dictionary. It rejects leading zeros, decimals, grouped digits, larger values, attached letters, unknown words and over-capacity requests with explicit reasons before dispatch. All 21 number spellings have a cheap routing test in standard nightly. In an optional asset-backed lane, “I have 2.” produces a 39,000-sample native generated WAV and CKE's public generated Whisper path returns “I have two.” A second asset-backed session case cancels a longer request, then synthesizes this number phrase twice with the retained seeded WAV hash. These check bounded execution, transcript fidelity, process-level synthesis interruption and recovery; they do not prove full context-sensitive Misaki G2P or independent Kokoro waveform parity. Other abbreviations and longer replies remain unsupported until their normalization and segmentation contracts are verified. Run the optional cases with the standard nightly selection CKE_TTS_RUN_WHISPER_ROUNDTRIP=1 CKE_TTS_RUN_NUMBER_TEXT_FULL=1 CKE_TTS_RUN_NUMBER_SESSION_FULL=1 CKE_TTS_ROUNDTRIP_BUNDLE_DIR=<range-bundle> CKE_TTS_ROUNDTRIP_FRONTEND_DIR=<fresh-number-frontend> CKE_TTS_ROUNDTRIP_WHISPER_ENCODER_DIR=<generated-encoder> CKE_TTS_ROUNDTRIP_WHISPER_DECODER_DIR=<generated-decoder> python3 scripts/nightly_runner.py --tests tts_kokoro_native_speech_session tts_kokoro_whisper_roundtrip.

Opt-in long-token and real-summary P3 trial: a pinned 359-word local summary planned into 90 checked chunks with complete source-span coverage. Normal multi-token chunks stayed at or below 40 IDs; only the indivisible “35,136” number and a commit hash used 48 and 47 IDs. The prior 77-chunk plan had let an ordinary 46-ID phrase reach generated execution, where it returned CK_AUDIO_EXTENT_LIMIT; its partial WAV was discarded. Every revised chunk passed isolated native preflight. One loaded generated session then produced one 4,905,000-sample, 24 kHz mono WAV (204.375 seconds of audio) in 647.011 seconds, including 2.71 seconds of text planning. Selected PCM segments at the first, number, hash and final chunk matched fresh single-request execution byte for byte. The retained evidence records artifact and input hashes; the local summary text itself is not committed. Counts 41–48 remain execution-only; connected PyTorch waveform parity is still FAIL, and headset listening is NOT_TESTED. This run is substantially slower than playback and does not establish 10,000-word support.

Known-text Kokoro → Whisper round trip: an optional asset-backed standard-nightly suite passes the actual native Kokoro WAV through CKE's public audio command to its generated Whisper encoder and decoder. The public entry imports the Whisper runtime by its importable module name so persistent worker processes can start under Python's spawn method. With the pinned af_heart voice and seed 7, “Hello.” (8 phoneme IDs, 32,400 samples) transcribes as “Hello.” and “Hello there.” (12 IDs, 36,000 samples) transcribes as “Hello there.” The suite checks canonical 24 kHz mono PCM16 geometry, input WAV hash, generated-library identities, and exact transcript text after trimming outer whitespace and case-folding. It reports TTS execution, ASR execution, and transcript fidelity as separate cases; missing assets report NOT_TESTED. A separate cheap nightly case tests the public worker import contract without model assets. This is a small known-text integration test, not independent Kokoro waveform parity, a full G2P test, or general speech intelligibility certification. The connected waveform comparisons described below still FAIL their pinned PyTorch numerical ceiling. Run CKE_TTS_RUN_WHISPER_ROUNDTRIP=1 CKE_TTS_ROUNDTRIP_BUNDLE_DIR=<range-bundle> CKE_TTS_ROUNDTRIP_FRONTEND_DIR=<pinned-frontend> CKE_TTS_ROUNDTRIP_WHISPER_ENCODER_DIR=<generated-encoder> CKE_TTS_ROUNDTRIP_WHISPER_DECODER_DIR=<generated-decoder> python3 -m unittest tests.test_v8_kokoro_whisper_roundtrip.

Long technical-reply diagnostic (2026-11-06): The retained version/v8/test_assets/kokoro_long_reply/technical_summary_20261106.txt contains 1,133 varied words, including the then-current 264-word server summary. Its SHA-256 is 0bbca9d04ece5e012929adcd8093f6e8117e2c9e93a6489e54b0c4e65eb4bdf7. The pinned planner covered every source span in 316 checked chunks of at most 40 IDs. One persistent generated Kokoro worker produced 667.825 seconds of mono 24 kHz PCM16 audio (SHA-256 6ee6c534329b01d42a40e1f72248d70701a3bd26159c44ba561d69ae5daa5483) in 1,608.12 seconds; the first chunk took 9.33 seconds. Native CKE resampling supplied 16 kHz audio to generated Whisper base. Fixed 30-second decoding returned 766 words and 37.44% normalized WER. Timestamp-seek decoding covered the complete audio in 25 contiguous windows, returning 1,150 words and 6.24% WER under identifier-aware normalization. Exact-number fidelity still FAILS: two 3.8 occurrences were absent, while other unmatched numbers appeared. PR-1035 is treated as an identifier, not a negative number. The small known-text round trip remains separate. version/v8/tts/evaluate_kokoro_whisper_long_reply.py verifies source spans, artifact hashes, resampling linkage, window coverage, WER and exact numbers; its ten asset-free integrity controls run in standard nightly. The full run is diagnostic, with connected Kokoro waveform parity unresolved and human listening NOT_TESTED. The audio and model assets are not committed; their identities are retained in the evaluator report on P3. Timestamp decoding should be used for long-audio diagnosis, and aggregate WER cannot override a critical-number failure.

Long-reply decimal rerun and compound-number boundary: On merged main after explicit version pronunciation, the same 1,133-word source again planned into 316 checked chunks and produced 16,031,400 samples (667.975 seconds) through one persistent generated Kokoro worker in 1,600.95 seconds. The new WAV SHA-256 is 08f4367079ac6710f00504e2ca2c96a13c5d425f6b879f8a34adb80b058a55fc. Its 314 unaffected chunks match the previous WAV byte for byte when aligned by chunk; only the two Qwen3.8 chunks changed. Generated timestamp-mode CKE Whisper consumed the complete resampled audio in 24 windows and returned 1,158 words with 6.15% normalized WER. Both 3.8 occurrences are present, but exact-number fidelity still fails. The remaining text says “forty two” and “forty seven”; the planner split each tens/unit pair across a chunk boundary, and Whisper rendered them as “40, two” and “40. Seven.” The checked planner now keeps such pairs in one chunk. In a same-text, same-model generated-audio comparison, CKE Whisper changed from “40, 2” and “40. 7” to “42” and “47.” The evaluator accepts intact spoken compounds as their digit values while rejecting split or changed values, and checks chunk voice rows, source spans, sample totals and numeric order. The complete document was then regenerated after this second boundary fix: 316 chunks, 16,035,000 samples (668.125 seconds), WAV SHA-256 768df814039b1ec881df554ae138a066ccfcdb746f9869f8920af87981440510, and 1,603.53 seconds of synthesis. Only four boundary-adjacent chunks changed; the other 312 remained byte-identical to the decimal-only run. Generated CKE Whisper consumed all 24 timestamp windows and returned 1,156 words with 6.41% normalized WER. The exact-number sequence now matches the source, with no missing or unexpected values. This is an execution and transcript-fidelity pass, while human listening is not tested in this run and pinned connected waveform parity remains an unresolved failure. The evaluator now requires typed per-chunk metadata and binds each planned text field to its source slice, so matching omissions cannot produce PASS. Its exact-number gate recognizes a bounded signed tens/unit grammar; unsupported higher-order or spoken-decimal constructions are reported as incomplete rather than certified. The 316/317-chunk variation was traced to a second pinned KPipeline construction: its EspeakFallback initialization hit a temporary-library disk-quota error, and Kokoro silently selected a different neural fallback. The frontend now reuses one checked Espeak pipeline per process, pins the Espeak Python adapter identity, and rejects fallback substitution rather than changing phonemes. A pinned long → other request → long replay yields identical phonemes and chunks. The retained WAV remains bound to its hashed 316-chunk plan; first-time Espeak initialization can still fail explicitly when host resources are exhausted.

Current variable-length diagnostic waveform: the circuit now composes the second generator residual pool, final activation, post convolution, magnitude/phase head and inverse STFT after CKE-generated upstream features. One generated native entry returns checked sample counts to a native PCM16 WAV host. The same loaded library is tested with real 8-, 13- and 36-ID af_heart requests and short → intermediate → long → short replay; the 13-ID Hello there. case has an independently captured pinned full-model reference. The 13-ID standalone WAV uses captured Gaussian input; its listenable artifact is tests/fixtures/tts/kokoro_runtime_waveform_hello_there_13_diagnostic.wav, with model, code, generated-library, package and output hashes in version/v8/tts/evidence/kokoro_runtime_waveform_20261018.json. Execution and safety PASS; connected numerical parity FAILS. Eight-, 13- and 36-ID waveform maximum differences are 0.010313, 0.002095 and 0.007652 against direct pinned PyTorch 2.8 captures, under the unchanged 2e-4 diagnostic ceiling. Their waveform RMSE values are 3.38e-4, 8.15e-5 and 2.42e-4 respectively; those aggregate measures do not erase the worst-case failures. The host validates the returned valid sample count separately from its allocated waveform capacity. Set CKE_TTS_RETAIN_DIR=/path/to/output when running the waveform suite to retain the generated library, sparse input package, WAV and reproduction manifest for listening. The native package contains weights and declared external inputs only; the generated entry computes all intermediate neural tensors. This captured-noise lane is a diagnostic phoneme-to-WAV path; the separate native seeded request lane below is not certified arbitrary-text speech. Reproduce with python3 version/v8/tts/build_kokoro_runtime_waveform_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_waveform; this suite runs in standard nightly.

Native variable-length text trial: the offline bundle builder packages pinned BUMP weights, the af_heart voice bank and one 64-token-capacity generated waveform library. The native dispatcher accepts the separately captured 8-, 13- and 36-ID request lengths and rejects other counts. A small test lexicon reproduces the captured 8-, 13- and 36-ID request tensors. The pinned full US-gold dictionary maps “Hello there.” to an unsupported 12-ID request, which is rejected explicitly; “Hello, there.” maps to a supported 13-ID request and produces a native WAV. The C host selects the corresponding voice row, binds the valid token length, fills request-owned seeded Gaussian noise, and writes only the returned sample count. Local AVX2/FMA text runs produced 32,400, 36,600 and 61,800 samples at 24 kHz; 8 → 13 → 36 → 8 replay matched retained CKE seeded WAV hashes. The speech supervisor has a process-level stop, error and recovery path. Each request starts a new host process, so weights and library mappings are reloaded; persistent loading and headset playback remain future work. These supported phrases demonstrate execution, not arbitrary English coverage or independent waveform parity. Reproduce the bundle with python3 version/v8/tts/build_kokoro_dispatch_bundle.py --bump-dir <pinned-bump> --voice-bank <af-heart.ckvoice> --output-dir <new-bundle> --runtime-lengths --conv-provider avx2_fma, then run the optional asset-backed test with CKE_TTS_RUN_RUNTIME_TEXT_FULL=1 CKE_TTS_RUNTIME_TEXT_BUNDLE_DIR=<new-bundle> python3 -m unittest tests.test_v8_kokoro_native_lexicon_text. The test's small lexicon preserves pinned IDs but does not claim full Misaki context-dependent pronunciation.

Experimental short-text length coverage: the runtime bundle can opt in to individual additional phoneme counts with --runtime-lengths --experimental-count 12, or to the bounded 3–48 count range with --runtime-lengths --runtime-experimental-range. Both modes reuse the same generated 64-token-capacity graph and CKTTS004 package; the builder checks that the pinned voice bank contains every selected row. The default remains 8, 13 and 36 IDs. The bundle manifest separates captured counts from execution-only counts. With the pinned dictionary, “Hello there.” yields 12 IDs and produced two identical native seeded 36,000-sample WAVs using the generated library; the 12-ID waveform hash was 53dc2fa85f9cf190bc59e51689e45206ca213daad87a71f9024c1bc8b5cafa13. This is bounded execution and deterministic replay, not direct pinned-model numerical parity or full English G2P. Unsupported words, counts outside 3–48, and requests exceeding predicted frame/sample capacity still reject. The optional asset-backed test runs through standard nightly when supplied a range bundle and pinned frontend; without them it reports NOT_TESTED with a reason. Reproduce with python3 version/v8/tts/build_kokoro_dispatch_bundle.py --bump-dir <pinned-bump> --voice-bank <af-heart.ckvoice> --output-dir <new-bundle> --runtime-lengths --runtime-experimental-range --conv-provider avx2_fma.

Earlier variable-length second source join: one loaded generated native entry carries 8-ID and 36-ID phoneme requests through the second source convolution, style-conditioned source residual block and join with CKE's own reflected main branch. Both branches consume the checked 6,481/12,361-frame extent with a separate 15,361-frame physical capacity. Short → long → short replay, exact native branch addition, untouched padding, nonfinite-input and over-capacity rejection, and recovery pass. Direct pinned PyTorch 2.8 full-model checkpoints show connected join maximum errors of 0.02531 and 0.04074 under a 2e-4 diagnostic ceiling, so connected numerical parity FAILS. Captured Gaussian remains diagnostic; the second-stage residual pool, spectral head and variable-length WAV remain unfinished. Reproduce with python3 version/v8/tts/build_kokoro_runtime_stage1_source_join_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_stage1_source_join; the suite is registered in standard nightly.

Earlier variable-length second generator ingress: one loaded generated native entry now carries 8-ID and 36-ID phoneme requests through the first residual pool, second-stage LeakyReLU, checked sixfold dense transposed convolution and one-frame left reflection. The two requests publish 6,480/6,481 and 12,360/12,361 valid deconvolution/reflection frames while preserving separate 15,360/15,361 physical capacities. Short → long → short replay, exact reflected layout, untouched padding, nonfinite-input and over-capacity rejection, and recovery pass. Direct pinned PyTorch 2.8 captures show connected reflection maximum errors of 0.01083 and 0.01718 under a 2e-4 diagnostic ceiling, so connected numerical parity FAILS. Captured Gaussian remains diagnostic; the second-stage residual pool, spectral head and variable-length WAV remain unfinished. Reproduce with python3 version/v8/tts/build_kokoro_runtime_stage1_ingress_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_stage1_ingress; the suite is registered in standard nightly.

Earlier variable-length first generator residual pool: one generated native entry now continues from phoneme IDs and request-specific af_heart conditioning through the first main/source join, all three first-stage main residual blocks and their three-way mean. The same loaded library runs 8 → 36 → 8 IDs at checked 1,080/2,060-frame extents with a separate 2,560-frame physical capacity. Native sum/mean checks, finite output, untouched mean padding, repeated output, nonfinite-input rejection and recovery pass. Pinned PyTorch 2.8 direct block captures and their explicit mean remain independent oracle evidence: connected mean errors are 0.11312 and 0.23652 maximum under a 2e-4 diagnostic ceiling, so connected numerical parity FAILS. Captured Gaussian remains a diagnostic input; later generator stages and variable-length WAV are unfinished. Reproduce with python3 version/v8/tts/build_kokoro_runtime_stage0_pool_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_stage0_pool; the suite is registered in standard nightly.

Earlier variable-length first generator join: one generated native entry now runs 8-ID and 36-ID requests from phonemes through the first main upsample, CKE-generated F0, source STFT/convolution, all three first source-residual pairs and the checked main/source sum. The source convolution and residual consumers use the same checked 10× frame extent as the main branch; the duplicate source-frame producer was removed in this circuit. One loaded library passes 8 → 36 → 8 with 1,080 and 2,060 valid join frames, untouched output padding, exact native branch-addition checks, nonfinite-input rejection and recovery. Direct pinned full-model joins still differ by 0.11597 and 0.19440 maximum under a 2e-4 diagnostic ceiling, so connected numerical parity FAILS. Captured Gaussian remains a diagnostic input. This is not a variable-length WAV or certified speech. Reproduce with python3 version/v8/tts/build_kokoro_runtime_stage0_join_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_stage0_join; the suite is registered in standard nightly.

Earlier variable-length source/STFT boundary: one generated entry now carries 8-ID and 36-ID requests from phonemes through the first main generator upsample, CKE-generated F0, harmonic source, STFT and first source convolution. The same library runs 8 → 36 → 8, publishes checked source, STFT and convolution extents of 32,400/6,481/1,080 and 61,800/12,361/2,060 respectively, leaves capacity padding untouched, and recovers after a rejected nonfinite Gaussian input. Captured Gaussian remains an explicit diagnostic input. Direct pinned full-model comparisons show raw phase differences of approximately 2π and first source-convolution maximum errors of 0.20474 and 0.26074. These are numerical FAIL results, distinct from generated execution and safety PASS; the graph is not a certified source branch or a variable-length WAV. Reproduce with python3 version/v8/tts/build_kokoro_runtime_source_stft_conv_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_source_stft_conv. The suite is registered in standard nightly.

Earlier variable-length source projection beside the first generator upsample: one generated native entry now executes both branches from request phoneme IDs and supplied af_heart conditioning. CKE's generated F0 drives the harmonic source, linear projection and tanh; the first generator upsample executes in the same entry. The pinned 8-ID and 36-ID requests produce 32,400 and 61,800 source samples, with direct full-model source errors of at most 2.85e-4 and 4.28e-4 under the existing 1e-3 source bound. F0 errors remain below the checkpoint-specific 5e-4 bound. The same loaded library replays 8 → 36 → 8, preserves output padding, rejects nonfinite Gaussian input without publishing lengths, and recovers on a later request. Its F0 tensor retains a 6,400-frame physical capacity while checked source output remains bounded to 76,800 samples. Gaussian input is captured from the pinned reference for arithmetic comparison; native seeded noise, STFT, source residual convolution, branch join, complete variable-length waveform and playback remain separate gates. Reproduce with python3 version/v8/tts/build_kokoro_runtime_source_projection_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_source_projection; the connected suite runs in standard nightly.

Earlier variable-length first generator upsample: one generated native entry now connects the complete runtime acoustic decoder to the first generator activation and dense transposed convolution. The same loaded library runs 8 → 36 → 8 phoneme-ID requests with af_heart rows 5 → 33 → 5. The checked 2A input extents are 108 and 206; the generated 20A output extents are 1,080 and 2,060, within a declared 2,560-frame output capacity. Direct pinned PyTorch 2.8 full-model captures differ by at most 1.82e-5 and 2.48e-5, respectively, under the 5e-5 stage-specific bound. Output padding remains untouched, and a rejected request publishes no extent before successful recovery. The decoder retains its 6,400-frame physical input stride; generator capacity is separately bounded, so larger requests can be rejected before the upsample writes. This is not the complete waveform generator or a variable-length WAV. Reproduce with python3 version/v8/tts/build_kokoro_runtime_generator_stage0_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_runtime_generator_stage0; the suite is registered in standard nightly.

Earlier variable-length complete acoustic decoder: one capacity-64 circuit runs from phoneme IDs through the complete acoustic decoder, including all four decode blocks and the final A→2A upsampling block, in one generated native entry. The same loaded library runs an 8-ID “Hello.” request (A=54, 2A=108, af_heart row 5), then a 36-ID request (A=103, 2A=206, row 33), then the 8-ID request again. Both lengths use their own direct pinned PyTorch 2.8 full-model decoder captures, with request-specific predictor and decoder styles supplied at the declared input boundary; the largest final-output differences are 3.63e-5 and 2.86e-5 respectively, under the existing checkpoint-specific decoder bounds. The test checks untouched padding, repeatability, invalid lengths, failed style conditioning, recovery, and a deliberately wrong final-block weight. This earlier entry stops at the decoder; voice-row selection within generated execution and complete variable-length waveform generation remain unfinished. The exact-length diagnostic WAV graphs and unresolved connected waveform parity remain separate. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_decoder_complete; this suite runs in standard nightly.

Earlier variable-length first acoustic-decoder block: one capacity-64 generated C entry now continues through the first style-conditioned decoder residual block after CKE's own decoder-ingress output. Its normalization, activation, convolution, shortcut, and residual joins consume the checked A valid extent while keeping the 3,200-frame physical stride and capacity separate. One loaded library runs 2 → 36 → 64 → 2 phoneme-ID requests with repeatable short output, untouched padding, rejected invalid style/token count, and recovery. For the pinned 36-ID request (A=103), all six block checkpoints match direct full-model PyTorch hooks under the existing per-checkpoint bounds; the final residual output differs by at most 2.49e-6. X-Ray checks its selected residual contract, valid extent, physical stride, and resolved library identity. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_decoder_encode; the suite is registered in standard nightly. Other input lengths have execution and safety evidence only. Decoder style remains pinned to the 36-ID fixture in this test. At this earlier milestone, the rest of the decoder and complete waveform used separately compiled exact-length graphs; the current complete variable-length acoustic decoder is described above. Connected waveform parity remains unresolved.

Earlier variable-length decoder ingress: one capacity-64 generated C entry connects CKE-generated complete F0/noise curves and acoustic text features to both decoder downsampling convolutions, the 514-channel text/F0/noise join, and the 64-channel text residual projection. The circuit binds the checked A and 2A valid extents separately from 3,200/6,400-frame capacity and physical strides. One loaded library handles 2 → 36 → 64 → 2 phoneme-ID requests with preserved padding and repeatable short output. At 36 IDs (A=103, 2A=206), all five outputs match direct pinned full-model hooks under their existing per-checkpoint bounds; the largest error is 1.57e-5. Wrong-weight and failed-provider controls check that bad connections are detected and failed calls publish no lengths. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_decoder_ingress; the suite is registered in standard nightly. Other ID lengths have execution and safety evidence only.

Earlier runtime-length boundary (complete prosody): one capacity-64 generated C entry now runs from phoneme IDs and pinned voice conditioning through both complete F0 and noise branches. The checked A frame count drives both first residual blocks; a checked A→2A operation validates the output extent before the second blocks and final projections write. The planner reserves for at most 3,200 A frames and 6,400 output frames, while valid extents and physical strides remain distinct. The test arena is 542,225,664 bytes. One loaded library executes 2 → 36 → 64 → 2 ID requests with repeatable short output, untouched output padding, failure propagation and recovery. For the 36-ID request, A=103 and 2A=206; direct pinned full-model PyTorch hooks differ by at most 3.52e-6 and 2.99e-6 after the first F0/noise residual blocks, and 3.25e-4 and 5.25e-6 at the complete F0/noise outputs, under 1e-4 first-block bounds and final-output bounds of 5e-4 for F0 and 1e-4 for noise. Other ID lengths have execution and safety evidence, not direct complete-prosody oracle parity. The subsequent decoder-ingress circuit extends this variable-length graph through input preparation; the remaining acoustic decoder, source and waveform generator still use separately compiled exact-length graphs. The selected style vector remains the pinned 36-ID fixture selection in this test. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_prosody_complete; the suite runs in standard nightly.

Current waveform boundary: two explicitly compiled, exact-length af_heart graphs produce complete generated native waveforms: an 8-ID “Hello.” capture yields 32,400 samples and the established 36-ID capture yields 61,800 samples, both at 24 kHz. The same process keeps both generated libraries loaded and replays short → long → short without compiling per request; the repeated short FP32 waveform is exact. A capacity rejection leaves the short output and published lengths untouched, and the next short request succeeds. The standalone C host writes a 24 kHz PCM16 WAV for each exact length; the new short WAV matches the in-process generated samples after PCM conversion. The eight-ID asset-backed test also generates request-seeded Gaussian noise in CKE, then compares the native host's PCM with the same seeded generated entry. That checks short-graph standalone replay without claiming PyTorch RNG or waveform parity. These are separate arenas and exact token counts, not a single runtime-valid-length graph or a padding/masking bucket policy. The captured-noise fixture supplies already-selected voice vectors; the CKTTS003 native host described below selects the voice-bank row before generated execution. A separate asset-backed check confirms that the eight-ID and 36-ID vectors exactly match rows 5 and 33 of the hash-pinned af_heart bank. Connected waveform numerical parity still fails against the pinned full model (maximum absolute errors about 0.01031 for eight IDs and 0.007652 for 36 IDs). Reference-captured Gaussian inputs isolate arithmetic; seeded native Gaussian has separate repeatability evidence. Full context-sensitive text preparation, application playback and in-graph cancellation remain unfinished; the default native exact-length selector described below supports the baseline 8 and 36 IDs; additional lengths require explicit offline bundle export and separate evidence. This is experimental phoneme-to-WAV evidence, not arbitrary-text TTS or a certified accessibility session. Reproduce the two-length asset-backed replay with CKE_TTS_RUN_TWO_LENGTH_WAVEFORM=1 python3 -m unittest tests.test_v8_kokoro_waveform_two_lengths; without the asset-backed switch, standard nightly runs the circuit-authoring check and reports the full replay as SKIP. When run, the standard numerical-case inventory records execution PASS separately from the known connected waveform numerical FAIL; the pinned voice-bank check is a separate asset-backed case.

Checked runtime token-length header proof: one capacity-36 generated entry now validates a request-owned token count and runs the Kokoro embedding and input projection for valid 8 → 36 → 8 prefixes. The two outputs match the committed pinned PyTorch 36-token capture over each valid prefix (worst absolute error 9.54e-7); unused capacity stays untouched, and zero/excess lengths, malformed IDs, and contradictory planned capacities fail before publishing output validity. This uses the existing checked extent provider and operation-local scalar bindings; the embedding map now declares the storage spans needed for planner validation. The eight-token comparison is a prefix of the 36-token capture, not a distinct eight-token full-model oracle. The complete encoder, duration/prosody path, and waveform deployment still use separately compiled exact token counts. Reproduce the bounded proof with python3 -m unittest tests.test_v8_kokoro_runtime_header; the suite is registered in standard nightly.

Checked runtime token-length first-layer proof: one capacity-36 generated entry now runs the complete first ALBERT layer for valid 2 → 8 → 36 → 8 token prefixes. A checked length producer feeds embedding, rowwise projections, attention, LayerNorm and GELU; a checked 768× extent producer feeds both residual additions through a distinct runtime-ABI map of the existing FP32 kernel. The 36-token result matches the pinned PyTorch 2.8 first-layer capture (maximum absolute error 2.86e-6). At eight tokens, the runtime entry exactly matches a separately compiled eight-token CKE graph; that is a compiler-stitching comparison, not an independent eight-token PyTorch oracle. Short-request output padding stays untouched, and zero/excess lengths or a malformed ID reject without publishing a completed output; execution recovers on the next valid request. This is first-layer coverage, not the complete twelve-invocation encoder or a variable-length waveform deployment. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_albert_layer; the suite is in standard nightly.

Checked runtime token-length complete encoder proof: one capacity-64 circuit now carries a validated token count through embedding, all twelve shared-weight ALBERT invocations and the final 768→512 phoneme-feature projection. The same generated native entry executes valid 2 → 8 → 36 → 64 → 2 requests, compares the final features and every layer output with independent hash-pinned PyTorch 2.8 captures for each length, and leaves reserved output padding untouched. The worst final-feature maximum absolute error across these captures is 1.94e-5 under the established 3e-5 encoder bound. Invalid counts and IDs reject without publishing output lengths; the next valid request succeeds. This certifies a runtime-length phoneme encoder, not the duration/prosody, text/acoustic, generator, or waveform stages under one variable-length entry. The existing phoneme-to-WAV hosts still use separately compiled exact token counts. Reproduce the encoder with python3 -m unittest tests.test_v8_kokoro_runtime_encoder; it is registered in standard nightly.

Checked runtime token-length duration proof: one capacity-64 generated entry now carries the validated token count through the complete phoneme encoder and duration predictor. It executes 2 → 8 → 36 → 64 → 2 token requests in one loaded library and caller-owned arena, leaving unused logits and durations untouched. For 36 tokens, independent pinned PyTorch 2.8 duration logits differ by at most 3.63e-5 under the existing 5e-5 duration checkpoint bound; all 36 integer durations and the 103-frame extent match exactly. Other lengths have execution, padding and repeatability evidence but no independent duration oracle yet. Invalid lengths reject before publishing any of the token, residual or frame extents, and a subsequent request succeeds. The selected duration provider map now validates declared logits and duration capacities against planned storage. The voice/style vector remains pinned to the 36-token fixture in this test, and duration expansion, prosody, waveform and deployment are still on exact-length graphs. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_duration; this suite runs in standard nightly.

Checked runtime token-length acoustic text and expansion proof: one capacity-64 generated entry now computes the complete phoneme encoder, duration predictor, real acoustic text embedding/three convolution blocks/BiLSTM, and both duration-feature and acoustic-text expansions. Its checked token count reaches every row/frame consumer; the predicted checked frame count reaches both expansions. The caller-owned arena reserves 64 tokens and at most 3,200 frames, while valid extents and physical strides remain separate. Native 2 → 8 → 36 → 64 → 2 requests pass with untouched padding and exact repeated short output. At 36 tokens, direct pinned PyTorch 2.8 text checkpoints pass through the final 103-frame expansion: maximum text-expanded error 2.45e-6 under 3e-6. The duration stream differs by at most 6.62e-6 from an independent repeat of pinned predictor features under its 3e-5 bound. Invalid lengths, insufficient arena and failed predictor style stop before either expanded output is published, and a subsequent request succeeds. Other token lengths have execution and safety evidence but no independent text/prosody oracle here. The style vector is still the pinned 36-token selection, and downstream prosody, generator and WAV deployment remain exact-length graphs. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_text_expansion; this suite is in standard nightly.

Checked runtime-length shared prosody proof: one capacity-64 generated entry now joins CKE-produced duration and acoustic-text streams to the shared prosody bidirectional LSTM. The checked frame extent drives both expansion and the transpose/scan calls, with capacity for at most 3,200 frames. One loaded library and caller-owned arena execute 2 → 8 → 36 → 64 → 2 token requests; the 36-token, 103-frame scan differs from the pinned PyTorch 2.8 capture by at most 4.56e-6 under its existing 1e-5 checkpoint limit. Other lengths have execution, padding and repeatability evidence only. Invalid requests and failed producers stop before publishing lengths or writing scan outputs; a later valid request succeeds. This is still a prefix circuit: the dynamic F0/noise branches, decoder, generator and waveform are unconnected, and the deployable WAV hosts still use exact-length graphs. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_prosody_shared; this suite is registered in standard nightly.

Checked runtime-length F0/noise entry proof: the capacity-64 generated entry now carries CKE-produced shared prosody features into the channel-major transpose, separate style projections, and first AdaIN operation of each F0 and noise branch. The checked frame extent drives the transpose and both AdaIN calls; the planner reserves at most 3,200 frames, with valid data separate from physical strides and padding. One loaded library executes 2 → 8 → 36 → 64 → 2 phoneme-ID requests. For the 36-token, 103-frame request, F0 and noise first-AdaIN outputs differ from the committed operation-level PyTorch captures by at most 1.86e-5 and 1.69e-5 respectively under their 5e-5 checkpoint bounds. Other lengths have execution, padding and repeatability evidence only. Upstream and branch-local failures stop dependent calls and preserve unwritten branch outputs; later valid requests recover. This earlier test covers only the first normalization prefix; the complete runtime F0/noise evidence is summarized above. It is not a variable-length WAV path. Reproduce with python3 -m unittest tests.test_v8_kokoro_runtime_prosody_norm; the suite is registered in standard nightly.

Listening to the short diagnostic WAV: set CKE_TTS_RETAIN_DIR=/path/to/output alongside CKE_TTS_RUN_TWO_LENGTH_WAVEFORM=1. The asset-backed test retains captured-noise and seeded-noise eight-ID WAVs under kokoro-two-length-short/, with a reproduction report and hashes. Both are experimental generated speech; listening does not turn the failing connected PyTorch comparison into a PASS.

Exact-length native request preview: CKTTS003 extends the diagnostic package with checked phoneme-ID and style-buffer offsets. The native host accepts decimal phoneme IDs, a seed, and a CKVOICE1 bank exported from the hash-pinned af_heart.pt source. It validates the request count against the token count compiled into that host, selects row count − 3, copies the two 128-value style slices, generates request-owned noise, and calls the generated entry. The asset-backed eight-ID test compares its WAV with the same-seed generated result. The initial package was assembled by fixture tooling; the offline pinned-BUMP exporter described below now assembles the static package without fixture tensors. Each host is still tied to one exact-length graph. The selector described below dispatches only certified 8-ID and 36-ID requests; full context-sensitive text preparation and a persistent-weight speech session remain unfinished; the process-level stop/replace supervisor is described below. The exporter requires PyTorch only when creating the bank, not when running the native host.

Pinned-BUMP native request build: version/v8/tts/build_kokoro_request_runtime.py derives compiler weight metadata from the hash-pinned BUMP and declarative binding catalog, builds the canonical waveform circuit through normal v8 lowering and codegen, compiles the generated library and C host, and invokes export_kokoro_request_package.py for the static CKTTS003 package. No test fixture supplies weights or model stages to this build. The package verifies all 580 selected FP32 weights, including 24 forward/reverse recurrent concatenations, and contains three pinned STFT constant segments. Build one exact-length runtime with python3 version/v8/tts/build_kokoro_request_runtime.py --bump-dir /path/to/pinned-bump --tokens 8 --output-dir /path/to/empty-build; the resulting native host still requires a pinned CKVOICE1 bank, phoneme-ID CSV and seed. The asset-backed eight-ID and 36-ID replays check the 32,400- and 61,800-sample WAV hashes (8f88a076382944cfd26826d964cf12f378ebc8c16f7ce98ea5ed24e98667eda1 and 187e777636f7071776968bb7a7c4ced52f3d0438bedc281b84416562c844015e). This still requires one build per supported exact phoneme count. The selector and bounded text frontend/session described below build on these exact-length hosts; they do not provide arbitrary-length G2P or in-graph cancellation. Matching diagnostic WAV hashes does not resolve the connected PyTorch waveform numerical failure. Cheap manifest and package bounds tests run in standard nightly; the full-model replay requires CKE_TTS_RUN_REQUEST_PACKAGE_FULL=1, the pinned BUMP directory and native voice bank.

Native exact-length bundle and selector: version/v8/tts/build_kokoro_dispatch_bundle.py builds both pinned request runtimes and copies the hash-pinned af_heart CKVOICE1 bank into one relocatable bundle. The C selector native-kokoro-dispatch accepts a bundle directory, output WAV path, seed and phoneme-ID CSV. It rejects counts other than 8 or 36 before opening model artifacts, verifies the selected host, generated library, request package and voice-bank SHA-256 hashes, then executes the exact-length host. That host resolves the generated-entry symbol with dladdr and verifies the on-disk library artifact hash before synthesis. The symbol path and file hash identify capture-time provenance; they are not an embedded build identity or proof against concurrent file replacement. Build with python3 version/v8/tts/build_kokoro_dispatch_bundle.py --bump-dir /path/to/pinned-bump --voice-bank /path/to/af_heart.ckvoice --output-dir /path/to/empty-bundle, then run /path/to/bundle/native-kokoro-dispatch /path/to/bundle output.wav 7 0,...,0 with exactly 8 or 36 decimal IDs. The bundle builder publishes only after both exact-length runtimes and the selector build successfully; failed builds leave the destination absent or empty. The selector rejects any pre-existing WAV destination, including symlinks and hard links to bundle assets, before invoking a host; the host also creates output exclusively to close the check-to-write race. Choose a fresh output filename for each request. The export requires OpenSSL libcrypto for hashing; the deployed selector and host do not need Python. This is exact-length phoneme-to-WAV execution; only the retained 8-ID and 36-ID utterances have WAV-hash evidence. Other ID sequences have input bounds checks but no independent model-level parity certification. It is not arbitrary text, a persistent session, or PyTorch waveform parity. Cheap rejection and identity tests run in standard nightly; full asset-backed WAV replay remains opt-in.

Explicit AVX2/FMA native bundle: the offline Kokoro request and two-bucket builders now accept --conv-provider avx2_fma; scalar remains the default. Kokoro circuit authoring explicitly selects the already mapped serial x86 AVX2/FMA providers for 88 Conv1D calls, records the selected numerical contract, and lets normal lowering/codegen build the native hosts. The generated provider checks AVX2/FMA at runtime and rejects unsupported CPUs. On the i7-14700T, one standalone dispatch run took 7.595 seconds for 32,400 samples and 15.078 seconds for 61,800 samples; both WAV SHA-256 hashes exactly matched the scalar seeded baselines. These single-run process timings include loading and writing and are not a repeatable speedup estimate. The option does not change the known connected PyTorch waveform parity failure, and both utterances remain slower than real-time playback. Use python3 version/v8/tts/build_kokoro_dispatch_bundle.py --bump-dir /path/to/pinned-bump --voice-bank /path/to/pinned/af_heart.ckvoice --conv-provider avx2_fma --output-dir /path/to/empty/bundle; the asset-backed two-WAV check selects the same path with CKE_TTS_CONV_PROVIDER=avx2_fma.

Native dictionary-only text preview: build_kokoro_lexicon_frontend.py exports a hash-pinned Misaki US gold dictionary and Kokoro vocabulary to a checked CKLEX1 sidecar and compiles native-kokoro-text. At deployment, the C frontend accepts text, verifies the sidecar hash, converts supported ASCII words and basic punctuation into phoneme IDs, and invokes the native 8/36-ID selector; Python is not required for this request path. With the pinned bundle and seed 7, “Hello.” and “Read this assistant response aloud.” reproduce the retained 32,400- and 61,800-sample WAV hashes. Export with python3 version/v8/tts/build_kokoro_lexicon_frontend.py --config /path/to/pinned/config.json --misaki-us-gold /path/to/pinned/us_gold.json --output-dir /path/to/empty/frontend, then run native-kokoro-text bundle-dir us-gold.cklex output.wav 7 'Hello.'. At this earlier milestone the frontend used dictionary default pronunciations, rejected numeric forms and unknown terms, and the selector accepted only 8 or 36 IDs. Current bounded cardinal and runtime-length behavior is described above. This is a bounded text-to-WAV preview, not arbitrary assistant-response speech, numerical waveform parity, playback or cancellation. Cheap ID and rejection tests run in standard nightly; full generated WAV replay requires pinned assets and CKE_TTS_RUN_TEXT_FULL=1.

Optional third exact-length bucket: the bundle exporter retains 8 and 36 IDs by default and accepts up to four explicit --experimental-count values (12 in this fixture) to compile a separate 12-ID circuit, package and native host at export time. The generated selector validates artifact hashes and routes by the actual phoneme count; it does not compile per request or pad one graph to another length. With the pinned dictionary frontend, “Hello there.” produced 12 IDs and a 36,000-sample, 24 kHz mono WAV through generated C. An asset-backed single-session 8 → 12 → 8 replay matched the retained CKE seeded hashes, while the new 12-ID direct pinned-PyTorch waveform parity is explicitly NOT_TESTED. This widens the experimental text-to-WAV trial, not arbitrary-length or full Misaki G2P support. Reproduce the bundle with python3 version/v8/tts/build_kokoro_dispatch_bundle.py --bump-dir BUMP --voice-bank af_heart.ckvoice --output-dir BUNDLE --conv-provider avx2_fma --experimental-count 12; asset-backed session replay uses CKE_TTS_RUN_THIRD_LENGTH_FULL=1 CKE_TTS_THIRD_LENGTH_BUNDLE_DIR=BUNDLE CKE_TTS_TEXT_FRONTEND=FRONTEND/native-kokoro-text CKE_TTS_TEXT_LEXICON=FRONTEND/us-gold.cklex python3 scripts/nightly_runner.py --tests tts_kokoro_native_speech_session.

Native one-request speech supervisor: the exported frontend now also builds native-kokoro-session. Run native-kokoro-session native-kokoro-text bundle-dir us-gold.cklex output-root [player|-] and send newline-terminated commands SPEAK<tab>seed<tab>text, STOP, or QUIT on standard input, keeping the pipe open until the request finishes or is cancelled. It reports READY and request-ID-tagged STARTED, WAV_READY, PLAYING, COMPLETED, CANCELLED, or ERROR events on standard output. There is one active request and no pending queue: a new SPEAK kills and replaces synthesis or the optional player, removes any cancelled WAV, then starts a fresh native child. The child calls the existing generated Kokoro host; the supervisor does no neural arithmetic. Before WAV_READY or playback, the supervisor verifies the generated file is a complete canonical RIFF/WAVE containing nonempty 24 kHz mono PCM16 data; invalid output raises ERROR and is removed. The optional player is an external executable receiving the complete WAV path as its sole argument. This is whole-utterance playback and process-level interruption, not streaming model inference or bounded cancellation inside generated operations. Each request reloads the model, so this is not a persistent-weight performance claim. Cheap process and fake-player controls run in standard nightly; a pinned-bundle cancel-then-Hello replay is asset-backed. Full text/G2P, more lengths, application queue policy, listening quality and P3/Ryzen cancellation/latency remain open.

Persistent native waveform worker: the hash-checking runtime dispatcher accepts native-kokoro-dispatch bundle-dir --session and then starts the bounded WAV host. It validates and loads the package once, then accepts RUN<tab>output.wav<tab>seed<tab>phoneme-ids-csv and QUIT on standard input. Each RUN rebinds checked IDs, request length, selected voice row and request seed before the same generated entry executes; only a successfully validated WAV emits WAV_READY<tab>samples<tab>path. A synthetic generated-entry test removes the package after READY, then proves 8→13→36→8 replay, a rejected request and successful recovery. An asset-backed local run of the first two full-summary chunks and a repeat of the first used one loaded 64-token-capacity library and produced 50,400, 45,600 and 50,400 samples; the repeated first WAV hash matched exactly. The worker does not yet perform full-text planning or playback. It is synchronous during each generated call; stop/replacement currently requires a supervising process to kill and restart it, so this does not certify persistent weights across cancellation. The separate text supervisor above still reloads for each request until it is connected to this worker. Connected waveform numerical parity remains FAIL.

Seeded request replay: an asset-backed test runs the complete generated entry three times in one process and one arena with native Gaussian seeds 7, 8 and 7. It uses two distinct 36-phoneme af_heart utterances, with checked frame counts 103, 98 and 103. Between the first and second valid requests, a position-zero invalid phoneme ID must fail without publishing a valid length or changing the waveform buffer. The later B request executes with valid length, finite audio and preserved padding, while the first and final A FP32 waveforms match exactly. B is not compared with an independent clean-arena baseline. This is early-rejection recovery, not recovery after partial graph execution. Run CKE_TTS_RUN_SEEDED_REPLAY=1 python3 -m unittest tests.test_v8_kokoro_generated_waveform.KokoroGeneratedWaveformTest.test_seeded_native_noise_reuses_one_generated_entry. That seeded same-length replay does not test different phoneme counts or voice rows; the two-bucket diagnostic above does. Text preparation and cancellation remain untested.

Ryzen diagnostic measurement (2026-10-12): the standalone seeded host produced 61,800 samples, or 2.575 seconds at 24 kHz, in 94.473 seconds of process wall time on an AMD Ryzen 9 9950X3D. Its WAV hash matched the earlier Intel run exactly (187e777636f7071776968bb7a7c4ced52f3d0438bedc281b84416562c844015e). A controlled repeat with explicit single-thread environment took 78.365 seconds with the same WAV hash. Both timings include package loading and WAV writing; OS cache and clock effects were not isolated, and neither measures warm execution or time to first playable audio separately. A 99 Hz perf sample attributed 54.05% of samples to the checked Conv1D implementation, 28.69% to libm __fmaf_fma3, and 12.63% to the generated library's fmaf linkage stub. This single-threaded scalar build is far slower than real-time playback. An experimental whole-library -mfma rebuild took 49.199 seconds, but changed 26,579 PCM samples (worst difference 192 PCM steps). With captured reference Gaussian instead, the FMA rebuild still differed from the pinned FP32 waveform by 0.006864 maximum. A narrower experiment compiled only src/kernels/audio_conv1d_checked.c with -mfma, leaving other generated-library sources at -O2 -ffp-contract=off: its first Ryzen process took 51.457 seconds and a controlled repeat took 52.199 seconds, both producing the exact baseline WAV hash. The whole-library FMA controlled repeat took 49.167 seconds and again changed the WAV hash. In identical-input full-graph replay, seven retained checkpoints, including F0, source STFT channels, source convolution and final FP32 waveform, matched elementwise exactly. These are promising measurements for a separately mapped Conv1D implementation, not an accepted portable optimization: production selection still requires a declared CPU/build contract, independent oracle and bounds tests, and standard-nightly registration. The machine-readable Ryzen experiment manifest records the build commands, source and artifact hashes, CPU settings, measured runs and profiling method.

Explicit Conv1D hardware-FMA candidate: CKE now has separately mapped checked FP32 Conv1D providers for x86 hardware FMA, with a runtime CPU guard and the same ordered fmaf numerical semantics as the scalar provider. The default scalar selection remains intact. Pinned PyTorch fixtures, exact scalar-versus-candidate comparisons, rejected-output preservation, and normal generated-call composition pass in standard nightly. In an asset-backed complete generated entry, selecting the candidate for 88 convolutions left six checked intermediates and all 61,800 FP32 waveform samples exactly equal to the scalar run. On a Ryzen 9 9950X3D pinned to CPU 0 or 16, the candidate kernel was approximately 1.58 times faster for the tested 512×512×36 and 128×22×12000 shapes; those are kernel timings. An alternating two-run replay of the complete generated entry on Ryzen CPU 0 measured warm scalar execution at 100.892 seconds and the selected hardware-FMA entry at 53.155 seconds, a 1.90× speedup with identical 61,800-sample FP32 output. This excludes asset loading, arena preparation, WAV writing and playback, and uses captured Gaussian diagnostic input. The candidate still takes about 20.6 wall-clock seconds per generated audio second. The connected waveform still fails the pinned-model numerical comparison, so practical speech speed and quality remain unproven. Reproduce the kernel measurements with taskset -c 0 python3 scripts/benchmark_audio_conv_hwfma.py --repeats 5 and the optional full graph comparison with CKE_TTS_RUN_HW_FMA_REPLAY=1 python3 -m unittest tests.test_v8_kokoro_generated_waveform.KokoroGeneratedWaveformTest.test_full_waveform_hardware_fma_provider_replay. The evidence manifest records individual samples, compiler settings, identities, and limits.

Explicit AVX2/FMA Conv1D candidate (2026-10-12): A separately mapped FP32 provider computes eight independent output frames per vector while preserving each frame’s input-channel/tap FMA reduction order. The scalar provider remains the default. The ordinary and dilated providers pass pinned PyTorch fixtures and exact ordered-FMA replay, including padded strides, tails, capacity rejection and recovery. Selecting them for 88 calls in the complete generated graph left six checked intermediates and all 61,800 FP32 waveform samples exactly equal to the scalar diagnostic run. On the local Intel Core i7-14700T, five measured warm generated-entry runs after one warmup per provider gave a 106.87-second scalar median and 14.23-second AVX2 median (7.51×), with respective ranges of 106.85–106.92 and 14.20–14.23 seconds. The runs were pinned to CPU 2 and produced the same 2.575-second output. On Ryzen 9 9950X3D, five measured alternating standalone seeded process runs after one warmup per provider gave a 53.67-second median for hardware FMA and 11.63 seconds for AVX2 (4.61×); the ranges were 53.62–56.05 and 11.63–11.65 seconds. Runs were pinned to CPU 0 and every WAV hash agreed. These process timings include package loading and WAV writing, so they are distinct from the Intel warm-entry timings. A capture from the running Ryzen synthesis process records the mapped generated library path and its on-disk hash; this is stronger than an ldd lookup, though it is not an embedded runtime build identity. The Ryzen profile now attributes 52.63% of sampled self cycles to AVX2 Conv1D, 18.28% to checked linear rows and 9.90% to dense transposed convolution. The evidence manifest records artifact hashes, commands and limits. This remains one fixed-phoneme, one-voice diagnostic path: connected PyTorch waveform parity, arbitrary text, listening and accessibility-session latency are not certified. AVX-512F and VNNI have not been benchmarked in this selection.

Explicit-pool parallel Conv1D candidate (2026-10-12): The optional x86 AVX2/FMA provider partitions independent output channels through a caller-owned CKE thread pool. The map declares pool, worker count, scratch and numerical contract; default selection remains unchanged. Pinned PyTorch dilated cases, ordinary stride-two convolution, padded layouts, rejection/recovery, distinguishable concurrent requests and a normal generated circuit pass in standard nightly. The generated test queries the compiled library’s AVX2/FMA probe, so an unexpected unsupported result on capable hardware fails. A same-run comparison on an Intel Core i7-14700T pinned to physical cores 0, 2, 4 and 6 used one warmup and five alternating measured runs per variant. Median warm entry times were 14.283 seconds for serial AVX2, 14.261 seconds with one worker, 10.079 seconds with two, and 7.880 seconds with four. Four workers improve the serial AVX2 entry by 1.81× and still require about 3.06 seconds of synthesis per audio second. All six compared intermediates and 61,800 FP32 waveform samples matched serial AVX2 exactly. The final measurement record contains the tested source revision, generated-library hashes, loaded-mapping check, compiler command, affinity, host load and individual samples. The earlier scalar comparison remains historical evidence. Both measurements use one fixed diagnostic utterance with prepared weights and captured Gaussian input; they exclude loading, text preparation, WAV writing and playback. Connected PyTorch waveform parity, practical speech latency and performance on other CPUs remain unproven.

Numerical diagnosis: the standalone encoder fixture forces PyTorch 2.8 eager attention, while the pinned full KModel uses SDPA by default. Their final encoder features differ by at most 1.49e-5 for the fixed 36-token input. A direct full-model F0 capture now includes the shared-scan input and inner F0 modules. Connected CKE shared-scan input differs from that direct input by 1.27e-5; replaying the shared scan and first AdaIN with identical CKE inputs in pinned PyTorch differs from the native outputs by 2.01e-6 and 1.43e-6, respectively. The connected first AdaIN differs from the direct full-model hook by 1.86e-5. This localizes an upstream contribution; it does not certify the remaining connected waveform. A diagnostic full-model eager run changes its FP32 waveform from the default SDPA run by up to 0.005744, but neither attention mode brings the CKE WAV into full numerical parity. Keep the two reference dispatch identities separate; do not refresh either fixture or widen a global tolerance to conceal the difference.

First-layer attribution: direct hooks from the pinned full KModel show its first embedding and input projection agree with the generated CKE entry within 2.38e-7 and 9.54e-7. The first Q/K/V projections differ by up to 3.34e-6, 2.86e-6 and 2.86e-6, before attention score reduction. Pinned PyTorch 2.8 replays on the identical CKE projection input attribute up to 2.38e-6, 2.86e-6 and 1.55e-6 to the local linear reduction, with the remainder affected by upstream input drift. The first attention context differs by 7.78e-6 in the connected entry; the eager-versus-SDPA full-model reference difference at that same context is 2.13e-6. These are distinct numerical contributions. Do not change the existing FP64 linear or attention provider solely to fit one reference dispatch; a new reduction order needs a separate provider and map.

Reproduce the retained direct-hook comparison with python3 -m unittest tests.test_v8_kokoro_generated_prosody_complete.KokoroGeneratedProsodyCompleteTest.test_direct_full_model_f0_inner_checkpoints_localize_drift. The live identical-input scan/AdaIN replay additionally requires pinned PyTorch 2.8.0+cpu; other versions report SKIP. Regenerate the direct-hook fixture only from the pinned assets and code using capture_kokoro_v1.py --capture-f0-fine followed by build_prosody_f0_fine_fixture.py --capture-dir. The capture keeps the default SDPA full-model dispatch and its original waveform hash.

Reproduce the first-layer comparison with python3 -m unittest tests.test_v8_kokoro_generated_encoder.KokoroGeneratedEncoderTest.test_first_layer_against_direct_full_model_sdpa_hooks. Pinned PyTorch 2.8.0+cpu is required for the separate same-input Q/K/V replay; other versions report SKIP. Regenerate the first-layer capture using capture_kokoro_v1.py --capture-bert-fine followed by build_kokoro_bert_fine_fixture.py --capture-dir. The default SDPA full-model waveform hash must remain unchanged.

StageEvidenceStatus
Current runtime-length complete diagnostic waveformOne circuit-owned generated entry executes 8-, 13- and 36-ID af_heart requests through the second residual pool, spectral head and inverse STFT. It publishes checked sample counts of 32,400, 36,600 and 61,800, separate from the 76,800-sample allocation. A native C host writes the 13-ID WAV and records artifact identities. Captured Gaussian is an external diagnostic input; direct PyTorch 2.8 captures compare pool, post convolution, magnitude/phase and waveform.Generated execution and bounds PASS; direct-model connected waveform parity FAIL; native seeded request evidence is separate below
Native variable-length text trialOne packaged 64-token-capacity generated library is selected for 8-, 13- and 36-ID requests. Native dictionary preparation, request-specific af_heart row selection, seeded noise and WAV serialization produce repeatable 24 kHz PCM16 output. The process-level stop and recovery path uses this bundle; each request reloads the library.Supported-text execution PASS; arbitrary text, persistent loading, headset playback and connected PyTorch waveform parity NOT CERTIFIED
Phoneme encoderSeparately compiled, all-valid lengths 2, 8, 36 and 64Certified bounded inference
Duration predictor and alignmentPinned 36 phonemes, af_heart, 36 durations and 103 checked framesCertified bounded inference
Acoustic text encoder and expansionGenerated embedding, three effective-weight Conv1D/LayerNorm/LeakyReLU blocks, zero-state bidirectional LSTM, then expansion using the same 103-frame extent. The final expanded-feature maximum absolute error is 2.45e-6 against the pinned PyTorch 2.8 capture.Certified bounded inference for the fixed, all-valid 36-token case
Shared prosody LSTMGenerated duration features are transposed using the checked 103-frame extent and run through the pinned shared bidirectional LSTM. Maximum absolute error against the independent PyTorch 2.8 checkpoint is 4.56e-6. One compiled entry also runs checked 36- and 72-frame requests; those altered-duration runs have shape and safety evidence, not reference numerical parity.Certified bounded inference for the pinned 103-frame case
Complete F0/noise prosodyOne circuit-owned generated entry runs all three residual blocks per branch and the final projections from its own generated upstream features. The pinned full-model PyTorch 2.8 hooks provide independent direct captures at every block and the final 206-frame curves. At A=103 and 2A=206, worst final-output absolute error is 3.25e-4 at F0; second and third block errors remain below 1e-4. Nearest upsampling, depthwise transposed Conv1D, checked extent scaling, physical padding, repeated requests, altered 36/72-frame safety runs, wrong final weight, upstream rejection and X-Ray selected-provider/valid-region checks pass.Certified bounded inference for one pinned 36-phoneme, af_heart utterance; other utterances lack model-level parity
Acoustic decoder ingressOne extended generated entry consumes CKE-produced 206-frame F0/noise curves and 103-frame acoustic text features. It performs the pinned stride-2 F0/noise convolutions, channel-major joins, and 512-to-64 text residual projection. The fixed-utterance direct-model hook comparison has a maximum absolute error of 1.57e-5. The entry also checks padding, repeated 36/72-frame safety requests, upstream failure and an intentionally wrong weight.Certified bounded ingress for one pinned 36-phoneme, af_heart utterance
First acoustic decoder residual blockThe same generated graph continues through style projection, two AdaIN/LeakyReLU/Conv1D stages and the shortcut sum. Direct pinned full-model hooks compare six intermediate and final checkpoints for A=103; the largest absolute difference is 3.05e-5 at the first normalization and the block output differs by 2.49e-6. The test also checks 36/72-frame safety runs, padding, repeated requests, wrong weights, and upstream/style failure propagation.Certified bounded inference for one pinned 36-phoneme, af_heart utterance; other utterances lack model-level parity
Complete acoustic decoder featuresOne generated entry now connects all three remaining style-conditioned residual blocks and the final A-to-2A upsampling block to its own upstream tensors. Direct pinned full-model PyTorch 2.8 hooks compare block joins, intermediate stages, and the final 512-channel feature output. Three real 36-token utterances produce A=98, 101 and 103 frames; the worst observed final decoder difference is 8.41e-5. One alternate utterance reaches 1.20e-4 at the final block's second convolution after an 8.12e-5 normalization difference; that intermediate has its own 2e-4 ceiling while the final output retains 1e-4. Repeated requests use one arena and check valid lengths and padding. Rejected durations and invalid upsampling weights prevent publication of final output. An intentionally wrong final-block weight is detected. X-Ray checks the selected final provider and valid 2A region.Certified bounded phoneme-to-acoustic-feature inference for three fixed-geometry, af_heart utterances; no waveform samples yet
First waveform-generator main upsampling stageOne generated entry carries CKE-produced acoustic decoder features through LeakyReLU(0.1), checked 10× frame scaling and the effective-weight 512-to-256 dense transposed convolution. Direct full-model PyTorch 2.8 hooks compare two distinct 36-token utterances: 206→2060 and 196→1960 valid frames, with a worst observed absolute difference of 2.86e-5 under a 5e-5 checkpoint ceiling. Padding, repeated requests, rejected upstream durations and failed generator weights are checked. A later connected graph joins this stage with the first source residual block; its model-level numerical comparison still fails.Certified bounded main-path stage for two pinned af_heart utterances; no waveform samples yet
Source magnitude/phase STFT primitiveA checked native provider computes centered reflect-padded periodic-Hann forward STFT into magnitude and phase channels, with caller-owned tables, scratch, capacity and output stride. Independent NumPy and a committed pinned PyTorch 2.8 fixture run without PyTorch installed; live PyTorch 2.8/2.12 comparisons use the same exact FP32 Hann window on both sides and cover Kokoro's 61,800-sample/12,361-frame source geometry. The exact-real Nyquist bin uses a positive-zero imaginary value to match the tested PyTorch phase convention. The original diagnostic used a NumPy Hann window whose FP32 taps differ from the pinned PyTorch window. With the exact captured window, scalar DFT magnitude differs by at most 1.20e-7 and one first-frame ±π raw-phase sign remains different; smaller interior phase differences also depend on reduction order. The source-convolution input must use the captured window. Kokoro convolves raw phase values. The generated graph now calls this provider, but connected model parity fails at the first source convolution.Primitive validated; connected source-convolution numerical parity FAIL
Harmonic excitation provider and generated callTwo separately mapped checked providers consume frame-rate F0 and explicit Gaussian samples. The original difference-interpolation provider remains available. The weighted-FMA variant matches the pinned PyTorch 2.8 CPU phase interpolation order: its 206-frame, 300×, nine-harmonic full-model checkpoint differs by at most 1.49e-8, versus 3.91e-4 for the original provider. O0/O3, smaller geometries, rejected capacities and repeated calls are tested. The generated connected source circuit selects the new map explicitly. This primitive result does not certify merged source, STFT, or waveform parity. Native RNG remains outstanding.Weighted-FMA primitive validated; connected source/STFT/convolution still has numerical compatibility FAIL
Generated source projectionOne generated native entry composes the selected weighted-FMA harmonic provider, pinned effective 9→1 linear weights, and checked strided tanh. The separate historical projection fixture still exercises the original difference-interpolation provider. The connected entry consumes CKE-generated F0 and carries the source signal through STFT and the first source convolution. On the pinned utterance, generated source maximum error falls from about 6.10e-4 to 4.28e-4; first source-convolution maximum error falls from 0.334 to 0.261. Generated F0 drift and the separately diagnosed raw-phase branch cut remain. Native RNG remains outstanding.Bounded connected source signal; source-convolution numerical compatibility FAIL
Connected generated F0 to source projectionA circuit extends the complete generated phoneme encoder, duration path and prosody F0 output through checked 300× source-sample extent scaling, harmonic generation, pinned 9→1 linear projection and tanh. The source kernel binds its frame count to the checked 2A runtime length; linear and tanh consume the derived 600A valid sample count while retaining separate planned capacities and physical layout. For one pinned 36-phoneme af_heart utterance, the generated entry returns A=103, 2A=206 and 61,800 source samples. Direct pinned-model hooks show 3.24e-4 maximum F0 error and 4.28e-4 maximum source error under a named 1e-3 connected checkpoint ceiling. Captured Gaussian is explicit diagnostic input. A→B→A requests with two 36-token utterances exercise different valid extents (61,800 and 58,800 samples), padding, upstream failure and recovery. Different phoneme counts and voice rows remain untested.Bounded connected phoneme-to-source signal for one oracle-parity utterance; downstream STFT/convolution executes with numerical FAIL; native RNG and WAV NOT_TESTED
Connected generated source STFT and first convolutionOne circuit-owned generated entry now feeds CKE-produced F0 through harmonic source, projection, scalar STFT and the pinned first source convolution. Checked affine extent computes 12,361 STFT frames from 206 F0 frames; checked scaling yields 2,060 convolution frames. The 36-token pinned request runs through normal lowering, memory planning and native generated C. A→B→A requests also cover 12,361→11,761→12,361 STFT frames, preserved padding, failure propagation and recovery. Against the direct pinned full-model capture, magnitude differs by up to 0.00289 and first source-convolution output by up to 0.26075; 37 raw phase values differ across the branch cut. This is an executed numerical FAIL, not accepted source-convolution parity. With the earlier generated source, a local pinned PyTorch 2.8 STFT comparison found one near-zero Nyquist phase discrepancy; the weighted-FMA source changes that diagnostic, while the pinned-source branch-cut regression remains. Captured Gaussian, one voice row and 36-token input remain limitations. A model-neutral generated affine-extent fixture separately proves checked length propagation to a consumer.Generated execution and bounds PASS; direct-model numerical compatibility FAIL; no waveform
Runtime-length source STFT and first convolutionThe variable-length generated entry now reaches the same source STFT and first convolution for direct pinned full-model 8-ID and 36-ID requests, using request-specific af_heart styles and one loaded library. Checked STFT frames are 6,481 and 12,361; checked convolution frames are 1,080 and 2,060. Repeated short → long → short execution, padding, nonfinite-input rejection, and recovery pass. First convolution maximum differences are 0.20474 and 0.26074; raw phase still differs by about 2π at branch-cut bins. Captured Gaussian remains diagnostic input.Generated execution and bounds PASS for two lengths; direct-model numerical parity FAIL; variable-length WAV NOT_TESTED
Runtime-length second source joinThe connected entry reuses the canonical second source convolution and style-conditioned source residual declarations, then joins their output with the checked reflected main branch. Eight and 36 phoneme IDs produce 6,481 and 12,361 valid joined frames in one loaded library, with a separate 15,361-frame physical capacity. Native addition, changing lengths, padding, rejection and recovery pass. Direct pinned-model convolution, source residual and join checkpoints remain diagnostic; connected join errors are 0.02531 and 0.04074 maximum. Captured Gaussian is supplied for arithmetic isolation.Generated execution and bounds PASS for two lengths; direct-model numerical parity FAIL; variable-length WAV NOT_TESTED
Runtime-length second generator ingressThe connected entry reuses the canonical LeakyReLU, 256→128 dense transposed convolution and one-frame reflection declarations after the checked first-stage residual mean. Eight and 36 phoneme IDs produce 6,481 and 12,361 valid reflected frames in one loaded library. Exact reflection layout, changing lengths, padding, rejection and recovery pass. Direct pinned-model activation, deconvolution and reflection checkpoints remain diagnostic; connected reflection errors are 0.01083 and 0.01718 maximum. Captured Gaussian is still supplied for arithmetic isolation.Generated execution and bounds PASS for two lengths; direct-model numerical parity FAIL; variable-length WAV NOT_TESTED
Runtime-length first generator residual poolThe connected entry reuses the canonical residual-block declarations after the checked first-stage join. Eight and 36 phoneme IDs produce 1,080 and 2,060 valid mean frames in one loaded library; generated block outputs are checked against direct pinned-model captures and the mean against their explicit three-way average. Native sum/mean, changing lengths, untouched padding, rejection and recovery pass. Connected mean errors are 0.11312 and 0.23652 maximum, inherited from unresolved upstream source differences; captured Gaussian remains diagnostic.Generated execution and bounds PASS for two lengths; direct-model numerical parity FAIL; variable-length WAV NOT_TESTED
Runtime-length first generator joinOne loaded generated entry now connects the complete first source-residual block to the first main generator upsample for direct pinned full-model 8-ID and 36-ID requests. The source convolution, residual block and join share the checked 1,080/2,060-frame extent with separate 2,560-frame physical capacity. Native output equals the sum of its two generated branch tensors exactly; 8 → 36 → 8 replay, output padding, rejected Gaussian input and recovery pass. Direct-model join maximum errors remain 0.11597 and 0.19440, inherited from the known generated-F0/raw-phase source divergence.Generated execution and bounds PASS for two lengths; direct-model numerical parity FAIL; variable-length WAV NOT_TESTED
Source-branch raw-phase diagnosticThe earlier NumPy-window diagnostic had three raw first-frame ±π sign differences and a 0.188 first-source-convolution difference. That window is not byte-identical to Kokoro’s pinned PyTorch FP32 window, so 0.188 is a diagnostic of the mismatched input, not a final parity bound. The exact pinned window leaves one scalar-DFT branch-cut sign difference at bin 7, frame 0. Applying the scalar STFT channels to the pinned effective first source-convolution weights differs from the direct full-model hook by 0.1601 maximum at output channel 131, frame 0. Replacing that one phase value with its oracle value for diagnosis reduces the maximum to 5.44e-6; this replacement is not a production computation. A local native MKL probe matched all raw phase signs on the captured source, but no MKL production provider or portability contract is registered. Circular-angle agreement alone does not certify Kokoro’s raw-phase consumer.Executed raw-phase/source-convolution comparison FAIL (non-blocking diagnostic); connected generated source branch executed with numerical FAIL
Channelwise Snake primitiveA checked scalar provider implements x + sin(alpha*x)²/alpha with one FP32 alpha per channel, explicit valid frames and physical strides, complete preflight, and no heap or hidden scratch. Committed independent PyTorch 2.8 fixtures cover 3×7, 17×31 and 256×129; the largest local difference is 2.39e-7. The full 256×2060 generator geometry, repeated 2060→1960→2060 requests, independent concurrent calls, padding and rejection use a separate NumPy contract. A model-neutral circuit lowers through normal codegen. The first Kokoro source-residual prefix now calls this provider with pinned effective alpha; direct-input diagnostic parity passes, while the connected upstream graph still has a source-phase numerical mismatch. The map declares inference only.Primitive and direct-input diagnostic PASS; connected execution PASS with numerical compatibility FAIL
Dilated Conv1D primitive and compositionA checked scalar provider extends the existing channel-major Conv1D arithmetic with explicit tap dilation and effective-kernel geometry. It retains caller-owned staging scratch and output preservation on rejection. Independent pinned PyTorch 2.8 fixtures cover small and tail geometries plus 256 input/output channels, kernel 7 and dilation 5 at 17 frames; the worst local absolute error is 3.34e-6. An optional live PyTorch 2.8 run at 256 channels and 2,060 frames differs by at most 2.02e-7 on seeded synthetic inputs. A model-neutral circuit compiles dilated Conv1D → Snake through normal lowering and generated C. The first actual Kokoro source-residual convolution now executes with pinned effective weights; the direct-input diagnostic differs from its full-model hook by at most 1.43e-5, but the connected graph remains numerically incompatible upstream.Primitive and direct-input diagnostic PASS; connected execution PASS with numerical compatibility FAIL
First generated source-residual prefixOne generated native entry carries CKE-produced phoneme, duration, F0, excitation, STFT and first source-convolution outputs into the first source-residual style projection, AdaIN, Snake and dilated convolution. A separate diagnostic entry supplies the direct pinned first source-convolution tensor to isolate these four operations: maximum differences against direct full-model hooks are 4.77e-7, 2.86e-6, 5.72e-6 and 1.43e-5 respectively. Repeated 2060→1960→2060 valid-frame requests preserve padding and deterministic output; a rejected alpha prevents final-output publication and the same arena recovers. The fully connected 2060-frame run is finite and bounds-safe, but its final convolution differs from the direct model by 2.2516 maximum in the original source-provider run; the weighted-FMA result is reported by the connected test because upstream source/STFT raw-phase compatibility remains unresolved. Oracle input is used only in the labeled diagnostic entry, never in the connected entry.Connected generated execution/bounds PASS; direct-input diagnostic parity PASS; connected numerical parity FAIL; no WAV
First source-residual convolution pair and sumThe connected generated entry now continues through the second style projection, AdaIN, Snake, dilated convolution and addition to the original first source-convolution output. Direct pinned full-model hooks capture every new boundary, including the first pair's sum as the next pair's input. A separately labeled diagnostic entry supplies the pinned first source-convolution tensor: the new style, normalization, Snake, convolution and sum differ by at most 1.20e-7, 2.15e-6, 2.51e-6, 7.16e-7 and 7.16e-7 respectively. Repeated 2060→1960→2060 requests preserve padding and output; invalid second Snake alpha prevents final-output publication and recovery is checked. The fully connected output remains a numerical FAIL; the selected source provider and exact error are reported by the connected test, inherited from the upstream source/STFT raw-phase path. No reference tensor enters the connected entry.Connected execution/bounds PASS; direct-input pair parity PASS; connected numerical parity FAIL; no WAV
Complete first source-residual blockThe same generated entry now includes all three convolution pairs in noise_res.0, including first-convolution dilations 1, 3 and 5, second convolutions and their residual joins. A direct-input diagnostic compares eight pinned full-model checkpoints across the final two pairs. The largest measured direct-input error is 3.25e-5 at pair 1's first dilated convolution under its 5e-5 checkpoint ceiling; the complete block output differs by 2.84e-6 under 1e-5. One arena passes 2060→1960→2060 valid-frame requests with untouched padding; invalid alpha prevents output publication, recovery passes, and a deliberately wrong final weight is detected. The connected graph uses CKE's own upstream computation and executes safely, but its complete block output still differs from the pinned model; the selected source provider and exact error are reported by the connected test because source/STFT raw-phase compatibility remains unresolved. It is not a certified full-model numerical result or a waveform.Connected execution/bounds PASS; direct-input complete-block parity PASS; connected numerical parity FAIL; no WAV
First generator main/source joinOne 351-operation circuit connects CKE-produced acoustic features, the first 512→256 generator upsample, generated F0, captured Gaussian, source STFT/convolution and the complete first source residual block. The selected checked sum consumes one shared 2,060-frame valid extent, with separate 2,560-frame physical capacity. The generated join exactly equals the sum of its two native branch tensors; 2,060→1,960→2,060 requests preserve padding and invalid source inputs prevent output publication. A direct pinned full-model hook captures the same join, but connected parity fails: maximum absolute error 0.19440 and RMSE 0.00473 against a 2e-4 diagnostic ceiling. Controlled full-model substitution now shows that generated F0 drift and phase branch-cut sensitivity both contribute to the failing source path. X-Ray records the selected sum contract, loaded-library provenance and numerical FAIL. This is generated branch composition, not certified speech.Execution and bounds PASS; direct full-model numerical parity FAIL; no WAV
First main generator residual blockThe same generated native entry continues from the first main/source join through all three AdaIN, Snake, dilated-convolution and residual-sum pairs of generator.resblocks.0, using pinned effective weights and the checked 2,060-frame extent. A separate diagnostic entry consumes the direct pinned join tensor and compares nine direct full-model convolution/pair checkpoints. Its final block maximum error is 4.08e-5 under a checkpoint-specific 5e-5 ceiling. The connected result remains a numerical FAIL at 0.248 maximum error; the upstream F0/source/phase mismatch is still present. Both entries repeat 2,060→1,960→2,060 requests with valid-length and padding checks; alternate-length runs establish safety, not model parity. Connected source or block failures stop downstream execution and allow recovery. No oracle intermediate enters the connected entry.Connected execution/bounds PASS; direct-input block parity PASS; connected model parity FAIL; no WAV
Complete first-stage generator residual poolThe circuit declares the two other first-stage main residual blocks as parallel consumers of the same generated main/source join, then adds all three block outputs and scales by one third. Existing checked AdaIN, Snake, dilated-convolution and sum providers execute the 434-operation connected entry. A separate direct-input entry compares 18 new convolution/pair checkpoints with direct pinned PyTorch 2.8 hooks; the widest late convolution differs by at most 9.16e-5 under its named 1.2e-4 ceiling. The final averaged 256-channel feature differs by at most 3.05e-5 under 5e-5, and selected-provider X-Ray checks its valid region. Repeated 2,060→1,960→2,060-frame requests, untouched padding, capacity rejection, weight-mutation detection and failure propagation are covered. The connected full-model result remains a numerical FAIL at 0.237 maximum error, inherited from F0/source raw-phase sensitivity. Captured Gaussian remains a diagnostic input; no waveform exists.Direct-input first-stage pool parity PASS; connected execution/bounds PASS; connected model parity FAIL; no WAV
Second-stage asymmetric reflection primitiveA reusable checked channel-major provider reproduces the left reflection used after Kokoro's second dense transposed convolution: a one-sample pad maps [a,b,c] to [b,a,b,c]. It distinguishes valid frames from physical strides, rejects invalid geometry, overlap, nonfinite inputs and insufficient capacity before writing, and preserves padding. Independent NumPy values and a model-neutral generated extent → reflection → consumer circuit run in standard nightly. Live PyTorch comparison runs when available. The Kokoro circuit now selects this provider after its second dense upsample.Primitive and synthetic generated composition PASS; connected stage-one ingress executes
Second generator main-path ingressThe 439-operation connected entry consumes CKE's first-stage residual mean, applies LeakyReLU(0.1), scales the checked 2,060-frame length by six, performs the effective-weight 256→128 dense transposed convolution, and validates a one-frame left reflection to 12,361 valid frames. A separate diagnostic entry supplies the pinned first-stage mean to isolate arithmetic. Direct full-model PyTorch 2.8 hooks give exact activation and at most 8.59e-6 deconvolution/reflection difference under 2e-5 checkpoint ceilings. Repeated 2,060→1,960→2,060 requests, padding, capacity rejection and failure recovery are covered. The connected reflected tensor differs from the pinned model by 0.0172 maximum, inherited from the known upstream source-path mismatch; it is an explicit numerical FAIL. Captured Gaussian remains a diagnostic input. No waveform exists.Direct-input stage-one parity PASS; connected execution/bounds PASS; connected model parity FAIL; no WAV
Second generator source convolutionThe 440-operation connected entry applies the pinned 22→128 kernel-one source convolution to its own STFT channels for 12,361 checked frames. A direct-input diagnostic using pinned STFT channels matches the full-model PyTorch 2.8 output within 4.77e-7. The connected output differs by 0.263449 maximum because the established upstream source/STFT mismatch remains. Repeated lengths, padding, capacity rejection and recovery are covered; no reference tensor enters the connected entry.Direct-input parity PASS; connected execution/bounds PASS; connected model parity FAIL; no WAV
Second generator source residual and joinThe connected entry now reuses declared AdaIN, Snake, dilated-convolution and residual-sum operations for the complete 128-channel noise_res.1 block, then joins its output to CKE's reflected main path at 12,361 valid frames. The direct-input diagnostic supplies pinned source-convolution and main-reflection tensors only to isolate this stage. Its complete source-block and join outputs each differ from direct pinned full-model PyTorch 2.8 hooks by at most 4.30e-6. The connected join is exactly the sum of its two native branches, but differs from the pinned full model by 0.040741 maximum; this remains a reported numerical FAIL inherited from upstream F0/source/STFT drift. No reference intermediate enters the connected entry.Direct-input source residual/join parity PASS; connected execution/bounds PASS; connected model parity FAIL; no WAV
Second generator main residual poolThree 128-channel residual blocks consume the same generated second-stage join, then sum, average and apply the pinned final LeakyReLU. The direct-input generated entry differs from the pinned full-model activation by at most 5.63e-5 for the 12,361-frame utterance. The connected entry runs its complete upstream graph without oracle substitutions, but final activation differs by 0.300703 maximum; this is a numerical diagnostic FAIL, not accepted model parity. A 15 MB fixture contains only newly required effective weights and one full-model output capture, linked by hash to the earlier join fixture. Runtime length, padding, rejection and recovery are tested.Direct-input pool parity PASS; connected execution/bounds PASS; connected model parity FAIL; spectral head and WAV not yet connected
Complete diagnostic waveform and native WAVA circuit extends the same generated entry through the effective 128→22 final convolution, checked channel-major exp/sin conversion to separate frame-bin magnitude and phase, and the mapped inverse STFT. With pinned final-generator features supplied only to a separately labeled diagnostic entry, direct full-model maximum errors are 2.67e-5 at the convolution, 2.01e-5 at magnitude, 9.47e-6 at phase, and 2.20e-6 at the waveform. The fully connected entry produces 61,800 finite FP32 samples from pinned phonemes and voice conditioning, but its waveform differs by 0.007652 maximum, an explicit numerical FAIL inherited from upstream. A standalone C host loads the exported arena segments, calls the generated entry once, and writes a 2.575-second, 24 kHz mono PCM WAV without Python model scheduling; the local captured-noise file has no clipped samples. A separate versioned package lets the host fill the reserved Gaussian region from a request seed before the same generated entry. One phoneme length and voice, no native text frontend, and no cancellation/session contract remain.Direct-input spectral/waveform parity PASS; connected execution and WAV PASS; connected numerical parity FAIL; seeded native-noise execution diagnostic; accessibility TTS NOT_TESTED
Remaining certification and accessibilityResolve connected F0 and source/STFT numerical mismatch with identical-input replay; compare seeded native synthesis under its own statistical/listening contract; certify differing phoneme counts and voice-row selection. Native normalization/G2P, bounded speech sessions, playback, interruption and cancellation remain.Connected numerical parity FAIL; PyTorch-noise equivalence, arbitrary text and accessibility session NOT_TESTED
Dictionary-only native text, process-level stop/replace, playback and P3/Ryzen performanceOn the i7-14700T/P3, earlier generated-entry A→B→A timings were 92.74, 91.67 and 91.58 seconds for 61,800, 58,800 and 61,800 samples; they exclude standalone package loading and WAV writing. Standalone Ryzen processes took 94.473 and 78.365 seconds for 61,800 samples (2.575 seconds of audio); the sampled profile identifies scalar Conv1D and out-of-line fmaf as the immediate speed bottleneck. A dictionary-only native frontend reaches the 8/36-ID selector. A one-request native supervisor now provides process-level stop/replace; full text preparation, persistent-weight synthesis and application playback remain open. No directly comparable P3 standalone-process measurement, warm-only Ryzen measurement or application playback measurement exists.Bounded text preview PASS; process-level stop/replace tested with synthetic child; P3 generated-entry and Ryzen process timings MEASURED; practical latency FAIL; full accessibility session NOT_TESTED

Source/STFT numerical diagnosis

The connected generated source path still fails direct pinned-model parity. A diagnostic variant of the scalar STFT records the actual FP64 real and imaginary accumulators immediately before atan2; it uses caller-owned trace storage and the same arithmetic as the production provider. With identical pinned source samples, the first-frame bin 7 has CKE real -0.06778858773229121 and imaginary -1.8178155721687052e-9, yielding -π. Pinned PyTorch 2.8 reports real -0.06778859347105026 and positive-zero imaginary, yielding +π. A 20-sample excerpt reproduces this exact CKE accumulator. Raw phase is fed to source convolution, so circular-angle equivalence is insufficient: identical source samples produce a first-convolution maximum difference of 0.160075 despite complex STFT errors below 1.6e-7. Feeding identical reference STFT channels to the native convolution reduces its maximum difference to 3.34e-6.

There is also an upstream source difference. The earlier difference-interpolation graph differed from the pinned source by at most 6.10e-4; PyTorch STFT on that CKE waveform still left a 0.333573 first-convolution maximum difference versus the pinned full model. With the weighted-FMA provider selected, those bounds improve to 4.28e-4 and 0.260741 on the same fixture. A controlled pinned-model run that replaces only its F0 input with CKE's generated F0 reproduces a 0.260744 first-convolution difference and a 0.007766 final reference-waveform difference. CKE's source waveform and the pinned source module agree within 1.49e-8 when given that same generated F0 and captured noise. The connected numerical result remains FAIL. These substitutions diagnose causes; they are never part of the generated production graph.

A pinned-model waveform-impact diagnostic replays the exact captured random tensors and verifies its unmodified baseline is bitwise equal to the retained 61,800-sample waveform. It then substitutes alternative first source-convolution outputs in the Python reference only. With pinned source plus CKE STFT/convolution, the final waveform changes by at most 2.31e-4 (RMSE 8.55e-6). With the weighted-FMA source and PyTorch STFT/native convolution, it changes by at most 0.007667 (RMSE 2.32e-4), down from 0.013611 (RMSE 8.46e-4) for the earlier source provider. With the new generated source held fixed, switching PyTorch to CKE STFT changes the downstream waveform by at most 1.28e-6; the pinned-source phase branch cut remains a separate failing compatibility case. These are controlled reference-model interventions, not a CKE-generated waveform. The present contract keeps the scalar direct-DFT provider and the raw-phase compatibility failure visible. A backend-matching STFT reduction-order provider requires a separate map and independent tests; no phase snapping, oracle substitution in production, or global tolerance change is justified by this diagnostic.

The F0 error decomposition identifies the upstream target: separate standard-nightly diagnostic cases report full-model maximum differences of 3.52e-6 after the first F0 block, 1.91e-5 after the second, 2.38e-5 after the third, and 3.24e-4 after final projection. These are connected checkpoints, not identical-input operation replays; they do not yet identify the first divergent operation. Applying the same FP64 projection to both third-block outputs produces up to 3.28e-4 difference. Native and pinned projections also each differ from the FP64 projection on their respective identical inputs, by at most 1.71e-4 and 1.64e-4. Across the pinned and generated-F0 source waveforms, 30 raw STFT phase values cross the ±π branch cut. Even the two source waveforms that agree within 1.49e-8 under identical generated F0 produce one branch-cut difference at bin 7, frame 0. The next numerical work should replay the first F0 block and then its downstream operations with identical inputs, preserving each provider's reduction contract. The phase-sensitive consumer needs its own explicit compatibility decision backed by waveform evidence.

Oracle reproduction is a separate gate: on the 2026-10-21 Intel i7-14700T host, the retained pinned PyTorch capture and a fresh run of the same model differ by up to 0.005744 at the waveform, while captured F0, source and first source convolution reproduce exactly. This is an oracle reproducibility FAIL for that host and dispatch; it is not evidence that the CKE waveform passes or fails a native comparison. The source-impact diagnostic now reports every baseline checkpoint and controlled intervention before returning failure, so a drifting reference cannot hide the F0/source/STFT attribution. With generated F0 substituted only inside the labeled reference diagnostic, the live reference waveform changes by up to 0.007766. Holding generated source fixed and switching its STFT implementation changes the downstream waveform by up to 1.28e-6; the raw-phase branch-cut compatibility failure remains distinct. The standard nightly registers the cheap report test; asset-backed live execution is explicit and reports NOT_TESTED when unavailable. Run it with CKE_TTS_RUN_SOURCE_IMPACT_FULL=1 CKE_TTS_SOURCE_IMPACT_MODEL_DIR=/path/to/pinned/kokoro CKE_TTS_SOURCE_IMPACT_CAPTURE_DIR=/path/to/pinned/capture python3 -m unittest tests.test_v8_kokoro_source_impact_diagnostic. These interventions do not enter the production graph, whose connected numerical parity remains FAIL.

python3 -m unittest tests.test_v8_audio_stft_mag_phase_oracle tests.test_v8_kokoro_generated_source_stft_conv -v
python3 -m tests.diagnose_kokoro_source_waveform --model-dir /path/to/pinned/kokoro --capture-dir /path/to/pinned/capture

The first generator join is reproduced with python3 version/v8/tts/build_kokoro_generator_stage0_join_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_generator_stage0_join. The test reports the direct-model numerical mismatch separately from successful generated execution and never substitutes a reference intermediate into the connected graph. Its captured Gaussian input remains a diagnostic fixture.

The first main generator block is reproduced with python3 version/v8/tts/build_kokoro_generator_main_resblock0_circuit.py --check, python3 version/v8/tts/build_kokoro_generator_main_resblock0_oracle_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_generator_main_resblock0. The direct-input diagnostic certifies this block's arithmetic against nine pinned full-model checkpoints, including selected-provider X-Ray comparison. The connected generated entry consumes CKE's own join and reports the inherited numerical FAIL separately; it never uses the diagnostic input. Standard nightly runs the suite; its fixture can be rebuilt from the pinned model capture and effective-weight BUMP bundle.

The complete first-stage residual pool is reproduced with python3 version/v8/tts/build_kokoro_generator_stage0_pool_circuit.py --check, python3 version/v8/tts/build_kokoro_generator_stage0_pool_oracle_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_generator_stage0_pool. The direct-input entry supplies the pinned join only to isolate block arithmetic and the three-way mean. The connected entry supplies its own join and retains a separate numerical FAIL. The committed fixture comes from the pinned full-model capture and effective-weight BUMP bundle; altered-length requests are safety evidence only.

The second main-path ingress is reproduced with python3 version/v8/tts/build_kokoro_generator_stage1_ingress_circuit.py --check, python3 version/v8/tts/build_kokoro_generator_stage1_ingress_oracle_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_generator_stage1_ingress. Its direct-input test isolates the new arithmetic from the known upstream mismatch; the connected test executes CKE's own preceding stages. The pinned fixture is regenerated by version/v8/tts/reference/build_kokoro_generator_stage1_ingress_fixture.py from full-model hooks and effective BUMP weights. This boundary produces 128-channel generator features, not audio samples.

The second source convolution is reproduced with python3 version/v8/tts/build_kokoro_generator_stage1_source_conv_circuit.py --check, python3 version/v8/tts/build_kokoro_generator_stage1_source_conv_oracle_circuit.py --check and python3 -m unittest tests.test_v8_kokoro_generator_stage1_source_conv. It applies pinned effective 22→128, kernel-one weights to the generated source STFT at the checked 12,361-frame extent. A separate diagnostic entry feeds the exact pinned STFT channels and differs from the full-model source-convolution hook by at most 4.77e-7. The connected entry consumes CKE's own upstream STFT and still differs by 0.263449; that numerical result remains a diagnostic FAIL, not a model-parity pass.

The second-stage pool gate is python3 -m unittest tests.test_v8_kokoro_generator_stage1_pool. The complete diagnostic waveform gate is python3 -m unittest tests.test_v8_audio_spectral_head_oracle tests.test_v8_kokoro_istft_full_model tests.test_v8_kokoro_generated_waveform. Regenerate its circuits with python3 version/v8/tts/build_kokoro_waveform_circuit.py --check and python3 version/v8/tts/build_kokoro_waveform_oracle_circuit.py --check. The direct-input entry isolates the final convolution and inverse STFT; the connected entry computes every upstream tensor itself. Its model-level numerical comparison remains a FAIL, and the WAV is experimental. Set CKE_TTS_RUN_STANDALONE=1 to run the heavier standalone C-host replay on an asset-backed machine; CKE_TTS_RETAIN_DIR retains its native binary, generated library, prepared fixed-input package and WAV outside the checkout.

Controlled source-path isolation: python3 -m unittest tests.test_v8_kokoro_generated_source_stft_conv feeds the pinned STFT channels directly to the native source-convolution kernel. Its maximum error against the direct full-model convolution hook is 3.34e-6, so the checked convolution contract passes with identical input. With the exact pinned source waveform, native STFT magnitude differs from pinned PyTorch 2.8 by at most 1.20e-7, but one raw phase sign differs at bin 7/frame 0 and changes the first convolution by 0.1601. A caller-owned diagnostic trace records the actual pre-atan2 real and imaginary accumulators. With the weighted-FMA provider selected, generated-source-to-pinned-source drift still propagates through PyTorch STFT to a 0.260741 first-convolution maximum difference. Raw-phase compatibility remains a numerical FAIL. The live comparison requires pinned PyTorch 2.8 and is explicitly skipped in other environments; the committed-fixture convolution comparison remains available without PyTorch. No reference tensor is substituted into the production generated graph.

Native excitation RNG boundary: the graph receives explicit Gaussian samples and publishes no RNG state. The standalone C host now supports a separate diagnostic package that fills the reserved Gaussian buffer with the checked counter-based provider using a request seed before invoking the same generated entry. This tests deterministic native execution without a global RNG; it does not make PyTorch and CKE random draws equal, nor does it establish connected waveform parity or a cancellable multi-request session. The captured-Gaussian package remains the identical-input arithmetic lane.

Input geometry limit: the three direct-model decoder comparisons all use 36 phoneme IDs, the same af_heart conditioning selection, and one compiled graph. Their distinct A=98, 101 and 103 frame counts exercise runtime frame extents; they do not establish variable phoneme lengths or different voice rows. Before a reusable speech service is claimed, certify those inputs, capacity boundaries and repeat-after-failure behavior. The connected source graph produces excitation samples, not final waveform samples or playable audio.

Decoder numerical contract: kokoro.decoder-complete.pinned-fp32-v1 assigns one ceiling to each named checkpoint across all three utterances. The final block's second AdaIN output differs by up to 8.12e-5 on one alternate utterance; its following convolution differs by up to 1.20e-4, while the residual output differs by up to 8.41e-5. The 1e-4, 2e-4 and 1e-4 ceilings for those three stages reflect measured propagation through this connected FP32 graph. The larger convolution error does not establish an exact reduction-order cause. The test reports each checkpoint's worst index, native/reference values, maximum absolute error and RMSE, and rejects fixtures with different model, reference-code or source-asset identities.

The authoritative runnable gate for the acoustic text branch is python3 -m unittest tests.test_v8_kokoro_text_primitives tests.test_v8_checked_text_ops_generated tests.test_v8_kokoro_generated_text_encoder. The first suite tests reusable scalar arithmetic and rejection; the second compiles a model-neutral graph; the third lowers a 178-operation Kokoro circuit to one generated native entry with pinned effective weights. Repeated calls reset recurrent state; malformed convolution weights stop downstream execution without publishing an extent. The generated model output is still features, not speech.

The current connected prosody gate is python3 -m unittest tests.test_v8_audio_prosody_upsample_oracle tests.test_v8_runtime_extent_scale tests.test_v8_prosody_upsample_generated tests.test_v8_kokoro_generated_prosody_complete. The canonical complete builder is python3 version/v8/tts/build_kokoro_prosody_complete_circuit.py --check. It extends the earlier first-block circuit through a checked A-to-2A boundary, both remaining F0/noise residual blocks and their projections. The source-page status table is authoritative; earlier partial-prefix suites remain independent regressions.

The connected decoder-ingress gate is python3 -m unittest tests.test_v8_audio_concat_channels_checked tests.test_v8_audio_concat_channels_generated tests.test_v8_kokoro_generated_decoder_ingress. The circuit is regenerated by python3 version/v8/tts/build_kokoro_decoder_ingress_circuit.py --check. The two-input join provider copies valid channel-major FP32 samples exactly, validates all input regions before writes, and preserves physical padding. Effective decoder weights and direct model hooks come from the pinned Kokoro/PyTorch 2.8 capture; the generated entry computes every upstream tensor itself. The same 103-frame length binds all ingress consumers after checked 206-to-103 downsampling. X-Ray resolves the join's selected exact-copy contract and compares only the 103 valid frames of each 128-frame row, with artifact and resolved runtime-library provenance recorded separately. This is decoder-input evidence, not a generated acoustic decoder output or a WAV.

The connected first-decoder-block gate is python3 -m unittest tests.test_v8_kokoro_generated_decoder_encode, and its circuit regeneration check is python3 version/v8/tts/build_kokoro_decoder_encode_circuit.py --check. Effective weights come from the pinned BUMP export; direct hooks from the pinned full model supply the oracle. The circuit owns style and residual connections, maps provide checked provider contracts, and generated C executes with caller-owned buffers. The numerical comparison applies separate checkpoint bounds rather than one global decoder tolerance. X-Ray resolves the final residual provider's selected contract and compares only valid output frames with separate artifact and resolved-library provenance. Altered-duration requests prove checked geometry and padding only; they are not additional model-level oracle cases. This block produces acoustic features, not waveform samples.

The complete-decoder gate is python3 -m unittest tests.test_v8_kokoro_generated_decoder_complete; regenerate its circuit with python3 version/v8/tts/build_kokoro_decoder_complete_circuit.py --check. It reuses the same style-conditioned block authoring and existing checked providers. The pinned full-model capture and two additional same-geometry utterances provide direct output checkpoints. The generated entry performs every upstream model stage itself; Python captures and compares reference values but does not schedule native execution. The 512-by-2A output is ready for the waveform generator. This is phoneme-to-acoustic-feature evidence, not playable speech.

F0/noise arithmetic contract: audio_adain_instance_norm_f32 implements channelwise InstanceNorm1d affine followed by style affine over checked valid frames. audio_scaled_sum_strided_f32_checked scales the completed residual sum. The new nearest-upsample provider copies exact FP32 values; the depthwise transposed-convolution provider accumulates in ascending input-frame/tap FP32 FMA order and uses caller-owned scratch. A checked integer scale publishes 2A only after overflow and capacity checks. Independent PyTorch 2.8 fixtures cover the new upsampling primitives; direct pinned full-model hooks cover both complete branches. The F0 projection uses a checkpoint-specific 5e-4 absolute ceiling: its 256-channel reduction amplifies a measured 2.39e-5 third-block input difference. The noise projection and both residual-block checkpoints retain 1e-4 ceilings. These are inference-only contracts.

Text embedding boundary: audio_text_embedding_channel_major_f32 performs an exact checked FP32 table lookup with caller-owned output, explicit capacity and channel-major stride. Its pinned PyTorch 2.8 fixture and small generated synthetic circuit pass exact equality; invalid IDs, nonfinite selected weights, short buffers and overflow leave output unchanged. python3 -m unittest tests.test_v8_kokoro_generated_text_embedding compiles a 163-operation Kokoro circuit through normal lowering and generated C. Its embedding matches the independent pinned [512,36] capture bitwise; the 103-frame expanded embedding also matches a separately computed repeat of that capture bitwise. X-Ray records valid extents, physical strides, artifact hash and resolved runtime symbol library; its embedding checkpoint resolves the exact lookup contract. The expansion checkpoint now records the selected channel-major provider contract; this staging fixture remains a separate historical gate. The generated text expansion is a staging test: Kokoro applies convolution, normalization, activation and a bidirectional LSTM between embedding and duration expansion. That older fixture's values are not Kokoro's final text features; use the complete acoustic text encoder suite above for the current generated feature evidence. Neither circuit generates waveform samples.

Connected expansion evidence: python3 -m unittest tests.test_v8_kokoro_generated_expansion compiles the 162-operation circuit through normal v8 lowering and codegen. For the pinned 36-token, 103-frame capture, generated duration expansion differs from the independent PyTorch reference by at most 1.28e-5 locally; the oracle-fed text expansion is bitwise equal. The test checks valid regions, untouched padding, repeated execution, rejected upstream results, and X-Ray artifact and resolved-symbol provenance. X-Ray now records each expansion checkpoint’s selected provider contract, including the distinct token-major and channel-major implementations, when its selected map has one unambiguous validated capability. These are feature tensors, not generated waveform samples.

Metadata limit: the fixed circuit declares matching channel dimensions, and the compiler checks overridden capacities, token count and physical strides. A deliberately edited circuit can still give a dimension-bound channels scalar that differs from the map's logical C. General dimension-to-shape consistency remains a compiler-contract follow-up before accepting arbitrary authored expansion circuits.

The status table above is authoritative. The milestone records and initial operation inventory below describe earlier bring-up states; their pending-work statements are historical unless repeated in the current table.

Historical milestone: connected duration predictor

build_kokoro_duration_circuit.py extends the canonical encoder graph with explicit style broadcasts, recurrent scans and normalization, then lowers 160 operations through the normal v8 planner and generated-C entry. The 36-token pinned PyTorch 2.8.0 capture and effective BUMP weights supply independent checkpoints. The generated entry returns exact pinned int32 durations and 103 frames. On the hosted AMD runner, the connected first scan and adaptive normalization differ by at most 3.41e-5 and 5.86e-5; final logits differ by 3.44e-5. Direct provider replay on the connected inputs must match generated execution exactly; replay on pinned oracle inputs must remain within 3e-6. The separate input-perturbation check caps incoming scan error at 3e-5, incoming normalization error at 4e-5, and each provider's amplification at 7e-5. Only the three connected checkpoints affected by that propagation use a 7.3e-5 absolute ceiling; the other connected and primitive bounds remain unchanged. This is a bounded cross-host composition contract, not bitwise PyTorch parity or a new reduction-order provider.

python3 version/v8/tts/build_kokoro_duration_circuit.py --check
python3 -m unittest tests.test_v8_feature_concat_broadcast_oracle tests.test_v8_feature_concat_broadcast_generated tests.test_v8_kokoro_generated_duration -v
python3 scripts/nightly_runner.py --tests tts_kokoro_generated_duration --json /path/to/duration-nightly.json

The circuit uses caller-owned arena storage and declared provider scratch. Generated failure handling rejects an insufficient arena or a frame count above capacity before publishing durations or the frame extent. A separately compiled native host replays the pinned request outside the checkout. X-Ray identifies generated graph checkpoints, physical layouts, on-disk artifact hashes and capture-time symbol/library resolution; these provenance signals do not constitute an embedded runtime build identity. The frame count is returned through the native entry's output scalar; the reserved arena extent slot is not a second published result.

Coverage boundary: fixed phoneme IDs and one pinned conditioning row produce durations, not a waveform. Other lengths, native G2P, duration-dependent feature expansion from generated features, prosody, acoustic decoding, waveform-source randomness, listening, cancellation, backward support and CPU performance are still unverified.

Current authoring and regression contract

version/v8/tts/kokoro_albert_block.json is the canonical block declaration. build_kokoro_albert_circuit.py generates the first-layer test circuit; build_kokoro_encoder_circuit.py expands the same declaration into twelve shared-weight invocations and the final projection. Production authoring does not read test fixtures. Token capacities, row strides and LayerNorm/GELU scratch are derived explicitly from dimensions. The generated 147-operation encoder schedule is unchanged.

Fixture loading is shared without compiling a prefix. The first-layer suite still executes independently; the complete encoder suite compiles only the graphs it actually certifies. Its 300-second timeout remains a failure, with completed diagnostics preserved. Numerical comparison counts are checkpoint comparisons, not independent model counts.

python3 version/v8/tts/build_kokoro_albert_circuit.py --check
python3 version/v8/tts/build_kokoro_encoder_circuit.py --check
python3 -m unittest tests.test_v8_kokoro_generated_encoder tests.test_v8_kokoro_generated_albert_layer -v

Negative controls compile geometry-valid graphs with an incorrect second-layer input edge or query/key shared-weight binding. Independent pinned captures must detect both the changed checkpoint and final features. Swapped invocation captures must also fail the elementwise gate. These are expected-rejection tests, not speech certification.

X-Ray limitation: the suite enforces the full elementwise propagation contract; current X-Ray profiles receive its maximum scalar allowance. An isolated X-Ray PASS therefore provides a weaker gate. Sharing that numerical-contract representation with X-Ray remains follow-up work coordinated with the shared comparator owner; this cleanup does not change tolerances or claim that refinement is complete.

Historical decoder milestone: this decoder result covered three same-geometry phoneme inputs. The current diagnostic graph now reaches a native waveform; its connected numerical failure and deployment limits are recorded in the status table above.

Implementation plan

Status: architecture and interface proposal with bounded complete generated prosody evidence described in the authoritative table above. No complete speech model, speech session, listening quality result, or CPU speed is certified by this document.

Scope and ordering

The first implementation milestone is phoneme IDs plus one fixed voice to a generated FP32 waveform. This isolates model arithmetic from text normalization and G2P; it is phoneme-to-waveform, not complete native text-to-speech. The first product milestone is one repeatable path from a local assistant response to audible PCM. Keep Kokoro as the first generated-C model and fallback candidate; evaluate Chatterbox Turbo for interaction and Qwen3-TTS 1.7B for capability only after their exact upstream revisions, preprocessing, and numerical contracts are recorded. The accessibility application may use an existing local speech runtime until native Kokoro passes the complete gate. Kokoro implementation can proceed in parallel with bounded generated-audio optimization and Gemma vision work; reserve P3 or Ryzen for uncontended numerical and performance certification.

The accessibility design is in docs/notes/ACCESSIBLE_AGENT_MEMORY_PALACE.md in the active accessibility checkout. Its application owns speech queuing, playback, policy, emergency stop, and sentence navigation. Generated model code owns only mathematical execution. The host owns text preparation, request state, output buffers, PCM conversion, and cancellation.

Current CKE boundary

include/ck_session_v8.h describes a text token session. The current version/v8/src/ck_cli_v8.c implementation requires autoregressive decode, text encode, and token decode capabilities at open. It uses process-global generation variables and generated-model entry points without a session handle. Its cancellation flag is checked between text generation steps. Reusing that ABI unchanged would fail the requirements for independent speech requests, PCM metadata, explicit model scratch, and bounded output. A speech ABI should be separate and versioned; it can reuse descriptor/error conventions.

The v8 audio circuit and kernel maps primarily implement inbound audio and ASR: PCM decode, resampling, STFT, Mel, Conv1D, Conformer, and Whisper encoder/decoder work. This is useful for input conversion and selected forward primitives, but it does not constitute a TTS decoder or a waveform oracle. Any shared kernel must retain the target model's exact layout, padding, rounding, and operation order. The current tree has checked bidirectional LSTM inference with pinned recurrent oracle evidence; acoustic text encoder reuse is covered by the generated fixed-utterance gate above. Other LSTM geometries still require their own validation. CKE's C implementations belong in src/kernels; v8 circuits and kernel maps describe selection and lowering. TTS reference capture lives separately from deployed arithmetic.

DSL fit and compiler boundary

CKE already supports declarative sequence, block_types with header/body/footer, component circuits with explicit stitch edges, graph_slots, weight_refs, required numerical contracts, and circuit-owned activation buffers. Kokoro's fixed arithmetic graph should be decomposed into phoneme embedding/ALBERT, duration and alignment, prosody/text encoding, decoder/generator, and inverse-STFT components. Repeated ALBERT and residual blocks belong in circuit bodies; fixed voice selection and duration policy belong in declared operations and the native host, not a kokoro branch in the lowerer. New mathematical providers belong in src/kernels with kernel-map contracts and oracle tests.

Current build_ir_v8.py still uses static OP_DATAFLOW, TEMPLATE_TO_KERNEL_OP, and TEMPLATE_OP_WEIGHTS tables. Its circuit activation-buffer expressions resolve from configuration at build time; they cannot by themselves bind a live predicted duration sum. A fixed oracle utterance can specialize those extents for numerical bring-up. General speech requests need a generic checked runtime-extent/buffer-binding capability, or bounded maximum buffers with live lengths passed through ordinary operation parameters. The compiler must reject an unknown TTS operation or unresolved extent; adding family-specific branches would hide missing DSL capability. Ownership of shared codegen and registry changes must be agreed with agents working in those files before implementation.

Target architecture inventory

These are candidate upstream pins for an import audit, not compatible CKE artifacts. Recheck licenses for every packaged dependency and voice asset independently of the model repository's top-level license. The Kokoro oracle environment still needs resolved wheel, spaCy model, and optional eSpeak data versions and hashes; the selected voice ID and asset hash are also open.

Target Candidate model snapshot and license Preparation, generation, output State and missing CKE contracts
Qwen3-TTS 0.6B CustomVoice, 12 Hz — first CKE comparison target Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice@85e237c, Apache 2.0 The pinned reference code tokenizes text, applies a preset speaker and language, runs a 28-layer talker and 5-layer code predictor, then decodes the 16-group codec tokens into 24 kHz PCM. The CKE oracle capture records text token IDs, codec tokens and waveform. CKE connects pinned prompt IDs through generated embedding, text projection and all 28 talker prefill blocks. The bounded generated loop reaches natural EOS after 46 frames, with all 46 × 16 code IDs matching the committed reference. The generated loop now feeds the complete codec on the same planned arena and produces 88,320 FP32 samples at 24 kHz; maximum error against the pinned waveform is 1.33e-6. This certifies one pinned prompt-ID-to-PCM trajectory. Runtime text preparation, varied requests, sampled generation, a WAV host and speech-session behavior remain NOT_TESTED. This 0.6B CustomVoice variant ignores style instructions.
Kokoro v1.0 hexgrad/Kokoro-82M@e8a90b41091c3c5b70375c47cc959799920fa4d6, Apache 2.0 Normalization and Misaki G2P at fba1236 produce phoneme IDs. Kokoro code at dfb907a applies ALBERT, duration LSTM and length regulation, prosody and text encoding, then AdaIN/ISTFTNet waveform decoding. One exported voice table can supply fixed style conditioning. Deterministic whole-utterance synthesis; cap symbols and predicted frames. Need exact LSTM, duration expansion, adaptive/instance norm, upsampling, inverse STFT, waveform and native G2P contracts. Lock resolved G2P packages and data before oracle capture.
Chatterbox Turbo ResembleAI/chatterbox-turbo@749d1c1a46eb10492095d68fbcf55691ccf137cd, MIT model/repo; review reused component notices Code at 5de7a54 normalizes text, uses the tokenizer files in the model snapshot and stored conditioning, generates T3 speech tokens autoregressively, then S3Gen converts tokens to waveform via conditional flow and HiFTGAN/F0 stages. Sampling seed, EOS/max-token caps, flow state and vocoder scratch must be explicit. Need model-specific token, flow, F0 and vocoder operations. Reference returns a whole waveform; audio streaming is unverified.
Qwen3-TTS 1.7B CustomVoice, 12 Hz Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice@0a272c2df2ee9be6b850d1df75bcf673541e523a, Apache 2.0 Code at 022e286 formats text using the model snapshot's tokenizer files and built-in speaker/language condition, generates codec tokens with talker and code predictor, then calls the separate neural speech tokenizer decoder for waveform. Sampling, EOS, token and frame caps, code-predictor cache and codec state must be explicit. Need exact codec decoder operations and numerical contracts. Voice cloning applies to a different variant. Upstream input simulation does not establish waveform streaming.

Qwen3-TTS technical-text reference diagnostic: P3 runs of the pinned 0.6B CustomVoice model distinguish a model stop from a generation budget. The literal path and signed-number case Read /home/antshiv/Workspace/C-Kernel-Engine/server_summary.txt. The value is -3.5, not +3.5. reached a 320-token cap under deterministic greedy decoding, with 319 audio frames and no EOS; the replay reproduced the original diagnostic WAV SHA-256 exactly. A plain sentence under the same greedy policy stopped at EOS. The pinned generation configuration defaults to sampling, while the earlier oracle capture requested greedy decoding. The sampled policy stopped on the literal case after 142 audio frames, yielding 11.36 seconds of 24 kHz audio in 32.35 seconds on P3. The other six retained technical cases also reached EOS under sampled decoding. This identifies a text-and-policy interaction in the reference, not a CKE kernel defect. The retained technical-text corpus preserves source text and labels optional pronunciation expansions explicitly. The asset-backed version/v8/tts/evaluate_qwen3_tts_accessibility_reference.py records raw talker EOS, output hashes, model/reference identities, memory and timing; its cheap corpus/stop contract runs in standard nightly. Human listening, native CKE generation, and true first-audio latency remain separate unpassed gates. The official wrapper returns a complete waveform even when its text-input simulation mode is used; it does not establish streamed audio delivery. On the sampled diagnostic WAV, CKE Whisper Base recognized “not plus 3.5” but missed the minus sign and full path; this is supporting transcript evidence, not a human listening verdict or waveform-parity result. With an explicitly selected spoken expansion for the signed-number sentence, CKE Whisper recognized “minus 3.5, not plus 3.5.” That check uses different spoken input and still needs listening confirmation. Run the following in the pinned reference Python environment, with the verified model and reference checkouts set in the two environment variables:

PYTHONPATH="$CKE_QWEN3_TTS_REFERENCE_ROOT" python \
  version/v8/tts/evaluate_qwen3_tts_accessibility_reference.py \
  --model-dir "$CKE_QWEN3_TTS_MODEL_DIR" \
  --case plain_update --case literal_path_signed \
  --policy sampled --max-new-tokens 320 --require-eos \
  --output-dir /tmp/cke-qwen3-accessibility-sampled

Qwen3-TTS generated talker prefill: the committed CPU oracle for Hello, this is CKE. contains 15 text token IDs, 46 codec frames with 16 code groups per frame, and 88,320 waveform samples at 24 kHz. The model snapshot declares a 2,048-channel text embedding followed by 2,048-channel linear, SiLU, and 1,024-channel linear projection into the talker. CKE now has generated-C checkpoints for the talker projection and all 28 prefill blocks. One generated entry assembles the pinned non-streaming English/Ryan prompt from projected text rows and codec embeddings, then runs the complete talker prefill, final normalization and codec head. The declared row-index plan is validated by a reusable checked gather-and-sum provider. For the seven-token spoken-text context, prompt assembly differs from the direct model capture by at most 2.38e-7 and the first-block output by at most 9.54e-6. Invalid IDs and row indices stop downstream execution, while a valid but incorrect row edge fails the prompt checkpoint. The complete prefill uses 570 declared operations and 316 distinct weight tensors. Direct pinned PyTorch checkpoints cover each layer and final logits. A separate checked continuation graph seeds 28 caller-owned KV caches from generated prefill and executes three one-token teacher-forced decode steps through normal generated C. The step inputs are captured reference embeddings, so this tests continuation arithmetic and state, not autonomous code production. Each step checks the generated layer outputs, appended KV rows and logits against the pinned reference. The position is derived from a checked request step index; invalid positions reject before neural execution. On the pinned three-step replay, maximum differences are 6.78e-5 for the prefill cache, 6.20e-5 for decode layer outputs, 2.05e-5 for newly appended KV rows and 5.25e-5 for logits. The prefill cache copy is exact relative to CKE's own generated K/V; its comparison to PyTorch includes upstream projection drift. Standard nightly also runs a two-layer generated graph with nonzero synthetic weights and a scalar recurrence check, so repeated-layer stitching remains tested without the model asset. The tests are tests/test_v8_indexed_sum_rows_checked.py and tests/test_v8_qwen3_tts_prompt_first_block.py and tests/test_v8_qwen3_tts_talker_prefill.py and tests/test_v8_qwen3_tts_talker_continuation.py.

Qwen3-TTS code-predictor frame: the pinned CPU reference captures the first speech frame's two-token prefill, then fourteen one-token continuations. A generated five-layer prefill seeds caller-owned KV state; generated five-layer continuation calls append positions 2 through 15 with the declared codebook head for each step. With identical reference-supplied projected embeddings, all 15 greedy codebook IDs match, the largest newly appended KV-row difference is 2.46e-5, and the largest logit difference is 6.49e-5. This certifies teacher-forced predictor arithmetic and cache progression, not autonomous code production. An intermediate layer-2 MLP output differs by 0.03125 on a value near 50,000, while its gate and up projections differ by at most 1.83e-4; the numerical diagnostics remain visible. Tests: tests/test_v8_qwen3_tts_code_predictor_prefill.py. The teacher-forced suite remains a separate identical-input arithmetic lane.

Generated predictor feedback: a second circuit connects the prefill logits to checked final-row argmax, exact token-major codebook embedding, fourteen five-layer continuations and a final checked ID selection. One generated native entry emits all 15 predictor IDs in the pinned first speech frame, matching the reference sequence exactly. Maximum logit error across the continuation heads is 6.49e-5. The graph clears its valid-code count at the start of each invocation and publishes 15 only after the final selection succeeds. A late invalid embedding row leaves that count zero; restoring the weight permits reuse without reloading. This is autonomous within the predictor frame, starting from reference-supplied initial embeddings. The first talker code, complete talker generation, codec join, EOS/sampling and text-to-WAV remain unconnected. The cheap synthetic graph also tests alternate IDs and short → different → short reuse without model assets. Tests: tests/test_v8_qwen3_tts_predictor_feedback.py.

Connected first speech frame: a third circuit joins the generated 28-layer talker prompt prefill to the predictor frame. Checked final-row selection emits first codec ID 1995. An exact embedding lookup and indexed row assembly pass the talker's final hidden row and selected first-code embedding into the predictor. The connected native entry emits the same 15 predictor IDs as the pinned reference; the two-row predictor input differs by at most 3.27e-5. The complete-frame count is cleared before the talker runs, so malformed prompt or bridge inputs cannot leave a previous frame valid. The asset-free graph test exercises alternate inputs, a deliberately wrong row, rejection, and recovery. The host still supplies the declared prompt and bridge index plans; it does not supply neural intermediates. This certifies one pinned first frame, not continuation, EOS handling, codec-to-waveform composition, or complete text-to-speech. Tests: tests/test_v8_qwen3_tts_talker_predictor_frame.py.

Connected first frame to PCM: the generated ID scalars feed the matching 16 codec inputs as circuit edges, then the existing codec graph produces 1,920 finite samples at 24 kHz in the same native entry. The generated samples differ from a direct pinned one-frame PyTorch decoder capture by at most 9.55e-9. Waveform validity is cleared before talker execution and published only after the codec succeeds; an invalid selected codec table row prevents publication and permits recovery on the next call. The retained sample is about 80 ms and near silence. It is a numerical connection test, not intelligible Qwen speech. Producing later frames, EOS handling, a useful utterance, and a cancellable text-to-speech session remain. Tests: tests/test_v8_qwen3_tts_first_frame_waveform.py.

Generated first talker continuation: a bounded circuit seeds the 28-layer talker KV cache immediately after prompt prefill, then carries the first generated 16-codebook frame into the next talker input. The first codec ID uses the talker's embedding table; each of the remaining 15 IDs uses its own predictor codebook table. Circuit-declared FP32 sums combine those rows with the projected TTS pad row before one checked continuation step. This tests the feedback edge that the first-frame PCM graph does not execute. For the pinned utterance, all 16 generated IDs match; the next input has maximum absolute error 1.49e-8 and continuation logits 5.42e-5 against direct reference captures. The continuation position now comes from a checked request step index, with supported positions 18 through 20. An asset-free generated test proves the selected KV row, capacity rejection, untouched logits and recovery. Direct pinned-model parity remains established at position 18; positions 19 and 20 currently have safety evidence only because the graph still feeds back the first generated frame. This first-continuation circuit does not itself generate a second complete speech frame or loop to EOS. Test: tests/test_v8_qwen3_tts_generated_talker_continuation.py.

Connected second speech-code frame: the generated first-frame feedback produces the next talker logits, from which the same native entry selects the next codec ID, embeds it, assembles a two-row predictor input, and executes the five-layer predictor through all 15 remaining codebook selections. The pinned greedy case matches all 16 reference IDs in frame two; its predictor bridge has maximum absolute error 7.63e-5. A small generated test rejects an invalid bridge and over-capacity continuation before publishing the second frame count, preserves its selected output on failure, and recovers. This is connected generated execution from pinned text IDs, not an oracle-fed second frame. Selection now follows the pinned minimum-length and suppressed-ID parts of the greedy stop policy: the model's 2048–3071 suppressed ID range is excluded except for EOS 2150 after two emitted frames, and budget exhaustion has a separate positive status. Generated checked calls propagate stop status and skip dependent predictor work. The second-frame graph now applies the reference's sign-dependent repetition penalty to the first CKE-generated code ID before selection. It penalizes duplicate history IDs once, with a declared 105/100 factor and checked output preservation. The pinned adjusted-logit checkpoint has maximum absolute error 5.41e-5. The connected fixture exercises minimum-length EOS suppression; synthetic generated tests exercise actual EOS, budget short-circuits, and invalid penalty history. The rolling frame entry below adds bounded later-frame history; an autonomous generation loop and useful text-to-WAV remain. Tests: tests/test_v8_select_next_id_checked.py, tests/test_v8_repetition_penalty_checked.py, and tests/test_v8_qwen3_tts_second_generated_frame.py.

Qwen3-TTS bounded rolling-frame entry: one lowered circuit now emits a checked prefill function and a repeatable frame function against the same compiler-planned arena. The existing full-call entry remains as a checked wrapper over those functions, so the canonical graph is shared rather than copied. Circuit-declared state slots carry the previous frame's 16 code IDs, the first-code history, the expected step index and the talker KV cache. The frame entry checks state validity and exact step order, clears output validity, performs fresh codebook embedding lookups, appends KV at a checked position, generates the next 16 IDs and commits state only after those checks pass. A failed frame invalidates state until a new prefill. The pinned full-weight test matches all 16 reference IDs for both frame two and frame three and checks that the immutable first-frame IDs remain available to the two-frame PCM graph. Later positions have execution and capacity evidence only. The cache supports positions 18–80; the caller still supplies the step index, which generated C compares with its stored expected index before modifying KV state. This is a repeatable bounded step, not an autonomous EOS loop or a useful utterance. A model-neutral generated state-copy test checks repeated calls, rejection and recovery. Tests: tests/test_v8_copy_i32_span_checked.py, tests/test_v8_checked_multi_entry.py and tests/test_v8_qwen3_tts_two_phase_speech.py.

Qwen3-TTS bounded generation shell: the rolling circuit now declares capacity for up to 64 generated code frames, including the corresponding talker KV rows and first-code history. A model-neutral native loop invokes the generated prefill and frame entries on one arena, reads their declared code slots, and stops on the checked EOS status or frame budget. It stages codec IDs in caller-owned memory and publishes them only on EOS; rejection and budget exhaustion leave the output buffer unchanged and its valid-frame count zero. Asset-free tests exercise generated EOS and budget paths, output preservation, repeated invocation and malformed offsets. The asset-backed test runs the pinned full-weight graph to natural EOS at 46 frames and compares all 16 code IDs per frame with the committed reference. Its arena is about 3.74 GB. The talker-step limit is circuit-produced and bound to the generic checked extent provider; the previous inherited limit of 14 rejected talker step 15. This proves one complete greedy code trajectory, not varied-text or sampled generation. Tests: tests/test_v8_checked_frame_loop.py and tests/test_v8_qwen3_tts_full_code_loop.py.

Qwen3-TTS checked code-to-codec handoff: a new bounded circuit declares the frame-major code buffer, each codebook packing edge, and the complete codec schedule. A generic native shell accepts only a generated EOS with the exact frame and codebook geometry selected for that codec segment; it then executes the generated codec on the same planned arena and publishes finite PCM samples only after the sample count is checked. The asset-free synthetic test compiles all three segments through normal lowering and codegen, checks codebook order, rejects a wrong length or failing codec without publishing PCM, and verifies recovery on the same arena. The synthetic test forces EOS at two frames; it checks generic handoff and failure behavior. The separate pinned connected test below checks the complete model trajectory. The existing fixed-code codec oracle remains an independent numerical lane. Test: tests/test_v8_qwen3_tts_loop_codec.py.

Qwen3-TTS pinned prompt-ID-to-PCM trajectory: one checked native call invokes circuit-declared generated prefill, frame and codec segments. It uses the pinned prompt IDs and weights to generate 46 code frames, stops at natural EOS, packs all 16 codebooks per frame, and runs the complete codec on the same planned arena. The 736 generated IDs match the pinned reference exactly. The output has 88,320 finite FP32 samples at 24 kHz; maximum absolute waveform error is 1.33e-6 and RMSE is 7.23e-8 against the direct pinned-model capture. The measured generated run took 338.64 seconds for 3.68 seconds of audio on this bring-up host, so this is not yet interactive speech. An undersized arena rejects without publishing samples, and output padding remains untouched. The model assets are required for this test; their absence is NOT_TESTED. The test does not perform runtime text tokenization, support arbitrary text or lengths, write a WAV, or provide a cancellable speech session. Test: tests/test_v8_qwen3_tts_full_generated_waveform.py.

Qwen3-TTS codec Conv1D provider profile: on an Intel Core i7-14700T, segment timing of the pinned generated entry attributed about 215 of 339 warm execution seconds to codec decoding. A codec-only CPU sample profile placed the checked scalar Conv1D path ahead of dense deconvolution. Selecting the existing checked AVX2/FMA Conv1D map for codec calls in the circuit reduced the codec segment to 72.37 seconds in a repeat profile and the measured full generated execution to 197.43 and 196.20 seconds; all 736 generated code IDs and the FP32 waveform SHA-256 remained identical to the scalar run, and the pinned PyTorch waveform comparison retained its 1.33e-6 maximum error. This is one host and one pinned utterance, not a general latency guarantee. The scalar map remains the default; set CKE_QWEN3_TTS_CODEC_CONV_PROVIDER=avx2_fma for the optional asset-backed test. The provider is selected in circuit authoring, with normal map resolution and generated execution. Reproduce segment timings with version/v8/tts/evidence/profile_qwen3_tts_generated.py and the pinned model directory in CKE_QWEN3_TTS_MODEL_DIR. This does not provide variable text, a persistent request session or audio streaming.

Qwen3-TTS pinned native speech session: the bounded version/v8/tts/qwen3_tts_pinned_session.py command verifies the pinned model files, derives the certified prompt IDs with the model tokenizer, compiles the ordinary circuit, loads weights once, and invokes the checked native frame-to-codec shell for repeated requests. It clears planned mutable activations between requests, retains weights and the generated library, and writes a 24 kHz mono PCM16 WAV only after a valid sample count is published. Run from the repository root with the pinned model snapshot:

python version/v8/tts/qwen3_tts_pinned_session.py \
  --model-dir /path/to/85e237c12c027371202489a0ec509ded67b5e4b5 \
  --text 'Hello, this is CKE.' --output /tmp/qwen3-cke.wav --repeat 2

The command accepts nonempty, control-free English text that the pinned tokenizer encodes to exactly seven context tokens, with Ryan conditioning and up to 46 generated codec frames. It rejects other token lengths and requests that exhaust the frame budget. The original prompt produces 46 frames; Yes, this is CKE. produces 40 frames with matching reference code IDs and a 1.68e-6 maximum waveform difference in the asset-backed test. The second capture uses PyTorch 2.12.1+cpu; its manifest records the model, reference-code and runtime identities separately from the older fixture. This is a bounded two-text numerical demonstration, not arbitrary assistant replies, streaming or conversational latency. The persistent Python session now exposes stop(): the generic native shell checks it before prefill and between generated frames, and withholds valid PCM after a stop. An in-progress generated frame or codec entry runs to its next checked boundary; this does not yet establish prompt stop latency during codec work or playback cancellation. The host prepares input IDs and packages PCM; the circuit and generated native entries execute the neural graph. The registered session suite covers text rejection and WAV integrity; the asset-backed run checks cancellation recovery, A→B→A state reset and direct reference parity.

Qwen3-TTS runtime prompt-row prefix: one generated entry now accepts checked context lengths from one to seven tokens through text projection and the first talker block. The seven-token prompt and a two-token Hi. prompt execute short→long→short on the same loaded entry. The short prompt has a direct pinned-model first-block capture; its final block output differs by at most 9.54e-6 in the measured CPU lane. This is prefill-prefix evidence. The continuation position now consumes the checked prompt length in the generated runtime circuit described below.

Qwen3-TTS runtime prefill cache: the same checked row extent now drives all 28 talker layers and their per-layer K/V cache seeds. One generated entry runs two-token → seven-token → two-token text requests with capacity-strided cache storage. The seven-token logits match the pinned full-prefill capture within the existing 1.5e-4 bound; the short first-layer K/V rows match a separate direct capture within 8e-5. Cache copying, output padding, invalid lengths and repeated execution are checked separately. The continuation circuit now checks that the request length agrees with the prefill length before it appends to the cache.

Qwen3-TTS checked runtime continuation and short speech: the generated prefill and continuation segments derive attention position from the request's checked text-token count. A model-neutral extent operation and existing equality provider reject changed context between segments. Direct pinned captures for two- and seven-token prompts match generated prefill, first continuation logits and K/V rows; a synthetic generated test covers the next continuation position, invalid lengths and recovery. The same generated speech/codec library produces a 20-frame, 38,400-sample WAV for the three-token Thank you. request. All 320 generated code IDs match the pinned reference, and the PCM16 result differs by at most one quantization unit at 27 samples. Without reloading or recompiling, the same library then produces the seven-token Hello, this is CKE. reference: all 736 codebook IDs match, and PCM16 differs by at most one unit at 91 of 88,320 samples. The measured three-token run took 131.74 seconds after a 137.50-second cold load on the bring-up host. The separate two-token Hi. request exhausted the bounded generation budget without publishing audio; the pinned reference also did not emit EOS within 64 new tokens. Thus the bounded variable-length path is demonstrated, while general short-text stopping, latency and interactive accessibility speech remain unfinished.

Qwen3-TTS expanded prompt capacity: circuit authoring now derives cache and projection storage from a checked capacity of 16 spoken-text tokens. A generated 3 → 16 → 3 synthetic sequence checks the maximum extent, cache writes and untouched padding. The eight-token Yes, I can hear you now. request naturally stops at 39 code frames: all 624 generated IDs match a direct pinned full-model capture, and the 74,880-sample PCM16 output differs by at most one unit at 106 samples. The measured run took 179.89 seconds warm after a 138.43-second cold load on the bring-up host. Sixteen-token execution currently has safety evidence; full-model numerical evidence reaches eight tokens. The output remains bound to 46 code frames, so longer or non-stopping text is rejected without a WAV. This is not general assistant-reply coverage or interactive latency.

python version/v8/tts/qwen3_tts_pinned_session.py \
  --model-dir /path/to/85e237c12c027371202489a0ec509ded67b5e4b5 \
  --runtime-prompts --text 'Yes, I can hear you now.' \
  --output /tmp/qwen3-eight.wav

Two generated frames to PCM: a checked, model-neutral integer span concatenation provider packs each pair of CKE-generated codebook IDs into a two-frame input for the existing generated codec. The same generated entry then produces 3,840 FP32 samples at 24 kHz. The direct pinned decoder capture for these two frames is a separate oracle; the connected test matches all 32 IDs and has 8.85e-9 maximum waveform error. It preserves output validity on rejection and replays after recovery. This 160 ms fixed non-EOS prefix is diagnostic. It does not implement a generation loop, natural stopping, a useful utterance, or a speech session. Tests: tests/test_v8_concat_i32_checked.py and tests/test_v8_qwen3_tts_two_frame_waveform.py.

On the decoder side, one checked generated entry reconstructs all 16 split-RVQ codebooks, transposes the resulting features, applies exact left zero padding, and executes the causal pre-convolution with pinned weights. It then transposes the result into token-major order, performs the pre-transformer input projection and first RMSNorm, generates first-layer Q/K/V with RoPE applied to Q/K, and executes checked causal sliding attention with the pinned 72-frame window. The same entry then performs all eight transformer blocks with output projections, learned channelwise residual scales, post-attention normalization and gated MLPs, followed by final RMSNorm and the 512-to-1024 output projection. The same generated entry transposes that latent into channel-major layout and executes the first causal factor-2 transposed convolution with pinned weights, then applies a declared left zero pad and checked first-ConvNeXt depthwise convolution, followed by the first ConvNeXt block's normalization, pointwise projections, erf GELU, gamma scale and residual join. The same entry then executes the second causal factor-2 transposed convolution from that generated residual output. The direct pinned-model first-attention checkpoint has a maximum absolute error of 3.28e-7 on the 46-frame reference. An independent scalar oracle covers the window exclusion boundary at 73 frames, grouped heads, causality and rejection. The earlier 46-frame Q/K/V checkpoints have worst error below 4e-6 and the pre-convolution checkpoint has maximum absolute error 2.63e-6. The direct pinned-model first-block output differs by at most 3.58e-7; the largest intermediate difference is 5.72e-6 at the gated MLP. These are empirical per-checkpoint regression bounds on one 46-frame reference. The generated first-block test also exercises a synthetic 73-frame window boundary and rejects an invalid codec ID without publishing output. The complete pre-transformer test compares every layer output against direct pinned-model hooks on the 46-frame reference: the worst layer output difference is 2.86e-6 at layer 2, and the final projected output differs by at most 1.49e-7. It also tests nonzero two-block generated execution and that a changed second-layer weight leaves the first layer unchanged. These are empirical bounds for one reference sequence, not broad length certification. The first upsample's direct full-model output differs by at most 3.10e-6 on the 46-frame reference; replaying the same CKE input through PyTorch's transposed convolution gives the same maximum difference, locating this checkpoint's discrepancy in the local convolution comparison rather than the preceding latent drift. The precise arithmetic cause remains to be characterized. The direct full-model input and the older pre-transformer capture differ by at most 4.47e-8, recorded separately. These are measured, checkpoint-specific bounds; later vocoder operations have not inherited them. This is a connected codec prefix, not a codec waveform. The first ConvNeXt depthwise checkpoint differs from the direct full-model capture by at most 1.91e-5. Identical-input PyTorch replay has zero maximum error; the measured difference is exactly reproduced by propagating the first-upsample input difference. The complete first ConvNeXt output differs from the direct full-model checkpoint by at most 3.34e-6. The largest intermediate discrepancy is 6.49e-5 after the second pointwise projection; same-input PyTorch replay measures 1.43e-5 there and 7.63e-6 at the first projection. These retain the distinction between local reduction behavior and propagated upstream differences. The residual addition reproduces CKE's own captured inputs exactly; the small final difference does not certify later vocoder stages. The second upsample output has a maximum direct-model difference of 6.30e-5 and RMSE of 1.90e-6 on the same 46-frame code capture. Identical-input PyTorch replay differs by at most 2.39e-5; CKE's provider on the reference input differs by at most 2.01e-5. Propagating the first-block input difference through CKE's provider reaches 6.30e-5. The selected map declares ascending input-channel/frame/tap FP32 FMA accumulation; this is a checkpoint-specific empirical bound, not a new global tolerance or proof of waveform quality. Disabling MKLDNN for the identical-input PyTorch replay still leaves a 2.20e-5 maximum difference. The second complete ConvNeXt block now consumes that generated upsample through the same native entry. Its direct full-model depthwise checkpoint differs by at most 2.71e-4 (RMSE 2.94e-6), while identical-input depthwise replay matches exactly. The later pointwise projections have connected maximum errors of 9.83e-5 and 1.19e-4; on identical CKE inputs their local maximum errors are 5.73e-6 and 3.06e-5. The second block output differs by at most 4.90e-5 (RMSE 2.93e-6). The checkpoint-specific bounds preserve this propagated/local distinction; they do not certify waveform quality. The generated decoder ingress then applies the pinned causal 7-tap, 1,024-to-1,536-channel convolution. Its direct-model output has maximum error 1.24e-5 and RMSE 7.68e-7. On identical CKE inputs, PyTorch differs by at most 6.68e-6; on the captured reference input the operation matches exactly. A reusable checked SnakeBeta provider then consumes that generated ingress output using distinct raw log-alpha and log-beta weights. The pinned 1,536-channel, 184-frame decoder activation differs from the direct full-model capture by at most 1.51e-5 (RMSE 6.47e-7); identical-input PyTorch replay differs from CKE by at most 4.77e-7. These are bounded reference-code-fed composition results, not waveform or text-to-speech parity. The next generated call uses a checked dense transposed convolution with an explicit eight-frame right crop. It maps 1,536 channels and 184 frames to 768 channels and 1,472 valid frames. Its direct full-model output differs by at most 5.49e-6 (RMSE 3.22e-7); identical-input PyTorch replay differs by at most 5.01e-6. The crop is part of the reusable provider's checked geometry, and the existing uncropped provider retains its previous ABI. The three following dilated residual units (dilations 1, 3 and 9) now execute through that same generated entry using reusable SnakeBeta, left-padding, dilated-convolution and residual-sum providers. Direct full-model checkpoints after each unit differ by at most 5.49e-6, 8.59e-6 and 1.15e-5, respectively. Identical-input operation replay differs by at most 2.27e-6, 3.10e-6 and 5.01e-6. The second decoder block now consumes this generated output, applies its separate 768-channel SnakeBeta, a rate-5 right-cropped 768-to-384-channel transposed convolution, then three 384-channel residual units at dilations 1, 3 and 9. The same generated entry reaches 7,360 valid frames from the 46-frame captured codec sequence. Direct pinned full-model checkpoint maxima for these five outputs are 1.96e-5, 4.65e-6, 1.64e-5, 3.56e-5 and 5.35e-5; identical-input PyTorch replay maxima are 9.54e-7, 4.18e-6, 2.03e-6, 4.06e-6 and 5.25e-6. These are named empirical checkpoint bounds for the pinned PyTorch 2.14.1 CPU capture and one codec sequence. They distinguish local operation error from propagated upstream differences, and they do not certify other code sequences or waveform quality. The third decoder block continues the same circuit-owned entry through its separate 384-channel SnakeBeta, right-cropped rate-4 transposed convolution, and three 192-channel dilated residual units. On the first eight captured codec frames, all five new boundaries have direct pinned-model checkpoints. The final output has a 1.14e-4 maximum direct-model difference and 1.91e-6 RMSE; identical-input replay of that final residual unit differs by at most 2.39e-6. The short entry publishes 5,120 valid frames. A separately compiled entry for all 46 captured codec frames publishes 29,440 frames; its final output differs by at most 5.96e-5, with 1.14e-6 RMSE. These are empirical, named bounds for the pinned PyTorch 2.14.1 CPU capture and two reference-code lengths. The smaller local error distinguishes operation arithmetic from accumulated upstream drift. The two lengths use separately compiled circuits; this is not a variable-length runtime or proof of other code sequences. The fourth decoder stage now connects a rate-3 channel-changing upsample, three causal residual units, final SnakeBeta, a causal output convolution and checked clamp. Its generated entry publishes 15,360 samples from eight reference-code frames or 88,320 samples from 46 reference-code frames at 24 kHz. These are separately compiled reference-code-fed graphs; CKE does not yet generate the speech codes from text. Numerical results for the connected PCM are reported by tests/test_v8_qwen3_tts_codec_waveform.py and remain distinct from WAV-container validity. The reference capture is generated by version/v8/tts/capture_qwen3_tts_customvoice_oracle.py; its small token, codec and waveform fixture is retained under tests/fixtures/tts/qwen3_tts_0b6_customvoice/. The separate capture_qwen3_tts_codec_preconv.py and capture_qwen3_tts_codec_qkv.py and capture_qwen3_tts_codec_attention.py and capture_qwen3_tts_codec_first_block.py and capture_qwen3_tts_codec_pretransformer.py and capture_qwen3_tts_codec_first_upsample.py and capture_qwen3_tts_codec_depthwise.py and capture_qwen3_tts_codec_convnext_complete.py and capture_qwen3_tts_codec_second_upsample.py and capture_qwen3_tts_codec_second_convnext.py and capture_qwen3_tts_codec_second_decoder_block.py and capture_qwen3_tts_codec_third_decoder_block.py and capture_qwen3_tts_codec_waveform.py and capture_qwen3_tts_codec_decoder_ingress.py and capture_qwen3_tts_codec_snake_beta.py and capture_qwen3_tts_codec_decoder_upsample.py and capture_qwen3_tts_codec_first_residual_pool.py record official operation checkpoints used by generated composition tests. The first ConvNeXt block uses a circuit-declared left pad and checked depthwise, normalization, projection, erf GELU, scale and residual providers. Reference codec codes remain inputs to this generated decoder; the waveform does not establish autonomous Qwen3-TTS text-to-speech execution.

Reference-code-fed WAV reproduction: set CKE_QWEN3_TTS_MODEL_DIR to the pinned CustomVoice snapshot and run CKE_QWEN3_TTS_CODEC_WAV=/tmp/cke-qwen3-codec-diagnostic.wav python3 -m unittest tests.test_v8_qwen3_tts_codec_waveform with the pinned oracle Python environment. The test checks committed reference identities, compiles normal v8-generated entries for eight and 46 code frames, compares the produced PCM to direct full-model captures, and optionally writes the 46-frame, mono PCM16 WAV. The output is a codec diagnostic from captured reference IDs, not autonomous speech. Missing model assets skip the asset-backed comparison while the fixture-integrity and small generated-graph tests still run.

On the pinned CPU oracle configuration, the generated 8-code and 46-code entries differ from direct full-model PCM by at most 1.42e-6 and 1.33e-6, respectively; both outputs are finite and have the checked sample counts above. The eight-code fixture retains direct checkpoints across the fourth decoder stage and waveform head. At the second fourth-stage residual, connected error is 3.07e-4, while an identical-input PyTorch replay differs from CKE by at most 1.53e-5. Replaying the same operation on the different incoming tensors accounts for 3.09e-4; this is a measured amplification of upstream drift, tracked by a separate named checkpoint bound. The final convolution reduces the observed PCM difference. This is codec parity for captured IDs, not proof of the talker, code predictor, request-state handling, or spoken-text quality.

The retained 46-code diagnostic WAV is 24 kHz mono PCM16, 88,320 samples (3.68 seconds); SHA-256 77d03382bd6120c6fd5e94a84af147732f4d205913136f104f4f8e9ef49b773f. It is generated from captured reference codes, so it is available for listening without representing a text-to-speech result.

Existing CKE GEMM, embedding, attention, normalization, and selected audio Conv1D maps are candidates for reuse after shape and numerical checks. The inbound FFT-400 power map is not an inverse STFT. Model size does not determine porting effort or CPU speed; each target must be measured as a full text-to-PCM path.

The first isolated C additions are src/kernels/kokoro_shape_bounds.c and src/kernels/audio_duration_expand.c, declared in include/ckernel_tts.h. The planner validates duration sums, alignment extent, decoder and generator upsampling, inverse-STFT extent, and a conservative output-frame bound before writing. The duration-expansion primitive accepts caller-owned output storage. tests/test_v8_kokoro_shape_bounds.py compiles and exercises both. Neither file is a generated Kokoro graph or waveform evidence.

Proposed native speech session contract

Open a read-only model object once with pinned model artifact and manifest hashes. Each session has its own generation state and a predeclared workspace. A model descriptor reports supported voice IDs, language IDs, PCM sample rate, channels, format, maximum UTF-8 bytes, maximum normalized symbols, maximum audio frames, maximum synthesis step duration, and whether genuine incremental waveform output is supported. No Python process participates after export.

The request includes UTF-8 text and byte length, voice ID, supported model-specific settings, a reproducible seed if sampling exists, and explicit maximum input/output limits. Unsupported settings fail before generation. Empty text has a defined completed-with-zero-frames result. Oversized input fails before allocating a request workspace. Speech rate belongs in the model request only if the pinned model defines it; playback rate belongs to the application.

The output format for the first Kokoro path is interleaved signed PCM16, one channel, with the sample rate read from the pinned artifact manifest. The model math may produce FP32 waveform internally. Conversion to PCM16 is an explicit native host operation with clipping and nonfinite-sample rejection. Each audio callback receives a borrowed buffer, frame count, sample rate, channel count, format, monotonic utterance/frame offsets, and a request ID. The buffer remains valid only until the callback returns. The application copies or consumes it before returning; ownership never crosses the ABI silently.

Events are STARTED, AUDIO, and exactly one terminal event: COMPLETED, CANCELLED, or ERROR. STARTED occurs only after validation and workspace reservation. COMPLETED reports the exact frame count and whether output was sentence-batched or genuinely incremental. An error includes a stable code and message. A callback that cannot accept audio returns a backpressure result; generation blocks only while its bounded queue has capacity, or the request returns a typed backpressure error. No unbounded buffering or silent dropping is allowed. The first implementation may choose synchronous callbacks and no host output queue; application queue limits still apply.

Cancellation is callable from another thread, sets a session-private atomic flag, and wakes any backpressure wait. Generated execution checks it at bounded model operation boundaries, including long acoustic and vocoder stages; a single large noninterruptible forward call must be split before responsiveness is claimed. The terminal event follows cancellation, and no further audio events follow it. Playback stop and queued-text removal are separate application actions and must occur immediately even while generation unwinds. Do not claim a cancellation latency until it is measured on P3 and Ryzen.

Start with one session and one active request. Before enabling concurrent sessions, verify generated-model globals and the global thread pool permit concurrent calls; private scratch alone is insufficient. A later concurrent implementation may share immutable weights but must never share mutable caches, scratch, random state, or output buffers. Predeclare and cap every model workspace, tokenizer buffer, vocoder workspace, and output chunk. No allocator calls are allowed in generated hot paths. The host may allocate the full bounded workspace at session creation.

First Kokoro proof

  1. Pin a complete upstream revision set: model weights, config, voices, model code, phonemizer and lexicon, tokenizer if any, and dependency licenses. Save checksums and a fixture manifest. Include a phoneme fixture so text-front-end drift cannot be confused with model arithmetic drift.
  2. Export one voice and one short fixed utterance. Save oracle inputs and named intermediate tensors at every new numerical operation. Record waveform FP32 and PCM16 reference hashes, tolerances, and listening sample.
  3. Build the phoneme-to-waveform path through a circuit, operation contracts, kernel maps, generated C, a native phoneme host, and explicit scratch. Python is only an import and oracle tool. Native text preparation is a separate work package, and its uncertainty does not block this arithmetic gate.
  4. Run the same fixed utterance twice in fresh and persistent sessions. Require deterministic outputs under a fixed seed or document model nondeterminism. Inspect silence, clipping, nonfinite samples, truncation, and repetitions.
  5. After a native frontend is certified, connect assistant text -> bounded sentence queue -> native speech session -> PCM player with immediate queue clear and playback interruption on a new request. Buffer incomplete assistant fragments until a sentence boundary or explicit final flush; avoid speaking the same fragment twice.

Sentence-by-sentence synthesis is useful for application responsiveness but is not model streaming. Publish time to first playable audio and chunk-gap results before labeling any path streaming.

Work packages and acceptance gates

  1. Artifact and oracle lock: select one Kokoro voice and utterance, lock the model/code/G2P environment and licenses, publish phoneme IDs, style vector, named tensors, waveform, and manifest hashes. This gate is currently missing evidence until captures exist. The style row depends on the raw phoneme count including the reference's pad-wrap behavior; pin and test that selection, rather than treating the voice as one static vector.
  2. Primitive and circuit bring-up: implement only the missing operations reached by the pinned Kokoro graph, each with shape, stride, padding, precision, scratch, and oracle tests. Lower the complete graph to generated C and verify every exported weight and operation map. This gate is unsupported until a generated waveform path runs.
  3. Native text frontend: determine whether native preprocessing reproduces the pinned reference phoneme IDs. A native eSpeak-backed alternative needs its own license and pronunciation contract; differing phonemes cannot count as Misaki parity. This gate is missing evidence until tested.
  4. Speech session and host: add a versioned native speech ABI with independent state, bounded PCM callbacks, and responsive cancellation. Test failed open, empty input, buffer limits, backpressure, and repeated requests in one session. Verify global model and thread-pool safety before adding concurrent sessions. Measure the longest noninterruptible operation; a descriptor cannot promise a cancellation bound across CPUs. This gate is unsupported until the ABI has an implementation and tests.
  5. Accessibility workflow: connect bounded sentence buffering, native synthesis, playback, interruption, and the working fallback. Confirm the application can stop output immediately while model cancellation unwinds. This gate is unsupported until the full text-to-speaker path is exercised.
  6. Evidence and expansion: run quality and speed certification on P3 and Ryzen, then apply the same ABI and reporting to Chatterbox Turbo and Qwen3-TTS. Neither model is claimed compatible today.

Certification and reports

Keep numerical, intelligibility, and listening gates separate. Numerical gates compare pinned preprocessing, intermediate tensors, FP32 waveform, and PCM16 conversion. Speech fixtures cover ordinary and long text, numbers, dates, abbreviations, technical terms, CKE/kernel names, file paths, code explanations, empty and punctuation-only input, unsupported symbols, oversized requests, cancellation, repeated sessions, and interrupted playback. Listening review checks pronunciation, omissions, repetitions, and naturalness; ASR transcripts are diagnostic evidence only.

On both P3 and Ryzen, publish cold load, warm execution, first playable audio, whole-utterance latency, audio seconds per wall second, chunk gaps, cancellation latency, CPU use, and peak memory. Mark every result passed, failed, unsupported, or missing evidence. PR CI should run cheap primitive oracle, PCM conversion, and session state tests. Nightly should run bounded generated speech; idle-host certification should run long text, listening fixtures, and performance. Reuse existing report and visualizer conventions rather than inferring support from a circuit file alone.

Training lane

Inference does not wait for TTS backward coverage. V8 has a bounded FP32 generated-training certification and training -> checkpoint -> v8 inference export workflow that selectively reuses v7 training IR/codegen. This does not certify TTS-specific backward or composition-level training. Once the exact TTS graph is pinned, inventory every new backward operation. Later work can certify a small frozen-vocoder acoustic predictor, then generated training -> checkpoint -> inference export; voice adaptation requires voice consent and dataset provenance.

Initial Kokoro graph inventory (historical)

Kokoro v1 phoneme-to-waveform graph inventory

Status: source-traced design inventory, not generated-waveform certification. Scope is batch one, pinned af_heart, speed 1, and the fixed phoneme fixture in version/v8/tts/reference/kokoro_v1_reference.json. The model/code pins and asset hashes belong to its capture manifest. The deployed graph starts with already prepared phoneme IDs; G2P is a separate contract.

Pinned execution and symbols

Sources: Kokoro model.py at dfb907a, modules.py, istftnet.py, and the pinned model config. Default disable_complex=False selects TorchSTFT, not CustomSTFT (istftnet.py:293-297).

Let T = phoneme_count + 2 include the two zero IDs; A = sum(round(sum(sigmoid(duration_logits), last_dim) / speed).clamp(min=1)); batch B=1. Input IDs are [1,T], int64 in PyTorch. The upstream model drops unknown phoneme characters in model.py:128, which the native phoneme fixture must never silently emulate: validate every ID. The voice row is af_heart[len(phonemes)-1], [1,256] FP32, selected before model execution (capture_kokoro_v1.py:128-137). Decoder style is [:,0:128]; predictor style is [:,128:256]. Pin the exact row and its hash, not just the voice name.

The config gives vocabulary 178, ALBERT hidden 768, 12 nominal transformer layers and 12 heads, projection/encoder width 512, 3 duration-encoder pairs, max-duration projection width 50, and ISTFTNet upsample factors [10,6] with FFT 20/hop 5. Verify ALBERT parameter sharing and grouping from the resolved Transformers version and checkpoint; twelve layer executions do not imply twelve independent parameter sets. All named activations and learned weights are FP32 in the intended first path; record actual imported dtypes and layouts.

Stage and source Reached math and logical shape Required contract / state
ALBERT, model.py:100-103, modules.py:180-183 Token/position/type embedding, layer norm, shared/grouped attention and FFN, attention softmax/mask: [1,T,768]; dense projection and transpose to [1,512,T]. Exact Transformers ALBERT parameter sharing, embedding projection, GELU variant, layer-norm epsilon, mask additive semantics, softmax and GEMM order. No autoregressive KV state. Existing CKE attention/GEMM/embedding are candidates only after this contract check.
Duration encoder, modules.py:137-176 Append predictor style to every token ([1,T,640]), mask, three bidirectional LSTM + adaptive layer-norm pairs. AdaLN computes LN(x, eps=1e-5)*(1+gamma)+beta, with [gamma,beta]=linear(style). Each pair reappends style. Output [1,T,640]. PyTorch IFGO LSTM, forward/backward scans, zero initial hidden/cell, style broadcast, masks. Eval disables dropout. The reusable audio_lstm_bidirectional_scan_f32 provider has independent primitive evidence; its Kokoro weight binding and circuit composition remain uncertified.
Duration predictor, model.py:106-114 Bidirectional LSTM [1,T,640]→[1,T,512]; linear [1,T,50], elementwise sigmoid, ascending sum over 50, divide by speed, PyTorch round-to-even, clamp minimum 1, cast to integer. Repeat token indices and one-hot alignment [1,T,A]; multiply duration-encoder features [1,640,T] @ [1,T,A] → [1,640,A]. Keep reduction/rounding explicit. Check each finite duration, T, A, and every downstream capacity before expansion. One-hot matrix need not be materialized if a verified duration expansion exactly matches the matmul's copy semantics.
Prosody, modules.py:124-134 Shared bidirectional LSTM on expanded duration features [1,A,640]→[1,A,512]. Independent F0/N branches, each three AdaIN residual blocks, middle block nearest-upsample ×2, then 1×1 conv: F0,N=[1,2A]. AdaIN is InstanceNorm1d(affine=True, eps=1e-5) followed by style (1+gamma)*norm+beta; preserve stored affine parameters. Residual block has nearest upsample, optional depthwise transposed conv and shortcut, two weighted convs, leaky ReLU, and 1/sqrt(2) (istftnet.py:340-381).
Text encoder, modules.py:35-69 Embedding [1,T,512], three weight-normalized Conv1D(k5,p2) + layer norm + leaky ReLU, then bidirectional LSTM, output [1,512,T]; expand by alignment to ASR features [1,512,A]. PyTorch convolution padding and weight normalization; dropout disabled. Pack/pad is identity on the single full-length fixture but must be declared if batching is added. audio_conv1d_channel_major_f32 is a candidate only after exact bias, stride, dilation, reduction and layout checks.
Decoder, istftnet.py:384-421 Stride-2 Conv1D of F0/N: [1,A]; concatenate with ASR, AdaIN residual encode to [1,1024,A]. Three decoder residual blocks consume concatenated [x, asr_res, F0, N]; fourth also concatenates, then upsamples ×2 to [1,512,2A]. Explicit multi-producer edges; first three stages use A, last emits 2A. Preserve concat order, reflection/nearest/depthwise transposed conv contracts, and style split.
Source and waveform generator, istftnet.py:108-325 Upsample F0 from 2A by 10*6*5=300 to 600A samples; make 9 harmonic sines plus stochastic noise, voiced/unvoiced mask, linear+tanh excitation, STFT magnitude/phase concatenation. Two stages: ConvTranspose1D strides 10 and 6; noise conv and AdaIN residual branch; sum three Snake residual blocks per stage. Post conv yields 22 channels; magnitude exp(first 11), phase sin(last 11); inverse STFT emits waveform approximately 600A samples (derive exact edge length from PyTorch). Stochastic source is reached even with fixed text/voice: torch.rand initial harmonic phases and torch.randn_like excitation (istftnet.py:149-209,241-254). Pin RNG implementation/state or capture source tensors as oracle inputs to isolate deterministic arithmetic; report which mode is compared. Snake is x+sin(alpha*x)^2/alpha, not SiLU. TorchSTFT uses periodic Hann, centered STFT, complex magnitude/angle, and torch.istft overlap-add/window normalization (istftnet.py:80-100). The added audio_istft_mag_phase.c has isolated PyTorch primitive evidence; it is still a candidate for generated Kokoro composition.

Convolution summation order, BLAS/oneDNN selection, transcendental implementation, normalization statistics, and STFT accumulation order must be captured in numerical contracts. A provider with the right operation name is not automatically bitwise equivalent to PyTorch; compare at intermediate checkpoints with stated tolerances before waveform comparison. Instance normalization reduces over time per batch/channel; layer normalization reduces over channels per token. Weight-normalized convs should be exported as effective FP32 weights with the transformation and hash recorded, or have a separately verified runtime operation.

Buffer and state boundaries

T is known at request validation. A becomes known only after the duration head. Validate finite logits, round/cast, checked sum, and a configured A_max before writing alignment/expanded features. Derived maximums include 2A prosody/decoder frames, 20A then 120A generator frames, 600A source samples, STFT frame capacity, inverse-STFT overlap workspace, and final waveform capacity. Exact STFT frame and waveform formulas must come from the pinned PyTorch center/padding behavior and be tested at short and boundary lengths; do not infer them from nominal audio duration. Return a typed capacity error rather than truncate or allocate. The scratch planner must account for forward/backward LSTM hidden+cell/gates, norm reductions, all branch lifetimes, convolution workspaces, RNG state/source, STFT complex buffers, and overlap/window envelope. Session initialization can reserve the maximum; compute kernels take explicit pointers, strides, capacities, and valid lengths. No variable-length stack arrays or hidden heap allocations.

The first data-dependent tensor is indices in model.py:110, a frame-to-token map with valid length A, produced by repeat-interleaving the T rounded durations. The next is dense alignment [T,A] (:111-113), then en=[640,A] and asr=[512,A] (:114-117). These feed the prosody shared LSTM and text-to-decoder path. If alignment is elided, the two expansion outputs are still the first data-dependent feature tensors. A generic tensor descriptor must distinguish allocated capacity=[T,A_max] or [C,A_max], per-request valid_extent=[T,A] or [C,A], and physical strides, e.g. [A_max,1] for a channel-major aligned buffer. Passing A as both loop extent and row stride would overlap channels when the backing buffer is padded to A_max. The producer publishes A after a checked extent barrier; downstream nodes consume the same validated symbol. Kernel maps must specify which ABI arguments receive each capacity, valid extent, and stride; planner computes physical bytes from capacity and liveness, while runtime loops use valid extents. Buffer views may alias only under declared nonoverlap/lifetime rules.

Runtime scalar binding: when a selected provider calls the valid extent by another scalar ABI name, a circuit consumer can declare runtime_scalar_bindings from that ABI source name to the checked length. Lowering verifies the selected map's scalar type and plans its storage against the declared maximum; generated C passes the per-request value only after the producer's capacity check. The generated Kokoro shared prosody scan and first F0/noise AdaIN calls now use this binding; remaining residual blocks and the doubled extent are unconnected.

State is per request: LSTM states reset to zero for each scan, source RNG state is explicit, and all activations/scratch are private. Check global generated-model and threadpool behavior before concurrent sessions. For the first deterministic arithmetic oracle, captured source excitation (and optionally STFT output) may be an explicit input at a declared graph edge; a complete production waveform graph must generate it natively from a documented seeded RNG contract.

Circuit decomposition and provider fit

Use the v8 sequence plus component stitch and named graph_slots contracts (version/v8/circuits/README.md:200-245; PIPELINE.md:100-159). Proposed components, not separate Python-driven C entry points:

  1. phoneme_encoder: header validates IDs/style, ALBERT embedding; body expands declared ALBERT shared-layer schedule; footer projects [T,512]. A parallel declared text_encoder path consumes the same IDs and emits [512,T].
  2. duration: header concatenates style; body is three explicitly ordered bidirectional-scan/AdaLN pairs; footer runs predictor LSTM/head, validates A, and emits the duration vector and expansion map. The runtime shape-validation boundary is here.
  3. prosody: header expands duration features to valid A; body runs shared bidirectional scan and independent F0/N branches; footer emits F0,N=[2A]. Stitch also sends the expansion map to the text-encoder output path.
  4. waveform_decoder: header expands text features and combines ASR/F0/N/style; body declares four decoder residual stages, two generator stages, and each branch/merge; footer post-conv, magnitude/phase, inverse STFT, and FP32 waveform valid length.

Do not encode the entire schedule as one provider or a model-name branch. Nonrepeated operations and branch fan-in must be explicit circuit operations with declared ports. A single generated native entry point must execute the connected graph. PCM16 conversion and playback remain host/application steps.

CKE's audio_conv1d_channel_major_f32 map has channel-major contiguous FP32 input, bias, stride, padding and ascending accumulation; it lacks dilation/group semantics in that ABI. audio_lstm_step_f32 is a stateful IFGO single step with caller-owned gates scratch; scan and backward direction are not provided by the map. Existing STFT power maps are forward spectrogram power operations and do not provide Kokoro complex STFT, phase, or inverse. New src/kernels/audio_duration_expand.c and audio_istft_mag_phase.c have registered maps and isolated primitive oracles, but are not evidence of a complete generated graph. Likely missing provider contracts include adaptive instance/layer normalization, nearest interpolation, grouped/dilated/transpose convolution, Snake, exact phase/STFT/ISTFT, stochastic excitation, checked duration/extent, and bidirectional scan. Place reusable C math in src/kernels/; maps declare ABI, layouts, ordered arguments, scratch size/alignment/lifetime/aliasing, state reset, numeric order, sources, tests, and unsupported backward status.

The Kokoro inventory identified a compiler gap: circuit activation_buffers extents were resolved at build time, while A=sum(pred_dur) becomes known during execution. PR #560 adds a bounded, checked runtime valid extent to resolved call IR while keeping allocated capacity and physical row stride distinct. Static operation registration remains legitimate; the generic emitter has no Kokoro-specific branch. Complete Kokoro composition is still unimplemented.

Tested compiler fixture: a small v8 circuit passes through IR1, provider resolution, memory planning, lowering, and call IR. Its duration producer publishes a checked length; expansion and a consumer use that valid length and the planned physical stride. Generated C rejects invalid extent, undersized or misaligned caller-owned arena, and provider failure before downstream writes. Repeated requests exercise changing lengths, and X-Ray compares valid tensor regions rather than padding. The circuit declares its host native_entry; lowering carries that entry into call IR, and the normal codegen_v8.py command emits the checked native function. The separately supplied inverse-STFT input proves one generated provider call; it is not a complete Kokoro acoustic graph or generated speech.

Normal-codegen boundary

emit_checked_calls() consumes resolved IR Lower 3 calls and canonical kernel maps as a reusable backend component. codegen_v8.main() selects it for a circuit-declared checked native entry with a runtime_extent_contract; other model artifacts continue through the existing core backend. The command-level fixture compiles and executes the emitted function. This establishes ordinary command integration for the bounded synthetic graph, not complete Kokoro compilation, weight loading, or a production speech session.

A circuit can also declare checked_native_entry for a fixed-size graph with no runtime-length producer. A synthetic inverse-STFT circuit now passes through normal v8 lowering and codegen with an empty length set; generated C executes the checked provider, rejects bad arena alignment/capacity, and propagates provider failure before output writes. This removes a generic checked-call restriction for fixed-size encoder stages. It does not yet bind persistent BUMP weights or compose the Kokoro ALBERT encoder.

The checked entry requires a caller-owned arena aligned to at least 64 bytes, or the strongest selected provider alignment when greater. Generated C checks the base alignment and planned byte capacity before invoking providers. X-Ray records artifact_library as an on-disk path and hash. Its optional runtime_library record uses dladdr at capture time to identify the library containing the resolved symbol, with that path and file hash. These are distinct provenance claims. Symbol resolution and a file hash do not constitute an embedded runtime build-identity check.

Generated duration segment: a second circuit takes the pinned [36,50] PyTorch duration logits as an external FP32 activation. Normal v8 lowering binds the reusable logits-to-frames provider, its checked 103-frame result, feature expansion, and a downstream consumer into one generated native entry. The fixture checks distinct physical input strides, padded output rows, repeated requests, exact capacity, and failure propagation. Its feature values are synthetic. Phoneme IDs do not yet produce these logits inside CKE, and the generated entry does not produce a waveform.

Evidence still required

The pinned capture now records 63 named tensors, including six duration-encoder LSTM/AdaLN operation boundaries, duration logits, the duration vector, and the final FP32 waveform. Finer prosody/decoder checkpoints, source RNG inputs, imported-weight bindings, and a generated graph comparison remain required. Verify the exact generated output length, repeated calls, undersized workspace, malformed duration/state, finite outputs, clipping/silence, and a human listening fixture. Keep numerical parity, candidate-versus-baseline equality, and listening results separate. Until the generated C entry point produces and verifies the waveform, status remains unsupported / missing evidence.

Initial operation checklist (historical)

Scope: the pinned phoneme IDs and af_heart[len(phonemes)-1] row, batch one, FP32, and the short reference utterance. “Primitive oracle passed” describes an isolated operation under its own contract; it does not certify Kokoro's parameters, tensor connections, or waveform. “Candidate” means CKE has related math whose exact Kokoro contract still needs comparison. All TTS backward and complete waveform claims remain NOT_TESTED.

Reached stageEvidence available nowMissing work for the pinned pathNext independent proof
Phoneme IDs and voice conditioningPinned IDs and upstream captures exist in version/v8/tts/reference/. The offline importer writes 599 effective FP32 model tensors and the selected voice row/slices into BUMPWGT5; an asset-backed test compares every tensor and reproduces the pinned upstream waveform. The generated embedding and projection graph now consumes seven exported weight payloads.Bind the remaining canonical weights and voice tensors to declared circuit edges. Native G2P is a later milestone.Compare generated phoneme-encoder, duration and decoder checkpoints against the pinned PyTorch capture, then the final waveform.
ALBERT phoneme encoderOne generated entry executes embedding, input projection, twelve shared ALBERT invocations and final 768→512 projection: 147 declared operations, 25 effective weights and separate invocation checkpoints.Runtime token-length binding and padded/masked attention remain unsupported. Evidence covers separately compiled all-valid inputs of 2, 8, 36 and 64 tokens.Connect generated features to the duration predictor, then prosody and waveform. Complete speech remains NOT_TESTED.
Duration and text-encoder recurrent blocksaudio_lstm_step_f32 has a single-step oracle; audio_lstm_bidirectional_scan_f32 has independent PyTorch scan fixtures. The pinned predictor capture now records each packed LSTM input/output, batch-size metadata, and final hidden/cell state.The generated duration and acoustic-text circuits connect forward/reverse scans with exact weights for the fixed all-valid case and test per-request reset. Other lengths and masking remain untested.Compare each generated recurrent stage and repeated-request reset against those pinned checkpoints.
Style-conditioned adaptive layer normaudio_adaptive_layer_norm_f32 has PyTorch primitive oracles, explicit strides/capacities and caller-owned scratch. The pinned reference now captures input features, predictor style and output for all three occurrences.The bounded generated predictor binds effective projection weights and pinned style conditioning. Other lengths and styles remain untested.Compare each generated adaptive-layer-norm stage against its pinned input/output checkpoint.
Duration head and checked frame countaudio_duration_logits_to_frames_f32 passes the pinned 36×50 PyTorch fixture and native bounds tests; the generated duration subgraph binds its checked A to downstream calls.The connected predictor now generates the 50 logits from pinned encoder and duration-predictor weights. The older isolated subgraph supplies logits externally; request-time speed binding remains a separate generic entry contract.Compare generated predictor logits, per-token durations and A to the pinned reference; retain nonfinite, overflow and over-capacity rejection before consumers run.
Duration expansionaudio_duration_expand_channel_major_f32 and audio_duration_expand_token_major_f32 have committed primitive oracles. A connected generated graph expands its own 640-channel duration features and an oracle-fed 512-channel text stream with one checked A, padded strides, repeated requests and X-Ray valid-region parity.The new 178-operation generated graph produces both duration and final acoustic-text streams for the fixed utterance. It has no waveform output.Compare the generated text producer against captured alignment, then carry valid A into prosody and decoder stages.
Text-encoder convolutionsaudio_conv1d_channel_major_f32 and audio_conv1d_channel_major_grouped_f32 have PyTorch primitive tests. They cover bias, stride, padding and groups under their maps.The bounded acoustic-text circuit imports effective weight-normalized weights and checks each of its three Conv1D outputs against the pinned reference. Dilation and transposed convolution are not provided by this checked ABI.Compare each text-encoder convolution, norm and recurrent output with pinned checkpoints at its real shape.
Prosody F0/N and decoder AdaIN blocksGrouped Conv1D, basic normalization and scaled residual add are reusable candidates only for matching suboperations.Implement InstanceNorm1d affine statistics plus style (1+gamma)*norm+beta, nearest upsampling, required dilated/depthwise/transposed convolutions and branch/concat edges. Keep each math operation in src/kernels/ and its ABI in a canonical map.Independent PyTorch oracles for each new primitive, then F0, N and decoder stage captures with valid A/2A extents.
Harmonic source and generatorNo certified complete Kokoro source or generator path exists.Implement nine harmonics, voiced mask, seeded random phase/noise or a declared captured-source input for deterministic arithmetic isolation, centered complex STFT, Snake, transposed-convolution stages and post-conv magnitude/phase. Preserve exact branch order.First compare with identical captured excitation; then certify native seeded source generation separately. Check all intermediate shapes and finite values.
Inverse STFT and FP32 waveformaudio_istft_mag_phase_f32 has bounded scratch, negative tests and independent PyTorch primitive fixtures. The generated fixture supplies its spectrum separately.Feed it the generator's actual magnitude/phase with exact periodic Hann, centering, length and overlap contract. Size final waveform and scratch from checked limits.Compare generator spectrum, output length and every finite waveform sample to the pinned reference, then save a native WAV for listening.
One generated native entry#566 proved the synthetic checked entry. The current 178-operation circuit generates both duration and final acoustic-text features through one checked entry.Compose the still-missing prosody, decoder and generator edges in v8 circuits. Existing math providers that return no status need generic checked adapters or an equivalent resolved call contract without duplicating their arithmetic. Keep caller-owned workspace and persistent weights separate from per-request state.Run fixed IDs through one generated entry without Python model scheduling; test provider-failure propagation, repeated requests and workspace bounds.

The generated encoder prefix now completes the first shared ALBERT layer: phoneme IDs → embeddings → input projection → Q/K/V → full unmasked attention → output projection and residual → LayerNorm → feed-forward linear → tanh GELU → feed-forward projection and residual → final LayerNorm. The header/body/footer circuit declares the schedule and tensor edges; canonical maps bind all 23 effective weight tensors and selected numerical contracts; normal lowering, memory planning and codegen emit one native entry. Python supplies the independently pinned reference capture and invokes that entry, without scheduling model stages. Fourteen compiler-originated checkpoints pass their declared comparisons. The complete encoder extension below adds the remaining shared invocations and final projection. Predictor, prosody and waveform decoder still need connecting; this first-layer test does not produce speech.

First complete layer: numerical boundary

layernorm_rows_checked_f32 and gelu_rows_tanh_checked_f32 are bounded adapters in src/kernels/ which delegate existing arithmetic. They declare caller-owned staged scratch, distinguish physical strides from valid channels, preserve row padding, and leave output untouched on rejection. Backward and concurrent-session behavior remain uncertified. The historical gelu_exact_inplace name denotes tanh GELU; it is not erf GELU.

On the pinned PyTorch 2.8 first-layer fixture, the final normalized output has maximum absolute error 2.86102294921875e-6, within the existing FP32 LayerNorm family's 1e-5 bound. The large-valued feed-forward projection differs by 3.814697265625e-5 when fed identical oracle inputs; the same native provider matches independent FP64 NumPy arithmetic exactly. This localizes a FP64-versus-PyTorch-FP32 reduction difference rather than a circuit wiring error. The new projection/residual composition checkpoints explicitly use a 5e-5 absolute bound (observed connected maximum 4.57763671875e-5); earlier embedding/QKV/attention thresholds and AdaLN tolerances are unchanged. This evidence is not a bitwise PyTorch claim or cross-version guarantee. A future tighter backend match must add a separately identified reduction provider and map contract.

TMPDIR=/path/to/external/temp \
CKE_KOKORO_LAYER_EVIDENCE_DIR=/path/to/first-layer-evidence \
  python3 -m unittest tests.test_v8_kokoro_generated_albert_layer
python3 -m unittest tests.test_v8_normalization_checked_oracle \
  tests.test_v8_normalization_checked_generated

The optional evidence directory retains the actual generated C, call IR, memory layout, BUMP subset, library and tensor captures, plus candidate/reference manifests and X-Ray comparison reports. Provenance distinguishes the library artifact hash from capture-time symbol resolution; it does not certify an embedded runtime build identity. Live PyTorch and full exported-BUMP replay remain separate cases and explicitly skip when dependencies/artifacts are unavailable.

The retained standalone/ directory contains a C host and library runnable as ./native-first-layer arena.bin features.f32. It was executed in a separate temporary directory, with no Python model runtime or checkout dependency; copying the replay retains a relative library lookup. Its output is encoder features, not PCM or a WAV.

The checked full-attention contract stores scores in FP32 after FP64 dot accumulation. Softmax takes its maximum from those same stored scores before FP64 exponentiation; at least one exponent is exactly one and none exceeds one. Dependency-free tests cover single-token identity, large positive and negative finite scores, equal scores, zeros, and extreme finite values in addition to model captures. This precision-consistency fix does not change the declared dot or value reduction order or relax any tolerance.

Remaining order: capture operation-level Kokoro inputs/outputs, certify missing AdaIN/convolution/source/generator primitives, then compose the complete circuit and compare its native waveform. The BUMP exporter, bidirectional scan and AdaLayerNorm providers are independent groundwork. Native text preparation, PCM playback queue and cancellation come after the fixed-phoneme waveform works.

Historical milestone: bounded shared-layer phoneme encoder

kokoro_phoneme_encoder_bounded.json declares an embedding/projection header, twelve shared-layer body invocations and a final projection footer. Offline build_kokoro_encoder_circuit.py expands declarations, without executing neural stages. Normal provider resolution, memory planning and codegen emit one ck_kokoro_phoneme_encoder native entry. There are no compiler model-family branches or production kernel arithmetic changes. Invocations share weights but retain separate edges and checkpoints.

Local evidence: 11 tests passed with the full pinned BUMP. Four separately compiled geometries (2, 8, 36 and 64 all-valid tokens) compare all 147 boundaries to independent PyTorch 2.8 captures. Final feature maximum errors are 1.3828277587890625e-5 at 36 tokens and 1.4543533325195312e-5 at 64. The 512-token authoring limit is geometry validation, not a certified 512-token execution.

Numerical contract: normalized states and final features use absolute 3e-5. Other stages use elementwise 5e-5 + 2e-6*abs(reference), plus independently calculated incoming-error bounds for affine and residual operations. Affine bounds are abs(delta_input) @ abs(weight).T; residual bounds sum residual-input error and scaled branch-input error. All boundaries also require RMSE at most 3e-5 and finite samples. All 74 affine invocations match independently executed bias-first ascending FP64 arithmetic exactly; all 24 residual invocations match separate FP32 multiply/add exactly. This accounts for conditioning while retaining earlier primitive/first-layer tolerances. Reports retain raw errors, the formula and maximum elementwise scaled error. A displayed maximum tolerance alone does not replace the elementwise gate. This is not bitwise PyTorch parity or cross-version certification.

Tests cover repeated execution, invalid IDs, undersized arenas, producer and final-projection failures, and 25 selected full-BUMP payloads. Normal lowering rejects an unsupported mask port. Static specialization does not establish changing runtime lengths in one arena, masked/padded attention, concurrency or backward support. The first missing dynamic edge is validated token count into row-provider calls while preserving capacity and stride; prove it separately with a generic producer-to-consumer fixture.

python3 version/v8/tts/build_kokoro_encoder_circuit.py --check
CKE_KOKORO_BUMP_DIR=/path/to/kokoro-bump \
CKE_KOKORO_ENCODER_EVIDENCE_DIR=/path/to/encoder-evidence \
  python3 tests/test_v8_kokoro_generated_encoder.py
python3 scripts/nightly_runner.py --tests tts_kokoro_generated_encoder \
  --json /path/to/encoder-nightly.json

Existing X-Ray APIs retain 147 checkpoints, the graph, resolved calls, layouts, artifact hash and capture-time symbol/library provenance. Neither hash nor symbol resolution is an embedded runtime build-identity check. Shared X-Ray implementation was not changed. The retained prefix/encoder/standalone/ replay runs ./native-encoder arena.bin features.f32 outside the checkout and writes encoder features, not PCM or a WAV.

Provider / compositionDtype / directionOracleTestRunnerResult
Embedding, checked linear, full attention, LayerNorm, tanh GELU and residual; complete encoderFP32 inference, int32 IDs; backward unsupportedPinned PyTorch 2.8 and independent FP64/FP32 arithmetictests/test_v8_kokoro_generated_encoder.pySix canonical maps; existing TTS PR workflow; standard nightly tts_kokoro_generated_encoder11 local tests PASS with full BUMP; unavailable optional BUMP is SKIP with reason. CI status is separate. Waveform, listening, cancellation and P3/Ryzen performance NOT_TESTED.

Nightly execution budget: the complete suite compiles four 147-operation geometries, checks independent arithmetic, repeats native calls and executes standalone replay. Its dedicated hosted numerical job passed in 97.22 seconds, but the first standard nightly exceeded the default 120-second limit after retaining all four geometry comparisons and before standalone replay. Only this suite now has a bounded 300-second limit. Python test output is unbuffered, and timeout reports retain completed cases and partial diagnostics while keeping overall TIMEOUT. No numerical tolerance, reduction order, kernel arithmetic or fixture changed. CI duration is execution evidence, not a model performance claim.

Current next boundary: diagnose and resolve the generated-F0 drift and source/STFT raw-phase mismatch with identical-input replay, then rerun the complete connected waveform comparison. Add native request-local excitation randomness, variable phoneme lengths, text preparation, and playback/cancellation before claiming usable accessibility text-to-speech.

Canonical Kokoro weight and voice export

version/v8/tts/export_kokoro_bump.py is offline import tooling. It verifies the pinned config, checkpoint and af_heart SHA-256 hashes; requires the captured Kokoro and PyTorch package versions; materializes 89 weight-normalized modules into effective FP32 weights; and writes aligned BUMPWGT5 payloads, a manifest, and a config sidecar. All 548 raw checkpoint tensors are accounted for. The pinned model constructor supplies 140 missing InstanceNorm affine defaults; the exporter validates their one/zero values and labels them synthesized. Tensor names use semantic CKE prefixes. The manifest records each source name, transform, shape, offset, payload hash, selected voice-row index and observed package-source hashes. The package-source hashes do not independently prove a match to the cited upstream code commit.

The dependency-free import contract runs in PR checks. The asset-backed test runs when CKE_KOKORO_MODEL_DIR points to the pinned snapshot; otherwise nightly reports SKIP with a reason. On the pinned local reference, it compared all 599 effective tensors and three voice tensors byte-for-byte after BUMP roundtrip, confirmed weight-norm removal does not change upstream inference, and reproduced the captured 61,800-frame FP32 waveform hash. This establishes import fidelity, not generated-C speech or native playback.

CKE_KOKORO_MODEL_DIR=/path/to/pinned/kokoro \
  python3 tests/test_v8_kokoro_bump_export_live.py
python3 version/v8/tts/export_kokoro_bump.py \
  --model-dir /path/to/pinned/kokoro \
  --output-dir /path/to/kokoro-bump

Numerical coverage

TTS kernel numerical coverage, 2026-09-24

This report records isolated inference providers and a Kokoro-specific extent preflight. It does not certify a generated Kokoro waveform or native text-to-speech. The provider maps declare backward and training unsupported.

Provider Dtype / direction Independent oracle Executable test PR / nightly registration Observed result
linear_rows_checked_f32 and generated Kokoro embedding → input projection FP32 input/weights/output, int32 phoneme IDs / inference only Pinned embedding capture plus exported Kokoro projection weights evaluated by PyTorch torch.nn.functional.linear at [36,128]→[36,768] tests/test_v8_linear_rows_oracle.py; tests/test_v8_kokoro_generated_projection.py .github/workflows/nightly.yml via scripts/nightly_runner.py keys tts_linear_rows_oracle and tts_kokoro_generated_projection PASS locally: scalar linear max absolute error 9.5367431640625e-7, strided padding, invalid geometry and nonfinite rejection, repeated requests, generated failure propagation, two compiler-declared X-Ray checkpoints, and optional 602-entry exported-BUMP verification. The optional asset and live-PyTorch checks report SKIP when unavailable. X-Ray currently labels the exact resolved numerical-contract ID unresolved; the map declares it separately. This is an isolated projection oracle; this isolated test does not certify the complete encoder or speech; see complete encoder evidence below.
Generated embedding → projection → first shared ALBERT Q/K/V FP32 input/weights/output, int32 phoneme IDs / inference only Pinned PyTorch F.linear outputs for the [36,768] Q/K/V calls; thirteen hash-checked effective BUMP tensors tests/test_v8_kokoro_generated_qkv.py; model-neutral call binding is covered by tests/test_v8_checked_op_constants.py .github/workflows/nightly.yml via scripts/nightly_runner.py keys tts_kokoro_generated_qkv and tts_checked_op_constants PASS locally: five compiler-declared X-Ray checkpoints, maximum Q/K/V absolute error 3.337860107421875e-6, repeated requests, capacity rejection, provider-failure propagation, optional full-BUMP replay, and byte-identical fixture recapture. Later attention, layer and encoder evidence is recorded above and below; waveform remains NOT_TESTED.
attention_full_token_major_f32_checked and generated Kokoro attention context Token-major FP32 Q/K/V and output / inference only Independent PyTorch eager matmul, scaled softmax and value matmul at [36,12,64]; committed fixture and optional live recomputation tests/test_v8_attention_full_token_major_oracle.py; model-neutral tests/test_v8_attention_full_token_major_generated.py; tests/test_v8_kokoro_generated_attention_context.py .github/workflows/nightly.yml via scripts/nightly_runner.py keys tts_attention_full_token_major_oracle, tts_attention_full_token_major_generated and tts_kokoro_generated_attention_context PASS locally: primitive maximum absolute error 5.125999450683594e-6; generated six-checkpoint X-Ray path maximum attention-context error 7.748603820800781e-6. The provider is full and unmasked; all 36 pinned tokens are valid. Later layer and encoder evidence is recorded above and below; waveform remains NOT_TESTED.
Complete first generated Kokoro ALBERT layer and checked normalization/activation FP32 / inference only; backward NOT_TESTED Pinned Kokoro/PyTorch 2.8 first-invocation operation captures, live PyTorch small/tail dimensions, independent FP64 affine oracle and exact legacy-adapter comparisons tests/test_v8_kokoro_generated_albert_layer.py; tests/test_v8_normalization_checked_oracle.py; tests/test_v8_normalization_checked_generated.py Canonical kernel-map selectors in PR CI; standard nightly keys tts_kokoro_generated_albert_layer, normalization_checked_oracle, normalization_checked_generated PASS locally: fourteen resolved-contract X-Ray checkpoints; final output error 2.86102294921875e-6. Invalid workspace/arena and nonfinite normalization weights stop consumers; padding and repeated-request behavior are covered. This suite covers one layer; complete encoder evidence is below. Generated waveform remains NOT_TESTED.
Generated Kokoro embedding boundary via embedding_three_table_layer_norm_f32 FP32 weights/output, int32 IDs / inference only Pinned Kokoro/PyTorch [36,128] embedding capture; five hash-checked BUMP payloads tests/test_v8_kokoro_generated_embedding.py .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_kokoro_generated_embedding PASS locally: normal v8 lowering, generated C, X-Ray parity, repeated IDs, invalid-ID output preservation, arena-capacity/alignment rejection. Worst absolute error 2.384185791015625e-7 at token 0/channel 5. Optional verification against the local 602-entry exported BUMP bundle PASS; without CKE_KOKORO_BUMP_DIR it reports SKIP. The circuit covers only the embedding boundary, not a complete phoneme encoder or generated speech.
audio_duration_logits_to_frames_f32 FP32 logits → int32 durations and valid extent / forward only Pinned PyTorch sigmoid → sum → speed divide → round → clamp at production [36,50] shape tests/test_v8_audio_duration_logits_oracle.py and separate live tests/test_v8_audio_duration_logits_live.py .github/workflows/nightly.yml via scripts/nightly_runner.py keys tts_duration_logits_oracle and tts_duration_logits_live PASS locally: exact 36-token durations and 103-frame extent, ties-to-even, padded stride, invalid input and capacity rejection without output writes. Live PyTorch comparison PASS in the pinned local environment. Generated composition is covered separately below.
Generated duration logits → checked frames → feature consumer FP32 logits and features / int32 durations / forward Pinned Kokoro/PyTorch duration logits and durations; independent repeated-feature expectation tests/test_v8_duration_logits_runtime_graph.py .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_duration_logits_runtime_graph PASS locally: normal v8 lowering and generated C produce 103 frames, preserve physical stride/padding, and stop downstream calls on invalid extent. Logit generation from phonemes and waveform output remain NOT_TESTED.
Generated logits → checked extent → both Kokoro feature expansions FP32 logits and captured features / int32 durations / forward Pinned PyTorch Kokoro feature, duration and frame-to-token captures; committed expected tensors indexed by the captured alignment tests/test_v8_duration_two_stream_runtime_graph.py; fixture packaging command python3 version/v8/tts/reference/build_duration_two_stream_fixture.py --capture-dir <pinned-capture-dir> .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_duration_two_stream_runtime_graph PASS locally: normal v8 lowering and generated C produce the pinned 103-frame duration and text streams, with input stride 40, output stride 128, untouched padding, repeated 36-frame requests, and no downstream writes or published extent on rejected duration. Compiler-declared X-Ray checkpoints compare both valid regions to the captured alignment with exact FP32 equality. X-Ray also records the on-disk artifact hash and the library containing the executed symbol; the resolved numerical contract remains explicit as unresolved. Logits and features are oracle supplied. Phoneme-to-waveform execution remains NOT_TESTED.
audio_duration_expand_channel_major_f32 FP32 + int32 durations / forward only PyTorch torch.repeat_interleave; committed PyTorch fixture tests/test_v8_audio_duration_expand_oracle.py; invalid extent and stride checks in tests/test_v8_kokoro_shape_bounds.py .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_duration_expand_oracle PASS: exact values on the fixed fixture, untouched padding, repeated call, and capacity rejection. Live PyTorch fixture check PASS in the local CKE venv.
audio_istft_mag_phase_f32 FP32 / forward only PyTorch torch.istft with centered periodic Hann; pinned Kokoro magnitude/phase capture tests/test_v8_audio_istft_oracle.py; version/v8/scripts/compare_kokoro_istft_native_v8.py .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_istft_oracle PASS: synthetic PyTorch fixture, minimum-frame and alternate-geometry fixtures, silence, DC/Nyquist, portable rejection checks, and live oracle locally. Pinned Kokoro primitive capture: 61,800 samples, max absolute error 8.4564e-7, mean absolute error 7.2885e-8.
kokoro_shape_bounds host preflight Size arithmetic / inference Independent mathematical boundary cases tests/test_v8_kokoro_shape_bounds.c via tests/test_v8_kokoro_shape_bounds.py .github/workflows/nightly.yml via scripts/nightly_runner.py key tts_kokoro_shape_bounds PASS: checked limits and overflow cases locally.
Generated producer → length validation → consumer FP32 / forward Independent synthetic duration-expansion reference; committed PyTorch inverse-STFT fixture tests/test_v8_runtime_extent_lowering.py; tests/test_v8_checked_call_codegen.py; tests/test_v8_xray_numerical_parity.py .github/workflows/nightly.yml via scripts/nightly_runner.py keys tts_runtime_extent_lowering, tts_checked_call_codegen PASS: #560/#566 generate, compile, and execute a bounded synthetic graph through normal v8 codegen. Tests cover valid extents, physical padding, repeated requests, capacity/alignment rejection, and stopping downstream calls on provider failure. This is not a Kokoro acoustic graph.
Generated Kokoro phoneme → waveform FP32 / forward Pinned Kokoro reference capture tests/test_v8_kokoro_generated_waveform.py Diagnostic execution PASS; connected numerical parity FAIL One fixed phoneme request produces 61,800 native waveform samples and an experimental WAV. Direct-input tail parity passes; complete connected waveform parity remains unresolved.
TTS backward FP32 / backward PyTorch autograd and finite differences Pending training work NOT_TESTED Inference-only provider maps.

Numerical cases use canonical kernel-map test paths and the existing scripts/nightly_runner.py registration and JSON/dashboard. The PR workflow selects registered suites from map metadata instead of maintaining a second list of kernel test methods. The former aggregate TTS live-oracle script has been removed; its duration, inverse-STFT and adaptive-normalization cases remain in their normal suites. Incompatible PyTorch versions still require isolated environments. Their comparisons execute as steps inside the standard nightly job on main pushes, scheduled and manual runs; there are no separate AdaLN version jobs on PR commits. PRs retain registered kernel and generated-composition coverage. Missing nightly environment reports still fail the required verdict.

Adaptive LayerNorm publishes native-versus-fixture, native-versus-live and fixture-versus-live as distinct cases, including provider, direction, dtype, shape, backend version, settings and reproduction command. A failed historical reproduction does not prevent native comparisons from running. Missing live dependencies are SKIP, not evidence of parity. Ordinary native-dispatch comparisons remain enabled in addition to the historical requested-dispatch lane. Matrix reports are attached to the same nightly JSON with their own hardware and source identities; missing reports and stale commits fail integration. Scalar providers have no multithread execution mode; P3/Ryzen performance certification remains NOT_TESTED.

Reproduce the cheap PR checks:

python3 -m unittest \
  tests.test_v8_kokoro_shape_bounds \
  tests.test_v8_audio_duration_expand_oracle.AudioDurationExpandOracleTest.test_committed_torch_fixture \
  tests.test_v8_audio_istft_oracle.AudioIstftOracleTest.test_committed_torch_fixture \
  tests.test_v8_audio_istft_oracle.AudioIstftSafetyTest

Reproduce live PyTorch checks in an environment with PyTorch and NumPy:

python3 -m unittest tests.test_v8_audio_duration_expand_oracle tests.test_v8_audio_istft_oracle

The pinned-capture comparison requires the reference artifact path described in this page, “Pinned reference capture”.

Pinned reference capture

Kokoro v1.0 reference capture

This directory contains a single-utterance PyTorch oracle for native CKE Kokoro bring-up. The pinned model snapshot, source revisions, voice, text, seed, and conditioning rule are in kokoro_v1_reference.json. fixture_manifest.json records observed assets, dependency versions, phonemes, token IDs, tensor shapes, and file hashes from the canonical capture. The full .npy and WAV artifacts are currently in /tmp/cke-kokoro-v1-af-heart-reference. The script refuses network access.

Run with an environment containing the pinned Kokoro and Misaki source checkouts and their resolved Python dependencies. Supply the three files from the pinned Hugging Face snapshot at the paths listed in the pin manifest:

python version/v8/tts/reference/capture_kokoro_v1.py \
  --model-dir /path/to/Kokoro-82M-snapshot \
  --output-dir /tmp/cke-kokoro-v1-af-heart-reference

--preprocess-only needs just config.json and captures segmentation, G2P, and token IDs. Full capture also emits selected style, ALBERT and duration stages, F0/noise projections, text encoder, decoder, frame-to-token indices, float32 waveform, final ISTFT magnitude and phase, and a 24 kHz mono PCM16 WAV for listening. The .npy waveform is the numerical oracle; the WAV is a playable derivative. Both are checked for finite samples. Keep the captured fixture beside its generated manifest and check the source/dependency pins before comparing CKE output.

The first full capture took 5.51 seconds wall time and peaked at 1,134,048 KiB RSS on this host with one PyTorch thread. A second process produced identical tensor and WAV hashes with seed 0. Reconstructing from captured ISTFT magnitude and phase with PyTorch istft (n_fft=20, hop=5, periodic Hann) reproduced the float32 waveform exactly. oracle-requirements.lock records the 89 installed package versions and source URLs. It does not contain wheel hashes; the asset SHA-256 hashes are in fixture_manifest.json.

The fixture is upstream reference evidence only. Its evidence object leaves native primitive parity, native full waveform parity, human listening, and application playback as NOT_TESTED. Missing dependencies or assets stop capture with an error; they never count as passing evidence. Each production kernel needs its own oracle comparison and CI registration outside this reference directory.

The predictor now has six required fine hooks: three packed bidirectional LSTM calls alternating with three AdaLayerNorm calls. The capture adds 39 tensors for packed data, sequence metadata, hidden/cell state, adaptive-norm input/style and output. For this batch-one fixture the 36 packed batch sizes are all one, and sorted/unsorted indices are both zero; the generated scan must still bind the declared valid length and reset its own state. Repeating the pinned capture preserved all 24 previous tensor hashes and the 61,800-frame waveform. The manifest shape test runs in PR CI; the full recapture runs in nightly when the pinned local assets are available and reports SKIP with a reason otherwise. These checkpoints now compare with the bounded generated predictor and acoustic text encoder. They do not certify a waveform.

The asset-backed nightly gate also compiles the standalone audio_adaptive_layer_norm_f32 kernel and compares its three real predictor calls against these PyTorch checkpoints. Their maximum absolute errors were 2.38e-6, 1.43e-6 and 1.61e-6, each below the declared 5e-6 elementwise limit. This is real-weight primitive parity, not circuit stitching or waveform parity.

Adaptive LayerNorm numerical identity: the CKE provider performs the style projection as an ascending FP32 multiply/add reduction, then computes mean and biased variance as separate ascending FP64 channel reductions. It casts the normalized value to FP32 before applying (1+gamma)*x+beta. The committed fixture was captured with PyTorch 2.8.0. Nightly runs under both PyTorch 2.8.0 and 2.12.1 have shown a 1.19e-7 fixture difference on different hosts. In separate pinned-version stage captures, the first difference was at F.linear style projection; their layer_norm outputs matched. The hosts reported AVX512 and AVX2 capability, which does not prove the operation-specific backend dispatch or a version-specific cause. The supported historical reproduction lane uses the pinned PyTorch 2.8 or 2.12 CPU wheel with MKL available, requests MKL_CBWR=AVX2, records thread count and build configuration, and retains the original 1e-7 bound. A missing MKL backend is SKIP/NOT_TESTED, and a required lane fails after publishing its report. This is a bounded reproducibility contract; arbitrary CPUs or requested settings alone do not establish equivalent dispatch. Separate native-dispatch lanes compare the CKE provider to live PyTorch using the unchanged 5e-6 bound. Both PyTorch versions publish projection, normalization and final-output stages; the 2.12 environment also captures 2.8 on the same host with the same requested settings. Reports identify those settings as requested, with actual dispatch identity unverified. A future reduction order needs a separate provider and canonical numerical contract so X-Ray can identify its arithmetic; silently changing this provider would erase that evidence.

The selected style row is af_heart[len(phonemes)-1]; the predictor receives its last 128 columns and the decoder receives its first 128. The generated manifest marks any missing hook explicitly.

Ordered FP64 projection optimization trial — 2026-11-07

P3 VTune sampling of resident Kokoro identified convolution, checked linear projections and dense transposed convolution as major native costs. The checked linear provider now dispatches four independent rows through AVX2 when available, preserving the scalar FP64 product/add order, bias, FP32 output conversion and scalar tails. It uses no horizontal reduction, FMA or heap allocation. Unsupported ISAs and overlapping buffers retain the previous scalar path.

A rebuilt baseline and candidate generated Kokoro graph, using identical request packages, weights, eight-worker convolution and seed, produced identical WAV hashes for three chunks across three alternating paired trials. Median synthesis was 10.641 versus 9.736 seconds for 5.55 seconds of audio, about 8.5% lower latency. These are shared-host exploratory measurements, not a reliable real-time guarantee. The live endpoint was not replaced by this candidate. Published waveform parity limitations remain; matching the previous CKE output does not resolve them.

Independent ordered-reference tests cover nonzero distinct rows, biased and bias-free execution, row-group tails, padding, late nonfinite input and insufficient output capacity. Generated Kokoro and Qwen composition tests remain separate gates. Retained timing and WAV-hash report. Pinned Qwen TTS full-waveform validation also passed: 46 code frames and 88,320 waveform samples retain the existing code and waveform hashes, with reference maximum absolute error 1.3262e-6. Native synthesis took 147.15 seconds for 3.68 seconds of audio; no matched baseline speed claim is made. This is not practical conversational latency. A sampled generation interval attributed 97.82% of cycles to checked linear projection, including weight validation and scalar row work. That is the next optimization target, not evidence of full-run savings.

Speech HTTP completion, cancellation and recovery

The owner now publishes a complete event and marks completion under the same lock used by cancellation. Cancellation cannot accept a completed request or send a delayed abort signal after the next request takes ownership. The backend abort operation must be a nonblocking signal; delivery waits remain outside the owner lock.

A backend returning without a completion becomes an explicit error. A failure after completion discards the backend but does not publish a second terminal verdict. Repeated stalled readers exhaust only the existing two-event delivery queue; the ten-second delivery deadline cancels the request and allows subsequent requests to recover. This is separate from native synthesis deadlines and does not certify a global bound on concurrent uploads.

The asset-free server tests include a publication barrier, abort ownership assertion, missing/duplicate terminal controls, repeated stalled readers and successful follow-ups. They run through make test-server-schema, already registered as Server Protocol and Lifecycle in nightly. These tests validate lifecycle semantics, not synthesis arithmetic.

A separate P3 endpoint using the merged #1063 bundle completed A → B → A with one resident worker and matching A WAV hashes. Active cancellation terminated in about 118 ms; a subsequent request rebuilt the worker and matched the earlier WAV. The first cold request took 6.42 seconds, warm short requests 2.61–2.66 seconds, and recovery 3.95 seconds. These are diagnostic shared-host observations, not a performance regression threshold or a laptop audible-stop measurement. Source hashes and sanitized events are retained in the lifecycle report.

The ordinary P3 Whisper and Kokoro services were not replaced. The isolated candidate service was stopped after the test. Matching WAV hashes preserve the tested CKE output; they do not resolve the separate publisher-waveform comparison. Pinned Whisper latency was rechecked independently: short clips about 1.67 seconds and the retained 20-second recording about 2.05 seconds, with matching transcript and loaded-artifact checks.

Measured projection improvements, 8 November 2026

The checked linear provider now vectorizes independent output channels for one-to-three-row tails and uses contiguous loads for complete row groups. Weight validation also processes independent rows together. Each dot product retains ordered FP64 multiplication and addition without FMA; validation, bounded memory, and atomic rejection remain unchanged.

On P3, the pinned Qwen3-TTS 0.6B utterance took 105.10 seconds on the baseline and 63.48 / 63.51 seconds on the candidate: about 39.6% less native synthesis time. All 46 by 16 code IDs and 88,320 FP32 waveform samples were identical. This is one 3.68-second utterance, not conversational-speed or general speech certification.

With the earlier deconvolution improvement present in both variants, three paired Kokoro runs improved from median 6.445 to 6.079 seconds for 5.55 seconds of audio, a further 5.7% reduction with identical WAV hashes. Do not combine measurements from different windows into a controlled cumulative speedup. No live endpoint was changed.

AMD uProf IBS ran successfully on Ryzen. A cache-resident, single-core projection probe improved from 2.796 to 0.753 milliseconds; this is not full-model Ryzen timing. The installed roofline mode rejected the CPU configuration. P3 perf sampling during native Qwen generation attributed 57.54% of cycles to projection computation and 39.83% to weight validation. Sampled cycles are not guaranteed removable wall time. Advisor did not supply a completed roofline result.

The retained report records source and loaded-library hashes, compile commands, trials and limitations. Regression tests cover distinct rows, group and dimension tails, ordered-reduction negative controls, finite-input cancellation and late invalid weights without writes. The affected generated Kokoro and Qwen suites remain part of existing testing.

Bounded Snake and SnakeBeta preflight

Both checked activation providers previously evaluated every sine twice: once to prove the output finite, then again when publishing it. A conservative bound now avoids the first sine when the input and periodic amplitude have ample FP32 headroom. Frequency products and parameters remain checked. Extreme values use the original exact preflight; the write pass, libm calls and FP32 rounding are unchanged. Every input is checked before any output is modified.

An instrumented compiled regression counts real libm calls, compares exact output bits and padding, exercises extreme-value fallback, and rejects a late invalid input without output writes. The previous implementation fails the intended call-count gate (14 calls rather than nine on the mixed ordinary/extreme fixture). Generated Snake/SnakeBeta and connected waveform consumers remain covered by the existing tests. The known Kokoro publisher-waveform diagnostic remains unresolved; matching the baseline waveform is not publisher fidelity certification.

Three paired Kokoro trials reduced median resident task time from 6.562 to 6.134 seconds (6.5% less) with identical WAV hashes. One Qwen full-generation pair took 63.62 and 63.87 seconds with identical generated codes and PCM. Three subsequent codec-only replays had medians 19.870 and 19.672 seconds. These codec replays do not include token generation. The small full-run sample does not establish a stable Qwen end-to-end speedup. Both variants include #1080; absolute times from separate measurement windows should not be compared.

The activation report retains every trial, loaded libraries, compile commands, test counts and limitations. No live speech service was replaced.

Image
100% | |
Scroll to zoom | Drag to pan | W/H to fit | 0 to reset | ESC to close