aigmixer commited on
Commit
4492d6d
1 Parent(s): 46a8dbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -3,12 +3,9 @@ import wave
3
  import numpy as np
4
  from io import BytesIO
5
  from huggingface_hub import hf_hub_download
6
- from piper import PiperVoice # Adjust import as per your project structure
7
 
8
  def synthesize_speech(text):
9
- # Load the PiperVoice model and configuration
10
- # model_path = "en_GB-alan-medium.onnx" # this is for loading local model
11
- # config_path = "en_GB-alan-medium.onnx.json" # for loading local json
12
  model_path = hf_hub_download(repo_id="rhasspy/piper-voices", filename="en/en_GB/alan/medium/en_GB-alan-medium.onnx")
13
  config_path = hf_hub_download(repo_id="rhasspy/piper-voices", filename="en/en_GB/alan/medium/en_GB-alan-medium.onnx.json")
14
  voice = PiperVoice.load(model_path, config_path)
 
3
  import numpy as np
4
  from io import BytesIO
5
  from huggingface_hub import hf_hub_download
6
+ from piper import PiperVoice
7
 
8
  def synthesize_speech(text):
 
 
 
9
  model_path = hf_hub_download(repo_id="rhasspy/piper-voices", filename="en/en_GB/alan/medium/en_GB-alan-medium.onnx")
10
  config_path = hf_hub_download(repo_id="rhasspy/piper-voices", filename="en/en_GB/alan/medium/en_GB-alan-medium.onnx.json")
11
  voice = PiperVoice.load(model_path, config_path)