Error calling model on audio files #905
Replies: 2 comments 5 replies
-
Please do share the full traceback. It's likely that the underlying error will be noted somewhere in the traceback. The IndexError simply says that none of the files in the dataframe or list of files you passed to predict() were correctly preprocessed - this could be for a variety of reasons, the most common being that the paths don't actually exist as audio files on the same machine. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the input! I realized that I needed to import Path from pathlib, I think that might have been causing the issues with recognizing the files. I also verified that the file TWR_Open_PM_50m.wav is present and the path is correct. I'm still getting a preprocessing error, however: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I’m having some troubles running a CNN trained to recognize BBCU that I’ve been working with Tessa on. When I run the script that calls model.predict() on the audio files, I get this error:
IndexError: None of the samples in the SafeDataset loaded. All samples caused exceptions during preprocessing. The mostrecent exception is in the error trace.
I also received this warning:
UserWarning: This model was saved with an earlier version of opensoundscape (0.9.1) and will not work properly in the current opensoundscape version (0.10.1). To use models across package versions use .save_torch_dict and .load_torch_dict
It looks like the error was raised when calling load_model(). I’d like some input as to where this error comes from - is it something within the model itself or way I’m calling it on my data? I’m happy to share the traceback and code as well.
Thank you for the input!
Beta Was this translation helpful? Give feedback.
All reactions