Renamed Config Variable

Renamed streamlabsVoice to PollyVoice
This commit is contained in:
Alex Orid 2021-01-21 16:04:53 -05:00
parent 6fd3fc216f
commit 3e1759e5d2
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class PollyVoices(Enum):
currentSpeaker = Speaker.GOOGLE_TEXT_TO_SPEECH
fileNameStrategy = FileNameStrategy.CONTENT_BASED
streamlabsVoice = PollyVoices.Justin
PollyVoice = PollyVoices.Justin
botList = ("Nightbot", "StreamElements", "Moobot", "Praxis Bot", "praxis_bot", "MEE6 +", "Nerdy", "Rythm", "Groovy")

2
tts.py
View File

@ -38,7 +38,7 @@ def create_speech_streamlabs(text: str):
#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}
body = {"voice": config.PollyVoice.value, "text": text}
resp = requests.post(streamLabsUrl, data=body).json()
sound_file_url = resp["speak_url"]
if sound_file_url is not None: