From 3c3d660bf618502683d0c7069b968a922e9875c7 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Wed, 3 Jan 2024 15:33:15 +0300 Subject: [PATCH] Finally play the text --- rpid/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpid/main.py b/rpid/main.py index e93b975..f8af2a9 100644 --- a/rpid/main.py +++ b/rpid/main.py @@ -39,7 +39,7 @@ async def toggle(number: int) -> str: @app.get("/speak") async def speak(text: str) -> str: - ret = os.system(f'text2speech "{text}"') + ret = os.system(f'gtts-cli "{text}" --output text.mp3; pw-play text.mp3') return f"TEXT {'OK' if ret == 0 else 'FAIL'}, TEXT: {text}";