Spaces:
Runtime error
Runtime error
File size: 377 Bytes
41ceddd 33d62f7 bdab1da 41ceddd bdab1da 41ceddd bdab1da |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
import numpy as np
from audioldm import text_to_audio
def greet(text):
waveform = text_to_audio(text, n_gen=1) # [bs, 1, samples]
waveform = [(16000, wave[0]) for wave in waveform]
return waveform
iface = gr.Interface(fn=greet, inputs="text", outputs=["audio", "audio"])
iface.launch()
# if __name__ == "__main__":
# greet("hello world")
|