Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| tts= pipeline("text-to-speech", model="facebook/wav2vec2-base-100h") | |
| # Definissons la fonction pour la synthèse vocale | |
| def text_to_speech(text_input): | |
| audio_output = tts_model(text_input) | |
| return audio_output[0]["audio"] | |
| # Interface Gradio | |
| app = gr.Interface(fn=text_to_speech, inputs="text", outputs="audio", title="Text-to-Speech", description="Convert your text into speech . Please , enter your text in english", | |
| ) | |
| app.launch() | |