Fix PiperTTSService to send TTS input as JSON object

This commit is contained in:
hankehly
2025-08-02 15:29:16 +09:00
parent ee56d8572d
commit 694922f627

View File

@@ -84,7 +84,8 @@ class PiperTTSService(TTSService):
try: try:
await self.start_ttfb_metrics() await self.start_ttfb_metrics()
async with self._session.post(self._base_url, json=text, headers=headers) as response: payload = {"text": text}
async with self._session.post(self._base_url, json=payload, headers=headers) as response:
if response.status != 200: if response.status != 200:
error = await response.text() error = await response.text()
logger.error( logger.error(