feat(frank-tts-engine): the arm A engine as a boot-persistent quadlet unit
Repo state only: nothing deployed, no host touched, no container started. - `frank-tts-engine` on Dankclaw: `qwentts.cpp` commit 5916bf7c79dbb4e66fc059cdc507a79a23a28bb4, resident `tts-server`, 1.7 B base talker Q4_K_M + Q8_0 tokenizer, container port 8880. It is deliberately NOT a fleet endpoint — `frank-tts` on 7772 is the endpoint consumers address. - Publishes NOTHING. A host-loopback publish would have been useless to the façade (netavark DNATs published ports only, so a bridge container cannot reach a host loopback bind — the shape that 502'd hermes) and would have been the one LAN-reachable surface of an unauthenticated synthesiser. Both voice containers sit on one committed quadlet network, `frank-tts-engine.network` pinned to 10.89.5.0/24 (next free /24 after open-notebook's 10.89.4.0/24), and peers address the engine by container name. Diagnostics and the deployer's health gate run inside the netns (`podman exec`, `wait_container_healthy`). - Cold-voice law honoured in the unit: the first request for a registered voice decodes its whole reference to snapshot codec state (6.2-8.0 s, first audio byte 5 530 ms), later ones restore in 0.5 ms, and the registry is memory-only. `ExecStartPost=-/usr/bin/podman exec frank-tts-engine /app/warm-voices.sh` with `TimeoutStartSec=900`; the `-` prefix keeps a failed warm from crash-looping the endpoint under `Restart=always`. It logs cold=/warm= per voice, so the under-a-second second request is proven on every boot. - Thread law recorded: `tts-server` has no `--threads`; src/backend.h uses hardware_concurrency()/2, so a cpuset pin silently changes the thread count. - Image builds from the pinned commit with the proven line (GGML_BLAS=OFF forced by this host, every GPU backend off, -j 8, no -DGGML_NATIVE because ggml defaults to -march=native for the building host). Two stages; the runtime stage COPYs both the entrypoint and the warmer, because a container that publishes nothing is reached with `podman exec`, not a port. - `scripts/download-frank-tts-engine-qwentts.sh` fetches the two GGUFs with byte and LFS-oid checks (talker 1 219 245 248 B, tokenizer 291 150 624 B); the deployer gates on --verify-only instead of pulling 1.4 GiB mid-deploy. - Registered in SERVICE_ORDER, DANKCLAW_SERVICES, the deploy-remote.sh dispatch, its pre-deploy requirement, deploy.sh's regex, the planner's path map (the whole `dankclaw/voiceservice/` tree mapped to nothing before this), and test-changed.sh ABOVE the `dankclaw/*.container` case whose `*` crosses `/`. - New seam tests/frank_tts_engine.bats (19): the Quadlet generator's own output for network/publish/boot/warm shape, entrypoint argv driven from the tracked env file, the warmer against a stub tts-server over a real socket (registration keys, ref_text absent, late engine, hung synthesis, name refusal), the fetcher's verifier, the pinned cmake line, and both routing tables. Suite: 422 passed. - Vault: [[Frank TTS Engine]] linked from the index; log.md entry for the day.
This commit is contained in:
@@ -62,6 +62,10 @@ SERVICE_ORDER = (
|
||||
"sonarr",
|
||||
"lidarr",
|
||||
"readarr",
|
||||
# The voice pair keeps the inference family's ordering rule: the engine is
|
||||
# a dependency of the 7772 facade, so it is planned (and therefore
|
||||
# restarted) first.
|
||||
"frank-tts-engine",
|
||||
"frank-dragoon",
|
||||
"frank-zealot",
|
||||
"frank-archon",
|
||||
@@ -97,6 +101,7 @@ DANKCLAW_SERVICES = {
|
||||
"homepage",
|
||||
"frank-dragoon",
|
||||
"frank-zealot",
|
||||
"frank-tts-engine",
|
||||
}
|
||||
|
||||
DANKSERVER_SERVICES = {
|
||||
@@ -326,6 +331,18 @@ def services_for_path(path: str, target: str) -> set[str]:
|
||||
# plans the pair, which deploy_open_notebook starts database-first.
|
||||
_add(services, "open-notebook")
|
||||
return services
|
||||
if len(parts) >= 2 and parts[1] == "voiceservice":
|
||||
# The voice stack's containers share one directory but are TWO
|
||||
# deployables — the arm A engine and the 7772 façade in front of it
|
||||
# — so this maps per file, the way the authentik trio does, and not
|
||||
# per directory. Anything that is not named after one of the two
|
||||
# services plans nothing, exactly as it did before the pair was
|
||||
# registered.
|
||||
if parts[-1] in {"frank-tts-engine.container", "frank-tts-engine.network",
|
||||
"Containerfile.engine", "tts-engine-start.sh",
|
||||
"tts-engine-warm.sh"}:
|
||||
_add(services, "frank-tts-engine")
|
||||
return services
|
||||
# frank-dragoon left the quadlet shape on 2026-09-19 (CIRU v4.4.1 host
|
||||
# build, root unit): its files live in scripts/ and map there.
|
||||
if len(parts) >= 2 and parts[1] == "observability":
|
||||
@@ -429,6 +446,21 @@ def services_for_path(path: str, target: str) -> set[str]:
|
||||
# what the live frank-dragoon endpoint renders, so it plans
|
||||
# frank-dragoon.
|
||||
_add(services, "frank-dragoon")
|
||||
if name == "frank-tts-engine.env":
|
||||
# The engine's knobs are command-line flags, and this file is the
|
||||
# repo's copy of them (the image entrypoint translates one line to
|
||||
# one flag), so editing it is a restart of the engine. It also
|
||||
# carries the boot warmer's three knobs, because the warmer is
|
||||
# exec-ed into this container and inherits the same EnvironmentFile.
|
||||
# A restart is what re-registers and re-warms every voice: the
|
||||
# engine's voice registry is memory-only. (The warmer itself lives
|
||||
# with the image, mapped above with the files it is built from, like
|
||||
# the serve scripts of frank-zealot and frank-archon are mapped to
|
||||
# the units that run them.)
|
||||
# scripts/download-frank-tts-engine-qwentts.sh deliberately plans
|
||||
# nothing: it fetches host-side state, like every other download
|
||||
# script in this directory.
|
||||
_add(services, "frank-tts-engine")
|
||||
if name in {"frank-archon.env", "frank-archon.service", "serve-frank-archon.sh"}:
|
||||
# llama.cpp frank-archon (2026-09-26, replacing the Lucebox
|
||||
# DS4.1 quadlet) keeps its unit, env and serve files here the
|
||||
|
||||
@@ -92,6 +92,7 @@ service_is_allowed() {
|
||||
dankclaw:caddy|dankclaw:homepage|dankclaw:seerr|dankclaw:marreta|\
|
||||
dankclaw:open-notebook|\
|
||||
dankclaw:frank-dragoon|dankclaw:frank-zealot|\
|
||||
dankclaw:frank-tts-engine|\
|
||||
dankserver:romm-mariadb|dankserver:romm-redis|dankserver:romm|\
|
||||
dankserver:copyparty|dankserver:jellyfin|dankserver:calibre-web|dankserver:calibre-server|dankserver:plex|dankserver:tautulli|\
|
||||
dankserver:prowlarr|dankserver:qbittorrent|dankserver:radarr|\
|
||||
@@ -549,6 +550,14 @@ build_compose_image() {
|
||||
image="franksdank/$service:latest"
|
||||
containerfile="dankclaw/$service/Containerfile"
|
||||
;;
|
||||
frank-tts-engine)
|
||||
# The arm A TTS engine (qwentts.cpp `tts-server`). Built from
|
||||
# source at a pinned upstream commit, so the build needs network
|
||||
# and the cfhash label below is what keeps an unchanged re-deploy
|
||||
# offline: the clone only happens when this Containerfile changes.
|
||||
image=franksdank/frank-tts-engine:latest
|
||||
containerfile=dankclaw/voiceservice/Containerfile.engine
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
@@ -744,6 +753,54 @@ deploy_open_notebook() {
|
||||
wait_for_health open-notebook http://127.0.0.1:5056/health 180
|
||||
}
|
||||
|
||||
# frank-tts-engine is the arm A TTS engine behind frank-tts: one Quadlet unit
|
||||
# plus the private bridge its unit defines (install_quadlet copies the sibling
|
||||
# frank-tts-engine.network — without that file the v1 generator refuses to
|
||||
# produce the container unit at all, the same trap documented above). The
|
||||
# façade that consumes it is a separate service on a separate port and a
|
||||
# separate handler.
|
||||
deploy_frank_tts_engine() {
|
||||
# Weights BEFORE the build, and refuse rather than fetch. The payload is
|
||||
# 1.4 GiB of GGUF with byte and sha256 checks; silently pulling it inside a
|
||||
# deploy would turn a stalled network into a deploy that looks hung, and
|
||||
# would hide which of the two failure modes the operator is in. The fetcher
|
||||
# is idempotent, so re-running this handler after the fetch is cheap.
|
||||
if ! scripts/download-frank-tts-engine-qwentts.sh --verify-only >/dev/null; then
|
||||
echo "frank-tts-engine: the talker/tokenizer GGUFs are missing or wrong-sized under /home/dank/models/Qwen3-TTS-GGUF; run scripts/download-frank-tts-engine-qwentts.sh and re-deploy" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Build first: Image= is a locally built tag with Pull=never, so the
|
||||
# generator cannot start a container from it before it exists.
|
||||
build_compose_image frank-tts-engine
|
||||
|
||||
install_quadlet frank-tts-engine dankclaw/voiceservice/quadlet frank-tts-engine
|
||||
systemctl --user start frank-tts-engine-network.service
|
||||
# No `systemctl --user enable` (generated Quadlet units cannot be enabled
|
||||
# on this host); boot persistence is the [Install] section in the unit.
|
||||
#
|
||||
# `restart` blocks until the unit reaches started, which includes the
|
||||
# ExecStartPost warm pass — a boot of this service is therefore already
|
||||
# warm by the time the next line runs.
|
||||
systemctl --user restart frank-tts-engine.service
|
||||
# NOT wait_for_health: this container publishes nothing, so there is no URL
|
||||
# the deployer can dial from the host. The unit's HealthCmd runs inside the
|
||||
# container's own namespace, and podman's recorded health status is what the
|
||||
# host can actually observe.
|
||||
wait_container_healthy frank-tts-engine 150 || return 1
|
||||
|
||||
# The warmer runs a second time here on purpose. ExecStartPost carries a
|
||||
# `-` prefix so a failed warm can never crash-loop the endpoint, which also
|
||||
# means the unit cannot fail the deploy on it. This call is where a voice
|
||||
# that did not warm becomes a deploy result, and where the per-voice
|
||||
# cold=/warm= numbers land on the operator's console instead of only in the
|
||||
# journal. The pass itself is idempotent and the second cold cost is gone:
|
||||
# the voices are already warm, so this costs about a second per voice. It is
|
||||
# exec-ed into the container for the same reason the health gate is: no host
|
||||
# address exists.
|
||||
podman exec frank-tts-engine /app/warm-voices.sh
|
||||
}
|
||||
|
||||
deploy_comfyui() {
|
||||
# Build first: the unit's Image= resolves against local storage, so the
|
||||
# image has to exist before the generator starts a container from it.
|
||||
@@ -1690,6 +1747,7 @@ deploy_service() {
|
||||
frank-dragoon) deploy_llm_dragoon ;;
|
||||
frank-zealot) deploy_llm_zealot ;;
|
||||
frank-archon) deploy_llm_archon ;;
|
||||
frank-tts-engine) deploy_frank_tts_engine ;;
|
||||
hermes|hermes-dashboard|hermes-webui) deploy_hermes ;;
|
||||
romm|romm-mariadb|romm-redis|mariadb|redis) deploy_romm_stack "$service" ;;
|
||||
jellyfin) deploy_jellyfin ;;
|
||||
|
||||
@@ -142,6 +142,7 @@ valid_service() {
|
||||
dankclaw:node-exporter|dankclaw:authentik-postgres|dankclaw:authentik-server|\
|
||||
dankclaw:authentik-worker|dankclaw:authentik-outpost|dankclaw:authentik-outpost-ldap|dankclaw:anubis|dankclaw:seerr|\
|
||||
dankclaw:open-notebook|\
|
||||
dankclaw:frank-tts-engine|\
|
||||
dankclaw:frank-dragoon|dankclaw:frank-zealot|\
|
||||
dankserver:romm-mariadb|dankserver:romm-redis|dankserver:romm|\
|
||||
dankserver:copyparty|dankserver:jellyfin|dankserver:calibre-web|dankserver:calibre-server|dankserver:plex|dankserver:tautulli|\
|
||||
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env bash
|
||||
# Download the frank-tts-engine payload: the two GGUF files the arm A engine
|
||||
# (qwentts.cpp `tts-server`, dankclaw/voiceservice/Containerfile.engine) loads
|
||||
# once at startup — Serveurperso/Qwen3-TTS-GGUF's **1.7 B base talker at
|
||||
# Q4_K_M** and the **12 Hz tokenizer at Q8_0**. Public repo — no auth header,
|
||||
# and never a token on the command line (world-readable in /proc/<pid>/cmdline).
|
||||
#
|
||||
# THE BASE VARIANT IS MANDATORY, NOT A PREFERENCE. The engine refuses every
|
||||
# voice registration unless the loaded model reports type "base"
|
||||
# (tools/tts-server.cpp, register_voice): on a customvoice or voicedesign talker
|
||||
# the cloned-voice product does not exist. The 0.6 B talker (628,905,056 B for
|
||||
# its Q4_K_M) also exists and is NOT the decided artifact — 1.7 B is what live
|
||||
# output was measured with on 2026-10-18.
|
||||
#
|
||||
# Fresh downloads, no resume (the same rule the frank-zealot fetcher learned the
|
||||
# hard way: `curl -C -` once produced an oversized file on a multi-GB payload);
|
||||
# -f/--fail-with-body so an HTTP error is never a success; then exact byte count
|
||||
# and sha256 against the Hub's own LFS oid. This repo IS LFS, so the sha values
|
||||
# below are the pointer oids the Hub publishes — verified at fetch, not
|
||||
# computed locally. Idempotent: a complete, correctly-hashed file is skipped,
|
||||
# and `--verify-only` reports without downloading (that is the mode the deployer
|
||||
# and the runbook use to answer "are the weights there?").
|
||||
#
|
||||
# Both files together are 1.4 GiB and the engine mmaps them: peak RSS measured
|
||||
# 5.7 GiB with both resident. Nothing here is deleted on a swap — the previous
|
||||
# talker stays on disk, because the rollback for a bad engine build is to point
|
||||
# QWENTTS_MODEL at a different file, not to re-download 1.4 GiB under pressure.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/download-frank-tts-engine-qwentts.sh [DEST_DIR] [--verify-only]
|
||||
# Default DEST_DIR is the host directory the frank-tts-engine unit mounts
|
||||
# read-only at /models.
|
||||
set -euo pipefail
|
||||
|
||||
DEST=""
|
||||
VERIFY_ONLY=0
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--verify-only) VERIFY_ONLY=1 ;;
|
||||
*) DEST="$arg" ;;
|
||||
esac
|
||||
done
|
||||
DEST="${DEST:-/home/dank/models/Qwen3-TTS-GGUF}"
|
||||
|
||||
# repo | hub-name | dest-name | bytes | sha256 (Hub LFS oid, resolved 2026-10-18)
|
||||
FILES=(
|
||||
"Serveurperso/Qwen3-TTS-GGUF|qwen-talker-1.7b-base-Q4_K_M.gguf|qwen-talker-1.7b-base-Q4_K_M.gguf|1219245248|ea393ebaf2167ea23ce9fc18b093822851358a950d7075cd47ab4f6ce23e887d"
|
||||
"Serveurperso/Qwen3-TTS-GGUF|qwen-tokenizer-12hz-Q8_0.gguf|qwen-tokenizer-12hz-Q8_0.gguf|291150624|1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94"
|
||||
)
|
||||
|
||||
mkdir -p "$DEST"
|
||||
status=0
|
||||
for entry in "${FILES[@]}"; do
|
||||
IFS='|' read -r repo hubname destname size sha <<<"$entry"
|
||||
url="https://huggingface.co/${repo}/resolve/main/${hubname}"
|
||||
f="$DEST/$destname"
|
||||
have=0
|
||||
if [[ -f "$f" ]] && [[ "$(stat -c%s "$f")" == "$size" ]]; then
|
||||
if sha256sum -c --quiet <(printf '%s %s\n' "$sha" "$f"); then
|
||||
have=1
|
||||
fi
|
||||
fi
|
||||
if (( have )); then
|
||||
echo "OK $destname"
|
||||
continue
|
||||
fi
|
||||
if (( VERIFY_ONLY )); then
|
||||
echo "MISSING $destname"
|
||||
status=1
|
||||
continue
|
||||
fi
|
||||
echo "FETCHING $destname (from $repo)"
|
||||
tmp="$f.part"
|
||||
curl -fsSL --fail-with-body -o "$tmp" "$url"
|
||||
mv "$tmp" "$f"
|
||||
if [[ "$(stat -c%s "$f")" != "$size" ]]; then
|
||||
echo "SIZE FAIL $destname ($(stat -c%s "$f") != $size)"
|
||||
status=1
|
||||
continue
|
||||
fi
|
||||
if ! sha256sum -c --quiet <(printf '%s %s\n' "$sha" "$f"); then
|
||||
echo "SHA FAIL $destname"
|
||||
status=1
|
||||
continue
|
||||
fi
|
||||
echo "VERIFIED $destname"
|
||||
done
|
||||
if (( status == 0 )); then
|
||||
echo "DOWNLOAD_DONE $DEST"
|
||||
else
|
||||
echo "DOWNLOAD_FAILED $DEST" >&2
|
||||
fi
|
||||
exit "$status"
|
||||
@@ -0,0 +1,136 @@
|
||||
# frank-tts-engine.env — tunables for **frank-tts-engine**, the arm A TTS
|
||||
# engine on Dankclaw (qwentts.cpp `tts-server`, container port **8880**, never a
|
||||
# fleet endpoint). Read by the Quadlet unit
|
||||
# (dankclaw/voiceservice/quadlet/frank-tts-engine.container) as its only
|
||||
# EnvironmentFile=, which is why every path below is the value the CONTAINER
|
||||
# sees. The host directories those mounts come from are named in
|
||||
# dankclaw/voiceservice/quadlet/frank-tts-engine.container and
|
||||
# scripts/download-frank-tts-engine-qwentts.sh.
|
||||
#
|
||||
# WHAT SITS HERE AND WHAT DOES NOT. `tts-server` reads its configuration from
|
||||
# command-line flags only — it looks at no environment variable — so this file
|
||||
# is consumed by the image's entrypoint
|
||||
# (dankclaw/voiceservice/tts-engine-start.sh), which turns each key below into
|
||||
# the matching flag. Every value has a default baked into that script, and the
|
||||
# default equals the value below: this file exists so the decided shape is
|
||||
# written down in the repo and one line can be changed without a rebuild, not
|
||||
# because the engine would otherwise fail to boot.
|
||||
#
|
||||
# THE THREAD LAW (read this before reaching for CPUQuota=, CPUAffinity=,
|
||||
# taskset or a systemd slice). There is **no `-t`/`--threads` flag** in this
|
||||
# build: src/backend.h computes the CPU thread count as
|
||||
# `std::thread::hardware_concurrency() / 2` (its own comment: GEMM shares SIMD
|
||||
# units across hyperthreads). The engine therefore sizes its pools from what the
|
||||
# kernel *reports*, not from what it is allowed to use. Pin the container to a
|
||||
# cpuset and the thread count silently changes with it — different GEMM
|
||||
# tiling, different timings, no log line saying so, and the measured numbers
|
||||
# below stop describing the process you are running. Nothing in this fleet
|
||||
# pins this container; that is a decision, not an oversight.
|
||||
#
|
||||
# THE COLD-VOICE LAW (why the unit has an ExecStartPost at all). The first
|
||||
# speech request for a registered voice decodes the ENTIRE reference clip to
|
||||
# snapshot its codec state: 6.2-8.0 s total, first audio byte at 5,530 ms. Every
|
||||
# later request for that voice restores the snapshot in 0.5 ms. Registrations
|
||||
# live in memory only, so a restart loses them and re-registration alone does
|
||||
# NOT warm the voice — the warm pass has to synthesize something. So
|
||||
# dankclaw/voiceservice/tts-engine-warm.sh (in the image at
|
||||
# /app/warm-voices.sh) runs on every start and speaks one short sentence per
|
||||
# voice. Skip it and the first person to ask for audio that day waits 5.5 s in
|
||||
# silence. It runs INSIDE this container — `podman exec`, from the unit's
|
||||
# ExecStartPost — so it reads /voices here and the keys at the bottom of this
|
||||
# file are its knobs too.
|
||||
#
|
||||
# STREAMING IS NOT BUFFERED. The same seed gives audio that differs in 92.2 %
|
||||
# of samples (-41.6 dB RMS) between `response_format=pcm` (the streaming path,
|
||||
# codec chunks pushed as they decode) and `response_format=wav` (the buffered
|
||||
# path). Nothing in this stack may compare the two, cache one against the
|
||||
# other, or assume a seed pins output across `response_format`. frank-tts always
|
||||
# asks for `wav` and re-encodes to mp3 itself; the warmer below also asks for
|
||||
# `wav`, for that reason and because the streamed path would need a reader.
|
||||
#
|
||||
# THE ROUTE LIST, verbatim from tts-server at the pinned commit, so nobody
|
||||
# debugs against a route that does not exist: GET /health, GET /v1/models,
|
||||
# GET|POST /v1/audio/voices, DELETE /v1/audio/voices/{name},
|
||||
# POST /v1/audio/speech (response_format wav or pcm). Everything else is a bare
|
||||
# 404. Note two traps in that surface: `GET /v1/audio/voices` returns an empty
|
||||
# JSON object rather than the voice list at this commit (the handler builds the
|
||||
# array and never attaches it to the document), and a `POST /v1/audio/voices`
|
||||
# carrying `spk_b64` without `rvq_b64` is rejected outright — it is `wav_b64` or
|
||||
# BOTH of the pair.
|
||||
|
||||
# --- the two weights (see scripts/download-frank-tts-engine-qwentts.sh) -------
|
||||
# Container paths; the host directory /home/dank/models/Qwen3-TTS-GGUF is
|
||||
# mounted read-only at /models. 1,219,245,248 B + 291,150,624 B, fetched from
|
||||
# https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF and byte-checked at fetch.
|
||||
#
|
||||
# The 1.7 B talker is the decided artifact (Frank, 2026-10-18). A 0.6 B talker
|
||||
# exists at 628,905,056 B and is NOT what live output was measured with; the
|
||||
# Q4_K_M quantization is the size that leaves the measured RTF margin intact on
|
||||
# this box, and the tokenizer rides at Q8_0 because the codec is where clone
|
||||
# fidelity is lost first.
|
||||
#
|
||||
# It has to be the **base** variant, not customvoice/voicedesign: the engine
|
||||
# refuses any voice registration unless qt_model_type() reports "base"
|
||||
# (tools/tts-server.cpp, the register_voice lambda). Cloned voices — the whole
|
||||
# product — are impossible on the other two variants.
|
||||
QWENTTS_MODEL=/models/qwen-talker-1.7b-base-Q4_K_M.gguf
|
||||
QWENTTS_CODEC=/models/qwen-tokenizer-12hz-Q8_0.gguf
|
||||
|
||||
# What GET /v1/models reports, and what scripts/frank-tts.env's
|
||||
# TTS_UPSTREAM_MODEL names. A model id, never a file name.
|
||||
QWENTTS_ALIAS=frank-tts-engine
|
||||
|
||||
# 0.0.0.0 is required and is not an exposure decision: tts-server binds
|
||||
# 127.0.0.1 by default, and inside its own netns that address is reachable by no
|
||||
# one, not even the façade on the same bridge — which is why a host-loopback
|
||||
# publish would not have helped either (netavark DNATs published ports only, and
|
||||
# the unit publishes nothing at all). Binding 0.0.0.0 exposes the server to the
|
||||
# one network it is attached to: the private voice bridge
|
||||
# (systemd-frank-tts-engine, 10.89.5.0/24), whose only other member is frank-tts.
|
||||
QWENTTS_HOST=0.0.0.0
|
||||
QWENTTS_PORT=8880
|
||||
|
||||
# Language label applied when a request omits one. `auto` is upstream's default
|
||||
# and what the trial ran; naming a language is a per-request field on
|
||||
# /v1/audio/speech, so this is only the fallback.
|
||||
QWENTTS_LANG=auto
|
||||
|
||||
# Serialised FIFO: one synthesis at a time, everyone else queued. Warm RTF on
|
||||
# this box is 0.55-0.67 against real time 1.0, which is the entire margin a live
|
||||
# stream has; two concurrent syntheses split the same cores and the margin is
|
||||
# gone, with the added effect that the second caller's time-to-first-audio now
|
||||
# includes the first one's whole utterance. The façade's own budget
|
||||
# (SHIM_TIMEOUT=600, and open-notebook's ESPERANTO_TTS_TIMEOUT=660 sitting one
|
||||
# round-trip outside it) is what absorbs the queue.
|
||||
QWENTTS_MAX_BATCH=1
|
||||
|
||||
# --- the boot warmer (dankclaw/voiceservice/tts-engine-warm.sh) --------------
|
||||
# These three are read by the warm hook, not by tts-server. They live here
|
||||
# because the hook is exec-ed into this container and therefore inherits this
|
||||
# same EnvironmentFile — one file, one restart, no second source of truth.
|
||||
|
||||
# Container path of the voice packs; the host directory is /home/dank/voices,
|
||||
# mounted read-only by the unit and mounted (read-only, same source) by
|
||||
# frank-tts as well. A directory counts as a voice exactly when it contains
|
||||
# reference.wav, which is the same rule frank-tts applies.
|
||||
VOICES_DIR=/voices
|
||||
|
||||
# How long the hook waits for /health before giving up. Model load dominates
|
||||
# this: both GGUFs are read and the context is built before the HTTP thread
|
||||
# binds, and a boot competes with every other unit on the box. 300 s is generous
|
||||
# against a cold cache; the unit's TimeoutStartSec (900 s) is what bounds the
|
||||
# whole pass, warming included.
|
||||
HEALTH_WAIT=300
|
||||
|
||||
# The sentence each voice speaks to snapshot its codec state, and the text the
|
||||
# second (warm-timing) pass repeats. Fixed on purpose: the cold=/warm= numbers in
|
||||
# the journal are comparable across boots only if the input is the same. Kept
|
||||
# short because warming a library is serial — one cold decode per voice, 6-8 s
|
||||
# each, inside the unit's start deadline. Quoted because podman's env-file parser
|
||||
# and a shell `source` must both read the sentence as ONE value.
|
||||
WARM_TEXT="Warm up, one two three."
|
||||
|
||||
# Per-request ceiling for the hook. A cold voice measures 6-8 s, so 120 s is
|
||||
# ~15x margin: reaching it means the engine is wedged, and systemd is still
|
||||
# waiting on this pass before it calls the unit started.
|
||||
REQUEST_TIMEOUT=120
|
||||
@@ -138,6 +138,21 @@ for path in "${CHANGED[@]}"; do
|
||||
add_test tests/docs_completeness.bats
|
||||
add_test tests/deployment_scoping.bats
|
||||
;;
|
||||
# The voice stack: the arm A engine unit, the private bridge it owns,
|
||||
# its image and its entrypoint. Like the open-notebook block above,
|
||||
# this case MUST precede the dankclaw/*.container glob — that `*`
|
||||
# crosses `/`, so without this case
|
||||
# dankclaw/voiceservice/quadlet/frank-tts-engine.container is routed to
|
||||
# the open-webui/pihole/searxng seams and its own seam never runs.
|
||||
# The façade's seam rides along: the two share a directory, a network
|
||||
# and the request path a consumer takes.
|
||||
dankclaw/voiceservice/*)
|
||||
add_test tests/frank_tts_engine.bats
|
||||
add_test tests/frank_tts_unit.bats
|
||||
add_test tests/deployment_flow.bats
|
||||
add_test tests/deployment_scoping.bats
|
||||
add_test tests/docs_completeness.bats
|
||||
;;
|
||||
dankclaw/*.container|dankclaw/*.network)
|
||||
add_test tests/open_webui_quadlet.bats
|
||||
add_test tests/pihole.bats
|
||||
@@ -197,6 +212,19 @@ for path in "${CHANGED[@]}"; do
|
||||
# as additions, with "no focused-test mapping".
|
||||
.AGENTTRASH/*|*/.AGENTTRASH/*)
|
||||
;;
|
||||
# The two voice env files both reach a container through a Quadlet unit
|
||||
# (EnvironmentFile=), so they select the voice seams plus the
|
||||
# script-syntax seam. This case has to precede the generic
|
||||
# scripts/*.service and scripts/* fallbacks below, or a change to
|
||||
# scripts/frank-tts-engine.env would run nothing but bash -n. The
|
||||
# warmer is NOT here: it ships inside the engine image and is routed
|
||||
# with the rest of dankclaw/voiceservice/* above.
|
||||
scripts/frank-tts-engine.env|scripts/frank-tts.env)
|
||||
add_test tests/frank_tts_engine.bats
|
||||
add_test tests/frank_tts_unit.bats
|
||||
add_test tests/deployment_scoping.bats
|
||||
add_test tests/scripts_syntax.bats
|
||||
;;
|
||||
# frank-archon is llama.cpp (the unsloth b11030-mix prebuilt) on the
|
||||
# two R9700s as a ROOT unit — the 2026-09-26 swap that replaced the
|
||||
# Lucebox DS4.1 quadlet on :7770. Its env, unit and serve script all
|
||||
|
||||
Reference in New Issue
Block a user