Spaces:
Running
Running
File size: 486 Bytes
f845b05 f8bf4b8 f845b05 418b839 4eb15f6 418b839 4eb15f6 f8bf4b8 f845b05 418b839 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
import subprocess
def synthesize_text(text):
# Replace 'piper_cli_script.py' with the path to your Piper CLI script
command = ['python', 'piper_cli_script.py', '--model', 'model_path.onnx', '--text', text]
result = subprocess.run(command, capture_output=True, text=True)
# Handle result and output file path
return 'path_to_output_audio.wav'
iface = gr.Interface(
fn=synthesize_text,
inputs="text",
outputs="audio"
)
iface.launch() |