fhieni commited on
Commit
cd69483
1 Parent(s): 821e0b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -50,7 +50,7 @@ def get_speaker_embedding(path):
50
 
51
  class VoiceClone:
52
  def __init__(self, checkpoint_path):
53
- hps = utils.get_hparams_from_file("./vits/configs/vivos.json")
54
  self.net_g = SynthesizerTrn(
55
  len(symbols),
56
  hps.data.filter_length // 2 + 1,
@@ -98,8 +98,8 @@ class VoiceClone:
98
  return ref_audio.replace(".wav", "_clone.wav"), text_norm
99
 
100
 
101
- # object = VoiceClone("vits/logs/vivos/G_7700000.pth")
102
- object = VoiceClone("vits/logs/vivos/G_150000.pth")
103
 
104
 
105
  def clonevoice(text: str, speaker_wav, file_upload, language: str):
@@ -109,7 +109,7 @@ def clonevoice(text: str, speaker_wav, file_upload, language: str):
109
  elif file_upload is not None:
110
  speaker_source = file_upload
111
  else:
112
- speaker_source = "vits/audio/sontung.wav"
113
 
114
  print(speaker_source)
115
 
 
50
 
51
  class VoiceClone:
52
  def __init__(self, checkpoint_path):
53
+ hps = utils.get_hparams_from_file("vivos.json")
54
  self.net_g = SynthesizerTrn(
55
  len(symbols),
56
  hps.data.filter_length // 2 + 1,
 
98
  return ref_audio.replace(".wav", "_clone.wav"), text_norm
99
 
100
 
101
+
102
+ object = VoiceClone("G_150000.pth")
103
 
104
 
105
  def clonevoice(text: str, speaker_wav, file_upload, language: str):
 
109
  elif file_upload is not None:
110
  speaker_source = file_upload
111
  else:
112
+ speaker_source = "vsontung.wav"
113
 
114
  print(speaker_source)
115