Spaces:
Sleeping
Sleeping
File size: 538 Bytes
bc8f6d5 18fc4b1 bc8f6d5 18fc4b1 bc8f6d5 18fc4b1 bc8f6d5 b5e5ae5 18fc4b1 b5e5ae5 bc8f6d5 18fc4b1 bc8f6d5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import gradio as gr
from gradio_client import Client
def create_session():
client = Client("wasmdashai/wasm-spad",download_files=False)
return client
def streamwav(text,client):
if client is None:
client=create_session()
result = client.submit(
text=text,
api_name="/text_to_speech",
)
for chk in result:
#print(chk)
return chk['url'],client
demo = gr.Interface(fn=streamwav, inputs=["text","state"], outputs=["text","state"])
demo.launch()
|