Commit Graph
7 Commits
Author SHA1 Message Date
Hasan BasbunarandClaude Opus 5.5 4d85993f55 speech: alloy, the name sent when nobody chose a voice, keeps the default voice
The table of issue #53 gave alloy af_alloy, and alloy is what a client sends when nobody chose a
voice: Open WebUI's AUDIO_TTS_VOICE defaults to it, and OpenAI's examples use it. Every such
client would have moved from the lane's default voice, af_heart, graded A in Kokoro's
VOICES.md, to af_alloy, graded C (found in review, 2026-10-23). alloy keeps the default voice
now, and the ten other names keep their own. The new test fails on the old code (af_alloy).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:52:58 +02:00
Hasan BasbunarandClaude Opus 5.5 775017edce speech: OpenAI's voice names are eleven voices of their own on an English box (issue #53)
OpenAI's eleven voice names, which clients such as Open WebUI send, all answered with the lane's
default voice, so a picker of those names changed nothing anyone could hear (issue #53, found by
Quadrant6630, whose table this is). Each is now an English voice of its own, all eleven checked
against the 41 the lane serves (2026-10-20), two of them British. The lane takes a voice's language
from its name, so on a box whose default voice speaks another language that voice keeps answering
all eleven: an English voice would read a French text wrong, and French has one voice to give. A
name whose voice the lane lacks gets the default voice, not a 400. The test of the English box fails
on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 19:53:02 +02:00
Hasan BasbunarandClaude Opus 5.5 51bb5f0a5a speech: ffmpeg reads the upload as a sound file and nothing else
decode_ffmpeg ran `ffmpeg -i <uploaded file>` with no restriction on
the input format, and ffmpeg chose the demuxer from the bytes. Some of
its demuxers read the file as a playlist or manifest that names
somewhere else: a crafted upload in a DASH manifest made ffmpeg issue
an outbound HTTP GET to an address the sender chose (a server-side
request forgery, the box as the client), and an ffconcat one made it
read a second local file as this user. The lane binds loopback by
default and sits behind the cockpit's login, but SPEECH_BIND widens
it, and an upload should never steer ffmpeg off its own bytes.

The input format is pinned to the sound containers now
(-format_whitelist) and the protocols to file and pipe
(-protocol_whitelist): ffmpeg refuses a manifest with "Format not on
whitelist" before it opens anything, and the second wall stops a
listed demuxer that still reaches out. The upload is still read from a
file (an m4a's index may be at its end), the samples still written to
the pipe.

Found in a cloud review of v1.36.1 (pull request #52). Checked with the
reference box's own ffmpeg (6.1.1-3ubuntu5+esm13): wav, mp3, flac,
m4a, aac, 3gp, caf, aiff, webm, and ogg with vorbis or opus each still
decode through the two options; an ffconcat upload naming a file next
to it read that file before and is refused now ("Format not on
whitelist"). That build already refused a DASH manifest pointing at
http ("Protocol 'http' not on whitelist") and an HLS playlist under
another extension; the format list now stops them before they are
parsed. The speech unit runs with PrivateTmp=yes.

To confirm on the box: a phone m4a and a browser webm or ogg still
transcribe through the lane as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 17:38:10 +02:00
Hasan BasbunarandClaude Opus 5.5 27a23db7a0 speech lane: neither the cockpit nor the proxy relays its routes, as the docs now say
The docs, the installer's warning and the routes' docstring said "the cockpit is the door",
as for the image and video lanes. Nothing in the cockpit or the proxy names the speech lane
or its port (checked in dashboard/ and keepalive-proxy.py): programs on the box reach it,
and another machine through an SSH tunnel, which docs/speech-lane.md now shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:59:12 +02:00
Hasan BasbunarandClaude Opus 5.5 e8ed9126ff speech lane: a voice that is not a string is a 400, not a dropped connection
A speech request whose "voice" was a list or an object raised in the handler (its lookup in
a set of names), so the client got no answer at all and the journal a traceback. It is now
refused with a 400 that says what the field takes, before the voice runs.

Test: two such requests among the bad requests refused before the voice runs; both errored
on the old code (TypeError: unhashable type), both are a 400 now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:59:12 +02:00
Hasan BasbunarandClaude Opus 5.5 b2668276c8 speech lane: a body length that is not one is refused, and every cut moves forward
A negative Content-Length read the body until the client hung up, and one that is not a
number ended the handler on a traceback: both are a 413 now, at once. The piece cutter
bounds its search to the piece, so that no setting can put a cut at or before the piece's
start and stop it moving forward.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:59:12 +02:00
Hasan BasbunarandClaude Opus 5.5 63bfa392c4 speech lane: Qwen3-ASR and Kokoro on the CPU, behind OpenAI's audio routes
./install-speech.sh, opt-in: llama.cpp's llama-server built for the CPU at a pinned
commit runs Qwen3-ASR (0.6B by default, 1.7B with SPEECH_ASR=1.7b), and speech-server.py
serves /v1/audio/transcriptions and /v1/audio/speech in front of it, with Kokoro-82M in
onnxruntime. One unit, qwen38-speech.service, on loopback, the GPU hidden, the small cores
only (0-4 for the recognizer, 10-14 for the voice), so that it runs beside any lane. Not
started at boot unless SPEECH_BOOT=1. Every model is pinned by sha256, every package of
the venv by exact version, wheels only.

What the reference box showed, and the routes do about it (2026-10-05):
- a recording sent whole came back cut with a 200 past the context (582 s: 353 words
  of 1482), and passes of 120 s skipped 61 words; uploads are read by ffmpeg (m4a, webm,
  ogg as well), cut into pieces of 30 s at quiet moments and heard one by one: 9.7% WER
  on 291 s of French at 0.51 of real time, the same as the clips heard one by one;
- llama-server's prompt cache in host memory (8 GiB by default) took the lane from 1.6 to
  4 GiB: --cache-ram 0, and 2.7 GB resident at work;
- Mandarin and Japanese are refused rather than spoken wrong: espeak's phonemes are not
  the ones those voices were trained on (21% and 15% of characters heard back wrong);
- the phonemizer's copies of espeak go with a private /tmp, emptied at every stop.

uninstall.sh lists and removes the unit and the runtime, and keeps the models with a
reclaim command, as for every checkpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:59:12 +02:00