tts Docker Fix
This commit is contained in:
parent
b1c810e525
commit
c01418cebe
6
tts.py
6
tts.py
@ -6,13 +6,17 @@ import requests
|
|||||||
from gtts import gTTS
|
from gtts import gTTS
|
||||||
from playsound import playsound
|
from playsound import playsound
|
||||||
|
|
||||||
|
import utilities_script as utility
|
||||||
import config
|
import config
|
||||||
|
|
||||||
streamLabsUrl = "https://streamlabs.com/polly/speak"
|
streamLabsUrl = "https://streamlabs.com/polly/speak"
|
||||||
|
|
||||||
def tts(inputText: str, *args):
|
def tts(inputText: str, *args):
|
||||||
outpath = create_speech_file(inputText)
|
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):
|
def create_speech_gtts(input_text: str):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user