DLI-SLQ commited on
Commit
ef6d811
·
1 Parent(s): ba6183f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,14 +14,14 @@ def synthesize_speech(text):
14
  nsfw_result = nsfw_detector(text)
15
  if nsfw_result[0]['label'] == 'NSFW':
16
  # Path to your default error audio file
17
- error_audio_path = hf_hub_download(repo_id="aigmixer/speaker_00", filename= "error_audio.wav")
18
  with open(error_audio_path, 'rb') as error_audio_file:
19
  error_audio = error_audio_file.read()
20
  return error_audio, "NSFW content detected. Cannot process."
21
 
22
 
23
- model_path = hf_hub_download(repo_id="aigmixer/speaker_00", filename="speaker_00_model.onnx")
24
- config_path = hf_hub_download(repo_id="aigmixer/speaker_00", filename="speaker_00_model.onnx.json")
25
 
26
 
27
  voice = PiperVoice.load(model_path, config_path)
 
14
  nsfw_result = nsfw_detector(text)
15
  if nsfw_result[0]['label'] == 'NSFW':
16
  # Path to your default error audio file
17
+ error_audio_path = hf_hub_download(repo_id="DLI-SLQ/speaker_01234", filename= "error_audio.wav")
18
  with open(error_audio_path, 'rb') as error_audio_file:
19
  error_audio = error_audio_file.read()
20
  return error_audio, "NSFW content detected. Cannot process."
21
 
22
 
23
+ model_path = hf_hub_download(repo_id="DLI-SLQ/speaker_01234", filename="speaker__01234_model.onnx")
24
+ config_path = hf_hub_download(repo_id="DLI-SLQ/speaker_01234", filename="speaker__-1234_model.onnx.json")
25
 
26
 
27
  voice = PiperVoice.load(model_path, config_path)