Spaces:
Running
Running
Update pipeline.py
Browse files- pipeline.py +1 -3
pipeline.py
CHANGED
@@ -41,9 +41,7 @@ def inference(model, audio_file, text, output_file, device='cuda'):
|
|
41 |
"condition": conditions,
|
42 |
}
|
43 |
|
44 |
-
sep_segment = model.ss_model(input_dict)
|
45 |
-
|
46 |
-
sep_segment = sep_segment.squeeze(0).squeeze(0).data.cpu().numpy()
|
47 |
|
48 |
write(output_file, 32000, np.round(sep_segment * 32767).astype(np.int16))
|
49 |
print(f'Write separated audio to [{output_file}]')
|
|
|
41 |
"condition": conditions,
|
42 |
}
|
43 |
|
44 |
+
sep_segment = model.ss_model.chunk_inference(input_dict)
|
|
|
|
|
45 |
|
46 |
write(output_file, 32000, np.round(sep_segment * 32767).astype(np.int16))
|
47 |
print(f'Write separated audio to [{output_file}]')
|