Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,13 @@ import gradio as gr
|
|
6 |
from pydub import AudioSegment
|
7 |
from TTS.api import TTS
|
8 |
|
9 |
-
# Set
|
10 |
os.environ["TTS_ACCEPT_TOS"] = "1"
|
|
|
|
|
11 |
|
12 |
-
|
|
|
13 |
if license_agreement == 'y':
|
14 |
print("Commercial license confirmed.")
|
15 |
else:
|
|
|
6 |
from pydub import AudioSegment
|
7 |
from TTS.api import TTS
|
8 |
|
9 |
+
# Set environment variables to accept license terms
|
10 |
os.environ["TTS_ACCEPT_TOS"] = "1"
|
11 |
+
os.environ["TTS_LICENSE_ACCEPT"] = "true"
|
12 |
+
os.environ["COQUI_STUDIO_LICENSE"] = "1"
|
13 |
|
14 |
+
# Adjust license agreement logic
|
15 |
+
license_agreement = os.getenv('COQUI_LICENSE_AGREEMENT', 'n') # Default to 'n'
|
16 |
if license_agreement == 'y':
|
17 |
print("Commercial license confirmed.")
|
18 |
else:
|