Dokumentation: keep_audio und GET /audio/{job_id} ergänzen

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-06-03 21:12:49 +02:00
commit ce46d4aa59
2 changed files with 27 additions and 2 deletions

View file

@ -160,6 +160,7 @@ journalctl --user -u chatterbox-tts -f
| `POST` | `/stop` | Ausgabe abbrechen, Queue leeren |
| `POST` | `/pause` | Ausgabe pausieren (ohne Datenverlust) |
| `POST` | `/resume` | Pausierte Ausgabe fortsetzen |
| `GET` | `/audio/{job_id}` | Fertige WAV herunterladen (nur mit `keep_audio=true`) |
| `GET` | `/health` | Service-Status und Gerät |
| `GET` | `/status` | Aktueller Job, Queue-Länge, letzte Jobs |
| `GET` | `/voices` | Unterstützte Sprachen |
@ -179,7 +180,8 @@ journalctl --user -u chatterbox-tts -f
"save_wav": false,
"output_path": null,
"pronunciation_dict": null,
"session_id": null
"session_id": null,
"keep_audio": false
}
```
@ -199,6 +201,15 @@ curl -X POST http://localhost:9999/speak \
-H "Content-Type: application/json" \
-d '{"text": "Wichtiger Text", "lang": "de", "interrupt": true}'
# WAV-Datei erzeugen und herunterladen
JOB=$(curl -s -X POST http://localhost:9999/speak \
-H "Content-Type: application/json" \
-d '{"text": "Hallo Welt", "lang": "de", "keep_audio": true}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['job_id'])")
sleep 40 # warten bis Synthese fertig
curl -o ausgabe.wav http://localhost:9999/audio/$JOB
# → WAV-Datei; wird nach dem Download automatisch gelöscht
# Pausieren und fortsetzen
curl -X POST http://localhost:9999/pause
curl -X POST http://localhost:9999/resume
@ -228,7 +239,7 @@ TTS_URL=http://192.168.1.10:9999 python mcp_adapter.py --stdio
| Tool | Parameter | Funktion |
|------|-----------|----------|
| `speak` | text, lang, voice, interrupt, speed, session_id | Text ausgeben |
| `speak` | text, lang, voice, interrupt, speed, session_id, keep_audio | Text ausgeben |
| `stop` | — | Ausgabe stoppen und Queue leeren |
| `pause` | — | Ausgabe pausieren (ohne Datenverlust) |
| `resume` | — | Pausierte Ausgabe fortsetzen |