Play Call Button Functions on Some Detection Files but Not Others #218
Description
Describe the bug
An interesting issue I've come across since starting to use DS. I am able to load audio and detect calls just fine across all my recordings (250 kHz, 16-bit, FLAC) but for some, I only get the Windows error tone when trying to play a detected call. I am able to load detection files from recordings I've previously analyzed and play the calls there just fine, but sometimes I generate a detection file and cannot play any of the calls, valid or not, throughout the whole recording. I have no idea why this problem is not consistent.
Below is the error message that shows up in MATLAB when this occurs:
Unable to perform assignment because the left and right sides have a different number of elements.
Error in DeepSqueak>PlayCall_Callback (line 258)
audio(1:1000) = audio(1:1000) .* w(1:1000);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in DeepSqueak (line 29)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DeepSqueak('PlayCall_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
To Reproduce
Steps to reproduce the behavior:
With the attached audio/detection files:
- Open DeepSqueak
- Select audio folder to one containing files of interest.
- Press detect calls using either Rat Detector YOLO R1 or the long version.
- Load calls
- Navigate to find a valid call.
- Press Play Call
Below you can see 2 of my detection files - the first ("hargreaves") works (can play calls) and the second ("cereal") does not:
https://drive.google.com/file/d/1r3LXGFGisG0JHcYJvfzdVNTiaS0wW7aK/view?usp=drive_link
https://drive.google.com/file/d/1WWoUYRNuJHq-UhKGe-urTrA8yiKHQBpk/view?usp=drive_link
Expected behavior
After loading the detection file and locating a valid call, I was expecting to be able to press "Play Call" and be able to hear a pitch-adjusted playback of the selected time point (box).
Additional context
OS: Win 11
MATLAB R2023b
Thanks and all the best