Fix SpokenKokoroTTSService.run_tts signature (broke all call audio)

run_tts is called as run_tts(self, text, context_id); the override only accepted
(self, text), so every utterance raised "takes 2 positional arguments but 3
were given" and produced no audio — callers heard nothing on every call since
the number-normalization change. Added context_id and pass it through. Verified
the service now emits audio (118KB for a sample) with digits normalized.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tocmo0nlord
2026-06-26 01:13:45 +00:00
parent 46409bd51a
commit 92abe209f3

4
bot.py
View File

@@ -320,8 +320,8 @@ class SpokenKokoroTTSService(KokoroTTSService):
"""KokoroTTSService that normalizes numbers to digit-by-digit speech before synthesis,
so phone numbers/addresses/zips are read naturally instead of as cardinals + 'dash'."""
async def run_tts(self, text: str):
async for frame in super().run_tts(tts_normalize(text)):
async def run_tts(self, text: str, context_id: str):
async for frame in super().run_tts(tts_normalize(text), context_id):
yield frame