feat: VoiceCoach v2 - OpenClaw gateway + Speaches STT/TTS

- pipeline.py: completely rewritten to use Speaches STT/TTS and OpenClaw LLM
- main.py: v2 with OPENCLAW_TOKEN support
- requirements.txt: slimmed (removed anthropic, faster-whisper direct deps)
- Dockerfile: slimmer build (no model pre-download)
- whisper_stt.py, piper_tts.py: removed (replaced by Speaches API)
- docker-compose.yml: v2 with speaches + openclaw services, piper-tts removed
- openclaw-agent/system_prompt.md: new directory with agent system prompt
This commit is contained in:
2026-04-01 08:04:59 -05:00
parent 68c3731c65
commit f62772663d
9 changed files with 371 additions and 273 deletions
+8 -8
View File
@@ -35,7 +35,7 @@ app = FastAPI(title="Piper TTS Service", lifespan=lifespan)
class TTSRequest(BaseModel):
text: str
speaker_id: int = 0
speaker_id: int = None
length_scale: float = 1.0
sentence_silence: float = 0.2
@@ -57,13 +57,13 @@ async def synthesize(req: TTSRequest):
buf = io.BytesIO()
with wave.open(buf, "wb") as wf:
voice.synthesize(
req.text,
wf,
speaker_id=req.speaker_id,
length_scale=req.length_scale,
sentence_silence=req.sentence_silence,
)
synth_kwargs = {
"length_scale": req.length_scale,
"sentence_silence": req.sentence_silence,
}
if req.speaker_id is not None:
synth_kwargs["speaker_id"] = req.speaker_id
voice.synthesize(req.text, wf, **synth_kwargs)
return Response(
content=buf.getvalue(),