Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index, file_big_npy):
|
|
39 |
asyncio.run(edge_tts.Communicate(tts_text, "-".join(tts_voice.split('-')[:-1])).save("tts.mp3"))
|
40 |
audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
|
41 |
else:
|
42 |
-
if args.
|
43 |
audio, sr = librosa.load(input_audio, sr=16000, mono=True)
|
44 |
else:
|
45 |
if input_audio is None:
|
@@ -102,8 +102,8 @@ if __name__ == '__main__':
|
|
102 |
parser = argparse.ArgumentParser()
|
103 |
parser.add_argument('--api', action="store_true", default=False)
|
104 |
parser.add_argument("--share", action="store_true", default=False, help="share gradio app")
|
105 |
-
parser.add_argument("--
|
106 |
-
args = parser.
|
107 |
load_hubert()
|
108 |
models = []
|
109 |
tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
|
@@ -158,7 +158,7 @@ if __name__ == '__main__':
|
|
158 |
)
|
159 |
with gr.Row():
|
160 |
with gr.Column():
|
161 |
-
if args.
|
162 |
vc_input = gr.Textbox(label="Input audio path")
|
163 |
else:
|
164 |
vc_input = gr.Audio(label="Input audio"+' (less than 20 seconds)' if limitation else '')
|
|
|
39 |
asyncio.run(edge_tts.Communicate(tts_text, "-".join(tts_voice.split('-')[:-1])).save("tts.mp3"))
|
40 |
audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
|
41 |
else:
|
42 |
+
if args.files:
|
43 |
audio, sr = librosa.load(input_audio, sr=16000, mono=True)
|
44 |
else:
|
45 |
if input_audio is None:
|
|
|
102 |
parser = argparse.ArgumentParser()
|
103 |
parser.add_argument('--api', action="store_true", default=False)
|
104 |
parser.add_argument("--share", action="store_true", default=False, help="share gradio app")
|
105 |
+
parser.add_argument("--files", action="store_true", default=False, help="load audio from path")
|
106 |
+
args, unknown = parser.parse_known_args()
|
107 |
load_hubert()
|
108 |
models = []
|
109 |
tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
|
|
|
158 |
)
|
159 |
with gr.Row():
|
160 |
with gr.Column():
|
161 |
+
if args.files:
|
162 |
vc_input = gr.Textbox(label="Input audio path")
|
163 |
else:
|
164 |
vc_input = gr.Audio(label="Input audio"+' (less than 20 seconds)' if limitation else '')
|