diff --git a/rpid/main.py b/rpid/main.py index 23511ba..a650e7e 100644 --- a/rpid/main.py +++ b/rpid/main.py @@ -39,7 +39,10 @@ async def toggle(number: int) -> str: @app.get("/speak") async def speak(text: str) -> str: - ret = os.system(f'gtts-cli "{text}" --lang tr --output text.mp3; pw-play text.mp3') + with open("speak.txt") as f: + f.write(text) + + ret = os.system(f'gtts-cli --file speak.txt --lang tr --output text.mp3; pw-play text.mp3') return f"TEXT {'OK' if ret == 0 else 'FAIL'}, TEXT: {text}";