Spaces:
Runtime error
Runtime error
Update audio_foundation_models.py
Browse files
audio_foundation_models.py
CHANGED
@@ -978,7 +978,9 @@ class Speech_Enh_SC:
|
|
978 |
"representing the audio_path. ")
|
979 |
def inference(self, speech_path, ref_channel=0):
|
980 |
speech, sr = soundfile.read(speech_path)
|
|
|
981 |
speech = speech[:, ref_channel]
|
|
|
982 |
enh_speech = self.separate_speech(speech[None, ...], fs=sr)
|
983 |
audio_filename = os.path.join('audio', str(uuid.uuid4())[0:8] + ".wav")
|
984 |
soundfile.write(audio_filename, enh_speech[0].squeeze(), samplerate=sr)
|
|
|
978 |
"representing the audio_path. ")
|
979 |
def inference(self, speech_path, ref_channel=0):
|
980 |
speech, sr = soundfile.read(speech_path)
|
981 |
+
print(speech)
|
982 |
speech = speech[:, ref_channel]
|
983 |
+
print(speech)
|
984 |
enh_speech = self.separate_speech(speech[None, ...], fs=sr)
|
985 |
audio_filename = os.path.join('audio', str(uuid.uuid4())[0:8] + ".wav")
|
986 |
soundfile.write(audio_filename, enh_speech[0].squeeze(), samplerate=sr)
|