GTimothee commited on
Commit
1f19da1
·
verified ·
1 Parent(s): 3ed67b8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from tool import KokoroText2Speech
3
+
4
+ st.title('Let your smolagents' agent generate audio from text')
5
+ text = '''The sky above the port was the color of television, tuned to a dead channel.'''
6
+ input_text = st.text_input('text to process', value=text)
7
+ if st.button('Generate'):
8
+ with st.spinner():
9
+
10
+ tool = KokoroText2Speech()
11
+ output = tool(input_text)
12
+ st.audio(output.numpy(), sample_rate=24000)