From ada9b692993df9210622312813b48c2d2500ec2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammed=20Mustafa=20Ak=C5=9Fam?= Date: Mon, 4 Jul 2022 11:06:26 +0300 Subject: [PATCH] Fixing legacy VOICE variables Fixing legacy VOICE variables that caused lot of issues if TTSCHOICE set to AWS_VOICE or STREAMLABS_VOICE --- TTS/aws_polly.py | 4 ++-- TTS/streamlabs_polly.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TTS/aws_polly.py b/TTS/aws_polly.py index 703aa6a..6cbe4c5 100644 --- a/TTS/aws_polly.py +++ b/TTS/aws_polly.py @@ -35,9 +35,9 @@ class AWSPolly: if random_voice: voice = self.randomvoice() else: - if not os.getenv("VOICE"): + if not os.getenv("AWS_VOICE"): return ValueError( - f"Please set the environment variable VOICE to a valid voice. options are: {voices}" + f"Please set the environment variable AWS_VOICE to a valid voice. options are: {voices}" ) voice = str(os.getenv("AWS_VOICE")).capitalize() try: diff --git a/TTS/streamlabs_polly.py b/TTS/streamlabs_polly.py index 41fe269..066fa53 100644 --- a/TTS/streamlabs_polly.py +++ b/TTS/streamlabs_polly.py @@ -35,9 +35,9 @@ class StreamlabsPolly: if random_voice: voice = self.randomvoice() else: - if not os.getenv("VOICE"): + if not os.getenv("STREAMLABS_VOICE"): return ValueError( - f"Please set the environment variable VOICE to a valid voice. options are: {voices}" + f"Please set the environment variable STREAMLABS_VOICE to a valid voice. options are: {voices}" ) voice = str(os.getenv("STREAMLABS_VOICE")).capitalize() body = {"voice": voice, "text": text, "service": "polly"}