Spaces:
Running
on
Zero
Running
on
Zero
alibabasglab
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -51,10 +51,11 @@ def find_mp4_files(directory):
|
|
51 |
return mp4_files
|
52 |
|
53 |
@spaces.GPU
|
54 |
-
def fn_clearvoice_tse(
|
55 |
myClearVoice = ClearVoice(task='target_speaker_extraction', model_names=['AV_MossFormer2_TSE_16K'])
|
56 |
#output_wav_dict =
|
57 |
-
|
|
|
58 |
|
59 |
output_list = find_mp4_files('./path_to_output_videos_tse/')
|
60 |
print(output_list)
|
@@ -112,7 +113,7 @@ ss_demo = gr.Interface(
|
|
112 |
tse_demo = gr.Interface(
|
113 |
fn=fn_clearvoice_ss,
|
114 |
inputs = [
|
115 |
-
gr.Video(label="Input
|
116 |
],
|
117 |
outputs = [
|
118 |
gr.Audio(label="Output Audio", type="filepath"),
|
|
|
51 |
return mp4_files
|
52 |
|
53 |
@spaces.GPU
|
54 |
+
def fn_clearvoice_tse(input_video):
|
55 |
myClearVoice = ClearVoice(task='target_speaker_extraction', model_names=['AV_MossFormer2_TSE_16K'])
|
56 |
#output_wav_dict =
|
57 |
+
print(f'input_video: {input_video}')
|
58 |
+
myClearVoice(input_path=input_video, online_write=True, output_path='path_to_output_videos_tse')
|
59 |
|
60 |
output_list = find_mp4_files('./path_to_output_videos_tse/')
|
61 |
print(output_list)
|
|
|
113 |
tse_demo = gr.Interface(
|
114 |
fn=fn_clearvoice_ss,
|
115 |
inputs = [
|
116 |
+
gr.Video(label="Input Video"),
|
117 |
],
|
118 |
outputs = [
|
119 |
gr.Audio(label="Output Audio", type="filepath"),
|