Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ from TTS.config import load_config
|
|
39 |
from TTS.tts.models.vits import *
|
40 |
|
41 |
import whisper
|
42 |
-
model = whisper.load_model("
|
43 |
import os
|
44 |
os.system('pip install voicefixer --upgrade')
|
45 |
from voicefixer import VoiceFixer
|
@@ -175,7 +175,7 @@ def greet(apikey,Voicetoclone,VoiceMicrophone, audio, choice1):
|
|
175 |
|
176 |
messages.append({"role": "assistant", "content": chat_response})
|
177 |
|
178 |
-
text= chat_response
|
179 |
if Voicetoclone is not None:
|
180 |
reference_files= "%s" % (Voicetoclone)
|
181 |
print("path url")
|
@@ -226,7 +226,7 @@ def greet(apikey,Voicetoclone,VoiceMicrophone, audio, choice1):
|
|
226 |
print(" > Saving output to {}".format(out_path))
|
227 |
ap.save_wav(wav, out_path)
|
228 |
|
229 |
-
voicefixer.restore(input=
|
230 |
output="audio1.wav", # output wav file path
|
231 |
cuda=True, # whether to use gpu acceleration
|
232 |
mode = 0) # You can try out mode 0, 1 to find out the best result
|
|
|
39 |
from TTS.tts.models.vits import *
|
40 |
|
41 |
import whisper
|
42 |
+
model = whisper.load_model("base")
|
43 |
import os
|
44 |
os.system('pip install voicefixer --upgrade')
|
45 |
from voicefixer import VoiceFixer
|
|
|
175 |
|
176 |
messages.append({"role": "assistant", "content": chat_response})
|
177 |
|
178 |
+
text= "%s" % (chat_response)
|
179 |
if Voicetoclone is not None:
|
180 |
reference_files= "%s" % (Voicetoclone)
|
181 |
print("path url")
|
|
|
226 |
print(" > Saving output to {}".format(out_path))
|
227 |
ap.save_wav(wav, out_path)
|
228 |
|
229 |
+
voicefixer.restore(input="Audio.wav", # input wav file path
|
230 |
output="audio1.wav", # output wav file path
|
231 |
cuda=True, # whether to use gpu acceleration
|
232 |
mode = 0) # You can try out mode 0, 1 to find out the best result
|