Spaces:
Running
on
Zero
Running
on
Zero
alibabasglab
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import soundfile as sf
|
|
3 |
import gradio as gr
|
4 |
from clearvoice import ClearVoice
|
5 |
|
|
|
6 |
def fn_clearvoice_se(input_wav, sr):
|
7 |
if sr == "16000":
|
8 |
myClearVoice = ClearVoice(task='speech_enhancement', model_names=['FRCRN_SE_16K'])
|
@@ -19,6 +20,7 @@ def fn_clearvoice_se(input_wav, sr):
|
|
19 |
sf.write('enhanced.wav', output_wav, fs)
|
20 |
return 'enhanced.wav'
|
21 |
|
|
|
22 |
def fn_clearvoice_ss(input_wav):
|
23 |
myClearVoice = ClearVoice(task='speech_separation', model_names=['MossFormer2_SS_16K'])
|
24 |
output_wav_dict = myClearVoice(input_path=input_wav, online_write=False)
|
|
|
3 |
import gradio as gr
|
4 |
from clearvoice import ClearVoice
|
5 |
|
6 |
+
@spaces.GPU
|
7 |
def fn_clearvoice_se(input_wav, sr):
|
8 |
if sr == "16000":
|
9 |
myClearVoice = ClearVoice(task='speech_enhancement', model_names=['FRCRN_SE_16K'])
|
|
|
20 |
sf.write('enhanced.wav', output_wav, fs)
|
21 |
return 'enhanced.wav'
|
22 |
|
23 |
+
@spaces.GPU
|
24 |
def fn_clearvoice_ss(input_wav):
|
25 |
myClearVoice = ClearVoice(task='speech_separation', model_names=['MossFormer2_SS_16K'])
|
26 |
output_wav_dict = myClearVoice(input_path=input_wav, online_write=False)
|