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:
parent
fe74b84360
commit
ce46d4aa59
2 changed files with 27 additions and 2 deletions
15
README.md
15
README.md
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue