Spaces:
Runtime error
Runtime error
jonathanagustin
commited on
Commit
•
9449dfc
1
Parent(s):
fd9f747
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import tempfile
|
3 |
import openai
|
4 |
-
import os
|
5 |
from functools import partial
|
6 |
|
7 |
def tts(
|
@@ -74,9 +73,6 @@ def main():
|
|
74 |
MODEL_OPTIONS = ["tts-1", "tts-1-hd"]
|
75 |
VOICE_OPTIONS = ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]
|
76 |
RESPONSE_FORMAT_OPTIONS = ["mp3", "opus", "aac", "flac", "wav", "pcm"]
|
77 |
-
|
78 |
-
# Since you've already downloaded the voice previews to the current directory,
|
79 |
-
# set up the VOICE_PREVIEW_FILES dictionary to point to these files directly.
|
80 |
VOICE_PREVIEW_FILES = {voice: f"{voice}.wav" for voice in VOICE_OPTIONS}
|
81 |
|
82 |
with gr.Blocks(title="OpenAI - Text to Speech") as demo:
|
|
|
1 |
import gradio as gr
|
2 |
import tempfile
|
3 |
import openai
|
|
|
4 |
from functools import partial
|
5 |
|
6 |
def tts(
|
|
|
73 |
MODEL_OPTIONS = ["tts-1", "tts-1-hd"]
|
74 |
VOICE_OPTIONS = ["alloy", "echo", "fable", "onyx", "nova", "shimmer"]
|
75 |
RESPONSE_FORMAT_OPTIONS = ["mp3", "opus", "aac", "flac", "wav", "pcm"]
|
|
|
|
|
|
|
76 |
VOICE_PREVIEW_FILES = {voice: f"{voice}.wav" for voice in VOICE_OPTIONS}
|
77 |
|
78 |
with gr.Blocks(title="OpenAI - Text to Speech") as demo:
|