TekamBrice commited on
Commit
1664691
·
verified ·
1 Parent(s): 2e16c4c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import transformers
2
+ from transformers import pipeline
3
+ te_speech=pipeline(model="suno/bark")
4
+ import gradio as gr
5
+ def text_to_speech(message):
6
+ texte = te_speech(message)
7
+
8
+ return texte['audio']
9
+
10
+ demo_textspeech = gr.Interface(text_to_speech, inputs = 'text',
11
+ outputs = gr.Audio(label="Speech Output"),
12
+ title = 'text to Audio Application',
13
+ description = 'A simple application to convert text in audio speech.',
14
+ )
15
+
16
+ demo_textspeech.launch()