Fix PiperTTSService to send TTS input as JSON object
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user