Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,9 @@ def tts(text, model, voice, api_key):
|
|
12 |
client = OpenAI(api_key=api_key)
|
13 |
|
14 |
response = client.audio.speech.create(
|
15 |
-
model=
|
16 |
-
voice=
|
17 |
-
input=
|
18 |
)
|
19 |
|
20 |
except Exception as error:
|
|
|
12 |
client = OpenAI(api_key=api_key)
|
13 |
|
14 |
response = client.audio.speech.create(
|
15 |
+
model=model, # "tts-1","tts-1-hd"
|
16 |
+
voice=voice, # 'alloy', 'echo', 'fable', 'onyx', 'nova', 'shimmer'
|
17 |
+
input=text,
|
18 |
)
|
19 |
|
20 |
except Exception as error:
|