Spaces:
Runtime error
Runtime error
File size: 501 Bytes
1f19da1 940d08d 0ba8b15 1f19da1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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) |