Spaces:
Running
Running
debug
Browse files
app.py
CHANGED
|
@@ -10,16 +10,11 @@ from omegaconf import OmegaConf
|
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
-
#####################################
|
| 14 |
-
# 这是你的推理 pipeline
|
| 15 |
-
#####################################
|
| 16 |
cfg = OmegaConf.load("config/config.yaml")
|
| 17 |
inter = InferencePipeline(cfg)
|
| 18 |
datamix = AudioMixer()
|
| 19 |
|
| 20 |
-
|
| 21 |
-
# 这是供 Gradio 点击时调用的函数
|
| 22 |
-
#####################################
|
| 23 |
def gradio_TSE(input_audio_path, enroll_audio_path, audio_type):
|
| 24 |
|
| 25 |
print(f"User uploaded audio path: {input_audio_path}")
|
|
@@ -41,7 +36,7 @@ def gradio_TSE(input_audio_path, enroll_audio_path, audio_type):
|
|
| 41 |
eol_wav = "eol.wav"
|
| 42 |
sf.write(eol_wav, enroll_wav, 16000)
|
| 43 |
|
| 44 |
-
est_path = inter.
|
| 45 |
|
| 46 |
return mix_path,est_path
|
| 47 |
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
cfg = OmegaConf.load("config/config.yaml")
|
| 14 |
inter = InferencePipeline(cfg)
|
| 15 |
datamix = AudioMixer()
|
| 16 |
|
| 17 |
+
|
|
|
|
|
|
|
| 18 |
def gradio_TSE(input_audio_path, enroll_audio_path, audio_type):
|
| 19 |
|
| 20 |
print(f"User uploaded audio path: {input_audio_path}")
|
|
|
|
| 36 |
eol_wav = "eol.wav"
|
| 37 |
sf.write(eol_wav, enroll_wav, 16000)
|
| 38 |
|
| 39 |
+
est_path = inter.run_inference(mix_wav, eol_wav)
|
| 40 |
|
| 41 |
return mix_path,est_path
|
| 42 |
|