GTimothee's picture
Update app.py
0ba8b15 verified
raw
history blame contribute delete
501 Bytes
import streamlit as st
from tool import KokoroText2Speech
st.title("Let your smolagents' agent generate audio from text")
st.text('Built from https://github.com/hexgrad/kokoro')
text = '''The sky above the port was the color of television, tuned to a dead channel.'''
input_text = st.text_input('text to process', value=text)
if st.button('Generate'):
with st.spinner():
tool = KokoroText2Speech()
output = tool(input_text)
st.audio(output.numpy(), sample_rate=24000)