Spaces:
Build error
Build error
Update app.py
Browse files
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("
|
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 |
-
|
102 |
-
object = VoiceClone("
|
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 = "
|
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 |
|