Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,10 @@ import subprocess
|
|
3 |
|
4 |
def synthesize_text(text):
|
5 |
# Replace 'piper_cli_script.py' with the path to your Piper CLI script
|
6 |
-
command = ['python', '
|
7 |
result = subprocess.run(command, capture_output=True, text=True)
|
8 |
# Handle result and output file path
|
9 |
-
return 'path_to_output_audio.wav'
|
10 |
|
11 |
iface = gr.Interface(
|
12 |
fn=synthesize_text,
|
|
|
3 |
|
4 |
def synthesize_text(text):
|
5 |
# Replace 'piper_cli_script.py' with the path to your Piper CLI script
|
6 |
+
command = ['python', '/piper/__main__.py', '--model', 'https://huggingface.co/rhasspy/piper-voices/blob/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx', '--text', text]
|
7 |
result = subprocess.run(command, capture_output=True, text=True)
|
8 |
# Handle result and output file path
|
9 |
+
return '/path_to_output_audio.wav'
|
10 |
|
11 |
iface = gr.Interface(
|
12 |
fn=synthesize_text,
|