Spaces:
Running
Running
fix eol2 bug
Browse files
decode.py
CHANGED
|
@@ -43,7 +43,7 @@ class InferencePipeline:
|
|
| 43 |
|
| 44 |
self.computer_ = NnetComputer(config.test.checkpoint,config.test.gpu, model_inst)
|
| 45 |
|
| 46 |
-
def run_inference(self, input_audio_path: str, enroll_audio_path: str
|
| 47 |
|
| 48 |
mix_samps, sr = sf.read(input_audio_path)
|
| 49 |
aux_samps, sr2 = sf.read(enroll_audio_path)
|
|
@@ -53,7 +53,7 @@ class InferencePipeline:
|
|
| 53 |
samps = samps[:mix_samps.size]
|
| 54 |
samps = samps * norm / np.max(np.abs(samps))
|
| 55 |
|
| 56 |
-
out_wav =
|
| 57 |
sf.write(out_wav, samps, sr)
|
| 58 |
return out_wav
|
| 59 |
|
|
|
|
| 43 |
|
| 44 |
self.computer_ = NnetComputer(config.test.checkpoint,config.test.gpu, model_inst)
|
| 45 |
|
| 46 |
+
def run_inference(self, input_audio_path: str, enroll_audio_path: str) -> str:
|
| 47 |
|
| 48 |
mix_samps, sr = sf.read(input_audio_path)
|
| 49 |
aux_samps, sr2 = sf.read(enroll_audio_path)
|
|
|
|
| 53 |
samps = samps[:mix_samps.size]
|
| 54 |
samps = samps * norm / np.max(np.abs(samps))
|
| 55 |
|
| 56 |
+
out_wav = "temp_extracted.wav"
|
| 57 |
sf.write(out_wav, samps, sr)
|
| 58 |
return out_wav
|
| 59 |
|