Update vc.py
Browse files
vc.py
CHANGED
@@ -15,7 +15,8 @@ def custom_bark(inp, in_aud=None, trim_aud=None, in_aud_mic=None):
|
|
15 |
if in_aud_mic != None:
|
16 |
speaker_wav=in_aud_mic
|
17 |
if in_aud !=None and trim_aud==None:
|
18 |
-
speaker_wav=
|
|
|
19 |
if trim_aud != None:
|
20 |
speaker_wav=Path(f"{uid}-trim.wav")
|
21 |
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False).to(device)
|
@@ -78,9 +79,9 @@ with gr.Blocks() as app:
|
|
78 |
|
79 |
|
80 |
|
81 |
-
in_aud_file.change(pre_aud,in_aud_file,aud_file)
|
82 |
load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file,aud_file])
|
83 |
trim_clip_btn.click(trim_clip,[aud_file, start_time, end_time],trim_aud)
|
84 |
-
alt_go_btn.click(custom_bark, [in_text,in_aud_file], out_audio)
|
85 |
|
86 |
app.launch()
|
|
|
15 |
if in_aud_mic != None:
|
16 |
speaker_wav=in_aud_mic
|
17 |
if in_aud !=None and trim_aud==None:
|
18 |
+
speaker_wav=in_aud
|
19 |
+
#speaker_wav=Path(f"{uid}-tmp_aud.mp4")
|
20 |
if trim_aud != None:
|
21 |
speaker_wav=Path(f"{uid}-trim.wav")
|
22 |
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False).to(device)
|
|
|
79 |
|
80 |
|
81 |
|
82 |
+
#in_aud_file.change(pre_aud,in_aud_file,aud_file)
|
83 |
load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file,aud_file])
|
84 |
trim_clip_btn.click(trim_clip,[aud_file, start_time, end_time],trim_aud)
|
85 |
+
alt_go_btn.click(custom_bark, [in_text,in_aud_file,trim_aud], out_audio)
|
86 |
|
87 |
app.launch()
|