alibabasglab commited on
Commit
e7b2657
·
verified ·
1 Parent(s): 90fa92b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -23,23 +23,6 @@ def fn_clearvoice_sr(input_wav, apply_se):
23
  sf.write('enhanced_high_res.wav', output_wav[0,:], fs)
24
  return 'enhanced_high_res.wav'
25
 
26
- @spaces.GPU
27
- def fn_clearvoice_se(input_wav, sr):
28
- if sr == "16000 Hz":
29
- myClearVoice = ClearVoice(task='speech_enhancement', model_names=['FRCRN_SE_16K'])
30
- fs = 16000
31
- else:
32
- myClearVoice = ClearVoice(task='speech_enhancement', model_names=['MossFormer2_SE_48K'])
33
- fs = 48000
34
- output_wav_dict = myClearVoice(input_path=input_wav, online_write=False)
35
- if isinstance(output_wav_dict, dict):
36
- key = next(iter(output_wav_dict))
37
- output_wav = output_wav_dict[key]
38
- else:
39
- output_wav = output_wav_dict
40
- sf.write('enhanced.wav', output_wav, fs)
41
- return 'enhanced.wav'
42
-
43
  demo = gr.Blocks()
44
 
45
  sr_demo = gr.Interface(
 
23
  sf.write('enhanced_high_res.wav', output_wav[0,:], fs)
24
  return 'enhanced_high_res.wav'
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  demo = gr.Blocks()
27
 
28
  sr_demo = gr.Interface(