Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,16 +5,16 @@ import spaces
|
|
| 5 |
from clearvoice import ClearVoice
|
| 6 |
import os
|
| 7 |
|
|
|
|
| 8 |
def fn_clearvoice_sr(input_wav, apply_se):
|
| 9 |
|
| 10 |
myClearVoice = ClearVoice(task='speech_super_resolution', model_names=['MossFormer2_SR_48K'])
|
| 11 |
fs = 48000
|
| 12 |
if apply_se:
|
| 13 |
myClearVoice_se = ClearVoice(task='speech_enhancement', model_names=['MossFormer2_SE_48K'])
|
| 14 |
-
@spaces.GPU
|
| 15 |
output_wav_dict = myClearVoice_se(input_path=input_wav, online_write=True, output_path='enhanced.wav')
|
| 16 |
input_wav = 'enhanced.wav'
|
| 17 |
-
|
| 18 |
output_wav_dict = myClearVoice(input_path=input_wav, online_write=False)
|
| 19 |
if isinstance(output_wav_dict, dict):
|
| 20 |
key = next(iter(output_wav_dict))
|
|
|
|
| 5 |
from clearvoice import ClearVoice
|
| 6 |
import os
|
| 7 |
|
| 8 |
+
#@spaces.GPU
|
| 9 |
def fn_clearvoice_sr(input_wav, apply_se):
|
| 10 |
|
| 11 |
myClearVoice = ClearVoice(task='speech_super_resolution', model_names=['MossFormer2_SR_48K'])
|
| 12 |
fs = 48000
|
| 13 |
if apply_se:
|
| 14 |
myClearVoice_se = ClearVoice(task='speech_enhancement', model_names=['MossFormer2_SE_48K'])
|
|
|
|
| 15 |
output_wav_dict = myClearVoice_se(input_path=input_wav, online_write=True, output_path='enhanced.wav')
|
| 16 |
input_wav = 'enhanced.wav'
|
| 17 |
+
|
| 18 |
output_wav_dict = myClearVoice(input_path=input_wav, online_write=False)
|
| 19 |
if isinstance(output_wav_dict, dict):
|
| 20 |
key = next(iter(output_wav_dict))
|