Spaces:
Runtime error
Runtime error
Godvshumans
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
# Load the TTS model
|
5 |
+
model = pipeline("text-to-speech", model="galsenai/parler-tts-mini-v1-wolof")
|
6 |
+
|
7 |
+
def text_to_speech(text):
|
8 |
+
audio = model(text)
|
9 |
+
return audio
|
10 |
+
|
11 |
+
# Create the Gradio interface
|
12 |
+
interface = gr.Interface(fn=text_to_speech, inputs="text", outputs="audio")
|
13 |
+
|
14 |
+
interface.launch()
|