From c01418cebef5aed4818ffd9f954b2aaa5e038753 Mon Sep 17 00:00:00 2001 From: Alex Orid Date: Thu, 15 Apr 2021 17:33:56 -0400 Subject: [PATCH] tts Docker Fix --- tts.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tts.py b/tts.py index 54790c0..116c990 100644 --- a/tts.py +++ b/tts.py @@ -6,13 +6,17 @@ import requests from gtts import gTTS from playsound import playsound +import utilities_script as utility import config streamLabsUrl = "https://streamlabs.com/polly/speak" def tts(inputText: str, *args): outpath = create_speech_file(inputText) - playsound(outpath) + if utility.isRunningInDocker() == False: + print("Docker Detected, skipping playsound()") + else: + playsound(outpath) def create_speech_gtts(input_text: str):