Commit Graph
24 Commits
Author SHA1 Message Date
Pascal 2862be4152 predictor: static graphs replayed with a single id upload per step
The 15 predictor flavors build and allocate once at load, positions,
kv rows, and mask baked as never freed graph outputs, and replay
directly on the backend. The prefill slices the last position before
lm_head so every flavor reads one logits row at offset zero. Replaces
the per step graph rebuild, sched allocation, and debug prints.
2026-07-06 21:46:08 +02:00
Pascal 73fe0c67bb server: sampling overrides on the speech endpoint
The speech body accepts seed, max_new_tokens, temperature, top_k,
top_p, and repetition_penalty. Unset fields keep the engine defaults,
a temperature of zero selects greedy decoding, and the subtalker
mirrors the talker knobs. A fixed seed makes a request reproducible.
2026-07-05 15:01:37 +02:00
Pascal 7a4c799f9c server: reject unknown voice names on base models
A speech request naming a voice that matches neither the registry nor
a model speaker returns 400 instead of silently generating without a
voice.
2026-07-05 13:45:49 +02:00
Pascal 62dec12580 server: cloned voice registry over the OpenAI surface
POST /v1/voices registers a voice from a WAV extracted server side
through qt_extract_voice_ref or from pre extracted .spk and .rvq
latents taken verbatim, DELETE drops it and GET lists it alongside the
model speakers. A registered voice wins over a speaker of the same
name and injects the reference latents into qt_tts_params, ref_text
present selects ICL clone mode. The registry lives in process RAM
under the synthesis mutex, so registration and lookups never race a
running synthesis. The audio and rvq readers gain buffer variants
factored from the file paths. The README and the architecture
document catch up on the streaming decode, the hidden bridge, and the
server endpoints.
2026-07-05 12:28:55 +02:00
Pascal 3a3069b8fd utf8: normalize inbound text bytes to UTF-8
Same gap as omnivoice.cpp: the UTF-8 boundary covers argv, console
output, and fopen but not the bytes arriving from stdin or text files.
Windows shells and editors hand those over as UTF-16 with BOM
(PowerShell redirection, Notepad, Out-File) or the ANSI codepage (cmd
pipes), and the raw bytes reach the tokenizer as garbage.

utf8_normalize() closes the gap: UTF-8 BOM stripped on every platform,
UTF-16 BOM losslessly recoded to UTF-8, bytes failing UTF-8 validation
decoded from the ANSI codepage. Valid UTF-8 passes through untouched.
Wired into read_stdin_text (binary mode stdin so CRLF translation
cannot eat UTF-16 0x0D bytes) and read_text_file, which also moves
from raw fopen to utf8_fopen so a non-ASCII --ref-text path opens.
2026-07-04 01:14:00 +02:00
Pascal 0bf4a18b22 codec: add pre-encoded voice reference (--ref-spk / --ref-rvq)
qwen-codec --talker extracts the speaker embedding (.spk, raw f32)
and the ICL codes (.rvq) in one pass, encode truncated to the hop
boundary conforming to the --ref-wav path. qwen-tts loads them via
--ref-spk / --ref-rvq and skips the speaker encoder and codec encode
on every synthesis: TTFA 205 ms -> 89 ms. Extends qt_tts_params with
ABI v2 latent fields, adds qt_num_codebooks(), ships freeman.spk +
freeman.rvq and switches clone scripts to the latent path. Output is
bit-identical to the raw path at fixed seed.
2026-06-11 21:45:13 +02:00
PascalandJeffrey van Binsbergen df66c67706 tts: add --stream-by-line, one utterance and one WAV header per line
With -o '-', stdin is read line by line and every line synthesises
immediately as its own utterance, model and speaker staying resident
across lines. Each utterance after the first opens with a fresh RIFF
header, armed at end of line and consumed lazily at the next audio,
so a client can split the stream into standalone WAV clips on the
RIFF magic. Port of the feature contributed to omnivoice.cpp in
ServeurpersoCom/omnivoice.cpp#11.

Co-authored-by: Jeffrey van Binsbergen <comgenie@comgenie.com>
2026-06-06 23:13:46 +02:00
Pascal ed8052eeb3 clang-format 2026-06-06 22:46:56 +02:00
Pascal ca0c779f49 tts: default language to auto, NULL lang selects auto, reject NULL text 2026-06-06 13:31:51 +02:00
Pascal f3cfa5cf47 server: add OpenAI compatible TTS server (chunked PCM streaming, WAV one-shot) 2026-06-06 12:47:10 +02:00
Pascal 4bf578ec7b qwen-tts: drop --text, align help on omnivoice style 2026-05-14 23:48:27 +02:00
Pascal dda50c2225 codec: add chunked decode with rolling left context 2026-05-14 22:53:28 +02:00
Pascal b1339f7cae abi: drop QT_CODEC_SAMPLE_RATE macro, hardcode 24000 like omnivoice 2026-05-14 21:55:23 +02:00
Pascal 38bf6d762a abi, pipeline, cli: conform qwentts on omnivoice convention 2026-05-14 21:42:52 +02:00
Pascal 259e7059f6 align symbol naming on omnivoice convention 2026-05-14 18:09:07 +02:00
Pascal e8f1c2a053 nits 2026-05-14 16:47:45 +02:00
Pascal b1e864cb8d cli, facade: rename --ref-audio to --ref-wav, align with omnivoice convention 2026-05-14 15:46:46 +02:00
Pascal 6ad6a7db7a facade, abi: thin CLI on top of qwen_* public ABI, lock contract with C99 probe 2026-05-14 15:31:47 +02:00
Pascal eb48f33f09 utf8: portable Windows UTF-8 boundary for argv, fopen and CreateFile 2026-05-14 14:10:26 +02:00
Pascal d5f1e20c08 pipeline: zero-init qenc_host_ready, value-init PipelineTTS
The lazy-init flag started on stack garbage. When non-zero the encode
path skipped the codebook load and silently returned empty RVQ codes.
2026-05-11 18:27:06 +02:00
Pascal 7f532f1ed0 cli, pipeline: decode --ref-audio once at the CLI, pipeline takes a mono buffer
Clone mode used to read the same WAV twice (speaker encoder then codec
encoder), which failed silently on Windows where pipeline_codec_encode
returned empty on the second pass. PipelineTTSSynthesizeParams now takes
ref_audio_24k + ref_n_samples instead of a path. The CLI calls
audio_read_mono once, holds the buffer in a unique_ptr until synthesis
returns, and feeds the same pointer to both encoders.
2026-05-11 18:14:59 +02:00
Pascal d700ffea43 cli: --ref-text takes a file path instead of inline string content 2026-05-11 17:57:40 +02:00
Pascal 530eed6ac5 loader, quantize: align GGUF on llama.cpp, conv kernels widened to F16 at load
GGUF norm matches llama.cpp policy: F32 master stays F32, BF16
variant keeps source BF16, K-quants fall back to F16 when kernel
rows do not align. No conv override in pick_type.

Conv kernels widen to F16 at load through gf_load_conv (12 sites).
qwen_load_ctw_f32 accepts BF16 source.

TODO upstream GGML: ggml_conv_1d and ggml_conv_1d_dw force F16 on
their im2col output, while conv_2d picks the kernel dtype. This
crashes F32 and BF16 kernels on CPU (im2col only handles F16) and
BF16 on Vulkan (mul_mat refuses BF16 on the operand the kernel
ends up on). Aligning conv_1d on conv_2d removes the workaround.
2026-05-11 12:42:54 +02:00
Pascal add3f940a0 Initial release 2026-05-10 15:57:15 +02:00