From 937504816d5db6e70cf2640f4fe8a368b6ac0dcb Mon Sep 17 00:00:00 2001 From: Alex Orid Date: Mon, 21 Sep 2020 03:48:11 -0400 Subject: [PATCH] Windows TTS Tweak Changed the ogg to mp3 for now until I make a detect os function if it doesnt work on other systems. --- tts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tts.py b/tts.py index 3223b76..00d3e74 100644 --- a/tts.py +++ b/tts.py @@ -34,7 +34,9 @@ def create_speech_streamlabs(text: str): :param text: any reasonable english text :return: returns the path of the file for the sound """ - path = os.path.join(get_tts_dir(), create_file_name(text, "ogg")) + #Normally this is set to OGG, For now it is mp3 in order to work on Windows via playsound + #Not sure if this approach will work as mp3 on Linux/Mac + path = os.path.join(get_tts_dir(), create_file_name(text, "mp3")) if not os.path.exists(path): body = {"voice": config.streamlabsVoice.value, "text": text} resp = requests.post(streamLabsUrl, data=body).json()