TTS-wolof / app.py
vonewman's picture
Update app.py
8642524 verified
raw
history blame contribute delete
776 Bytes
import gradio as gr
from adia_tts import AdiaTTS
# Initialisation du modèle TTS
tts = AdiaTTS()
def generate_speech(text):
# Génère le speech et récupère le chemin du fichier audio
output_path, _ = tts.synthesize(
text=text,
description="A clear and educational voice, with a flow adapted to learning"
)
return output_path # Retourne le chemin du fichier audio
# Création de l'interface Gradio avec type "filepath" pour l'audio
demo = gr.Interface(
fn=generate_speech,
inputs=gr.Textbox(lines=3, placeholder="Entrez votre texte ici..."),
outputs=gr.Audio(type="filepath"),
title="Démo TTS en Wolof",
description="Démo de synthèse vocale TTS en Wolof avec le package AdiaTTS et Gradio"
)
demo.launch(share=True)