Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ def synthesize_speech(text):
|
|
15 |
if nsfw_result[0]['label'] == 'NSFW':
|
16 |
return "NSFW content detected. Cannot process.", None
|
17 |
|
18 |
-
model_path = hf_hub_download(repo_id="
|
19 |
-
config_path = hf_hub_download(repo_id="
|
20 |
voice = PiperVoice.load(model_path, config_path)
|
21 |
|
22 |
# Create an in-memory buffer for the WAV file
|
|
|
15 |
if nsfw_result[0]['label'] == 'NSFW':
|
16 |
return "NSFW content detected. Cannot process.", None
|
17 |
|
18 |
+
model_path = hf_hub_download(repo_id="gyroing/Persian-Piper-Model-gyro", filename="fa_IR-gyro-meduim.onnx")
|
19 |
+
config_path = hf_hub_download(repo_id="gyroing/Persian-Piper-Model-gyro/", filename="fa_IR-gyro-meduim.onnx.json")
|
20 |
voice = PiperVoice.load(model_path, config_path)
|
21 |
|
22 |
# Create an in-memory buffer for the WAV file
|