Spaces:
Running
Running
Update inference.py
Browse files- inference.py +0 -2
inference.py
CHANGED
@@ -26,8 +26,6 @@ class InferencePipeline():
|
|
26 |
# Extract the file path from the tuple
|
27 |
audio_path = audio_data[0] if isinstance(audio_data, tuple) else audio_data
|
28 |
print(f"Loading audio from: {audio_path}")
|
29 |
-
if not isinstance(audio_path, (str, bytes, os.PathLike)):
|
30 |
-
raise TypeError(f"Invalid type for audio_path: {type(audio_path)}. Expected str, bytes, or os.PathLike.")
|
31 |
|
32 |
# load source audio
|
33 |
source, sr = torchaudio.load(audio_path) #"test.wav")
|
|
|
26 |
# Extract the file path from the tuple
|
27 |
audio_path = audio_data[0] if isinstance(audio_data, tuple) else audio_data
|
28 |
print(f"Loading audio from: {audio_path}")
|
|
|
|
|
29 |
|
30 |
# load source audio
|
31 |
source, sr = torchaudio.load(audio_path) #"test.wav")
|