146 lines
7.8 KiB
Markdown
146 lines
7.8 KiB
Markdown
# Stimmatelier
|
||
|
||
Private Qwen speech and Humaneness voice-conversion studio for Athena Deck. German, responsive browser UI with
|
||
text input, reference WAV, reference recording, source WAV/recording → local STT
|
||
→ editable transcript → cloned speech, waveform, playback and WAV download.
|
||
No live conversion. Qwen 0.6B Q8 native CPU and 1.7B Base GPU are discovered from
|
||
Deck's runnable profiles. CPU reuses Deck's standard voice if no reference is
|
||
supplied. GPU requires a reference; its transcript is optional. No model copies,
|
||
cloud services, client patches, browser secrets, Docker socket or GPU in this UI.
|
||
|
||
## Integration and deployment
|
||
|
||
Requires Athena Deck's Stimmatelier integration (authenticated static Unix-socket
|
||
proxy and multipart reference upload for native Qwen). This is not a standalone
|
||
model server. The browser calls Deck's existing session-authenticated APIs;
|
||
there is no copied API key, second login or login bypass. The existing HTTPS
|
||
origin provides microphone access. Insecure LAN HTTP cannot use the microphone.
|
||
|
||
```sh
|
||
docker build -t athena-stimmatelier:0.1.0 .
|
||
# STATE is the configured Deck state directory; use Deck's unprivileged UID/GID.
|
||
install -d -m 700 -o 65534 -g 65534 "$STATE/stimmatelier-ui"
|
||
docker run -d --name athena-stimmatelier --restart unless-stopped \
|
||
--network none --read-only --cap-drop ALL --security-opt no-new-privileges:true \
|
||
--pids-limit 64 --memory 128m --memory-swap 128m --cpus .5 \
|
||
--label io.athena-deck.managed=true --label io.athena-deck.role=application \
|
||
--label io.athena-deck.application=stimmatelier \
|
||
-v "$STATE/stimmatelier-ui:/data" athena-stimmatelier:0.1.0
|
||
```
|
||
|
||
Open `/stimmatelier/` on the signed-in Deck HTTPS origin, or use **Weitere
|
||
Dienste → Stimmatelier**. The UI container listens only on `/data/ui.sock`;
|
||
there are no TCP ports or outbound network. Deck reads only three fixed assets
|
||
through the socket and never forwards cookies/credentials to the container.
|
||
For native Debian Deck, use its configured state root and service UID, with the
|
||
same optional Docker recipe. The UI can also run via `python3 app.py` under that
|
||
UID with `STUDIO_SOCKET=<Deck state>/stimmatelier-ui/ui.sock`; Python 3.12+, no
|
||
third-party packages. Docker is optional for a native Deck deployment.
|
||
|
||
## Limits and stored data
|
||
|
||
- German speech, text up to 1000 characters per job.
|
||
- Reference WAV: 1–30 seconds; source recording: 1–120 seconds; files ≤16 MiB.
|
||
- Browser recording is explicitly started/stopped, converted to mono PCM WAV,
|
||
and shown for preview. A denied microphone permission does not affect uploads.
|
||
- STT transcription is editable. Timing, singing and original prosody are not
|
||
preserved by STT → TTS. This is not X-VC/RVC voice conversion.
|
||
- 0.6B uses the existing CPU worker; model stays loaded under Deck's warm policy.
|
||
Custom references transfer speaker identity, no reference-transcript mode.
|
||
- 1.7B uses Deck's normal GPU scheduler and can unload Strata after current work
|
||
drains. The existing 1.7B worker stays loaded until profile/GPU/mode changes.
|
||
- References are deleted from Deck's job files on completion, failure or cancel;
|
||
temporary reference embeddings stay only in worker memory. Source audio and
|
||
transcript follow existing STT's memory-only policy. Generated WAVs remain in
|
||
Deck's job directories. The static UI persists no user data or credentials.
|
||
- Closing the tab does not cancel a running backend job. Shared worker status
|
||
can be replaced by another user/job; the UI detects mismatching job IDs.
|
||
|
||
## Backup, restore and updates
|
||
|
||
Keep this source revision, the pinned Dockerfile base digest, and Deck's
|
||
integration revision. UI container configuration/build recipe are included in
|
||
Deck's labelled-application backup. Its sole writable mount contains a transient
|
||
socket, recreated at startup; there is no UI database to back up. Preserve Deck
|
||
profiles, runtime recipes, public model manifests, encrypted private voices and
|
||
output jobs through Deck's configuration/userdata backups. Venvs are rebuilt
|
||
using Deck's pinned runtime recipes after OS/Python changes. Restoring the UI
|
||
alone is not a full fresh-host restore of Athena. No such full-host acceptance
|
||
is implied here. Rebuild the image from the same source and recreate the named
|
||
container; Deck and models need not restart for a UI-only update.
|
||
|
||
No private recordings, generated WAVs, model weights or credentials belong in Git.
|
||
|
||
## Native systemd option
|
||
|
||
For a native Deck installation, provision Python 3.12+ (Debian's `python3`), copy
|
||
this revision's five source/assets into `/opt/stimmatelier` owned by root and
|
||
readable by the configured Deck service user. Create the studio socket directory
|
||
with mode 0700 owned by that same user/group. No venv, pip, CUDA or model runtime
|
||
is required for this UI. Example unit for a Deck service user `athena-deck` and
|
||
state root `/var/lib/athena-deck` (adapt both to the actual installation):
|
||
|
||
```ini
|
||
[Unit]
|
||
Description=Stimmatelier static Qwen studio
|
||
After=local-fs.target
|
||
[Service]
|
||
Type=simple
|
||
User=athena-deck
|
||
Group=athena-deck
|
||
Environment=STUDIO_SOCKET=/var/lib/athena-deck/stimmatelier-ui/ui.sock
|
||
ExecStart=/usr/bin/python3 /opt/stimmatelier/app.py
|
||
Restart=on-failure
|
||
RestartSec=2
|
||
NoNewPrivileges=yes
|
||
ProtectSystem=strict
|
||
ProtectHome=yes
|
||
PrivateTmp=yes
|
||
PrivateNetwork=yes
|
||
RestrictAddressFamilies=AF_UNIX
|
||
ReadWritePaths=/var/lib/athena-deck/stimmatelier-ui
|
||
[Install]
|
||
WantedBy=multi-user.target
|
||
```
|
||
|
||
Save as `/etc/systemd/system/stimmatelier.service`, then `systemctl daemon-reload`
|
||
and `systemctl enable --now stimmatelier`. Socket directory and Deck's configured
|
||
state root must match. The current production deployment is Docker; this native
|
||
unit is an installation recipe, not a claim of native fresh-host acceptance.
|
||
|
||
## Acceptance on Athena, 2026-10-19
|
||
|
||
- Authenticated HTTPS browser: CPU 0.6B with uploaded synthetic reference → WAV
|
||
(6.6 seconds); GPU 1.7B with reference and reference transcript → WAV
|
||
(5.9 seconds). These are output durations, not generation timings.
|
||
- Uploaded source → 16 kHz PCM STT → editable transcript → 1.7B output passed.
|
||
Reference preparation uses 24 kHz PCM. Actual WAV download passed.
|
||
- UI container rebuilt/recreated and remained reachable; healthcheck healthy,
|
||
restart policy `unless-stopped`, no TCP ports or model copies.
|
||
- Microphone capture is implemented for reference and source recordings; a real
|
||
device microphone recording still requires user acceptance in their browser.
|
||
- Deck integration auth/reference/backup/proxy tests passed. No full fresh-host
|
||
restore or subjective voice-quality acceptance is implied.
|
||
|
||
## Direct Voice Conversion
|
||
|
||
Select **Humaneness Voice Conversion** in the profile menu. Upload or record your
|
||
source performance and a target reference; press **Stimme umwandeln**. No text or
|
||
STT is involved. Both recordings must be1–30s (target ideally5–10s). Playback
|
||
and WAV download use the existing result panel. Microphone capture disables
|
||
browser noise suppression, echo cancellation and automatic gain control.
|
||
|
||
Requires Deck's pinned Humaneness runtime/profile integration. It uses the GPU
|
||
scheduler and can unload idle Strata after active requests finish; CPU Qwen
|
||
remains separate. The official model attempts to preserve source content/timing
|
||
and expression, but does not guarantee exact reproduction of all details or
|
||
ElevenLabs/Qwen-equivalent quality. The initial UI also supports the published
|
||
Deck-specific `/v1/audio/voice-conversions` API through Deck, not a separate port.
|
||
Source/reference inputs are deleted from backend job files at completion/failure/
|
||
cancel; output WAVs remain. The native runtime rebuild/backup recipe is maintained
|
||
in Athena Deck's `deploy/humaneness/README.md`.
|
||
|
||
Humaneness deployment status, 2026-10-19: model/runtime and profile prepared on
|
||
Athena; activation and GPU/microphone acceptance are pending a production idle
|
||
window. The earlier CPU/1.7B acceptance above does not cover this new VC mode.
|