You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's me again, sorry. I am trying to load my audio files, and segment them using annotations in Raven format (one for each audio file). I made a custom parser for this to return a SegmentAnnotation class object as you instructed in the tutorial. Then, when I have the filepaths for each .wav and the associated .txt file, I tried using the segment_files function to segment the audio files. It raises a ParseError when trying to read the metadata of the .wav file (see below).
File [~/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py:467](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/mnt/c/Users/Lenovo/Documents/GitHub/willowtit-project/bioacoustic/~/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py:467), in segment_files(datapaths, wav_outdir, json_outdir, resample, parser_func, pbar, **kwargs)
[461](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py?line=460) for wav_dir, metadata_dir in with_pbar(
[462](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py?line=461) datapaths,
[463](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py?line=462) desc="Finding and saving audio segments and their metadata",
[464](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pykanto/signal/segment.py?line=463) disable=False if pbar else True,
...
--> [192](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pendulum/parsing/iso8601.py?line=191) return datetime.date(year, month, day)
[194](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pendulum/parsing/iso8601.py?line=193) if ambiguous_date:
[195](file:///home/rifsyy/anaconda3/envs/pykanto_env_2/lib/python3.9/site-packages/pendulum/parsing/iso8601.py?line=194) raise ParserError(f"Invalid date string: {text}")
ValueError: year 0 is out of range
I am working with XC audio recordings, and when I checked the metadata of a first wav file using ReadWav(wav_filepaths[0]).all_metadata, it looks like this:
How can I fix this? Should I edit the metadata according to how your script parse it? I would be really grateful for your suggestion when you have time!
Best,
Rifa
The text was updated successfully, but these errors were encountered:
Hi Nilo,
It's me again, sorry. I am trying to load my audio files, and segment them using annotations in Raven format (one for each audio file). I made a custom parser for this to return a
SegmentAnnotation
class object as you instructed in the tutorial. Then, when I have the filepaths for each.wav
and the associated.txt
file, I tried using thesegment_files
function to segment the audio files. It raises aParseError
when trying to read the metadata of the.wav
file (see below).My scripts are the following:
I am working with XC audio recordings, and when I checked the metadata of a first wav file using
ReadWav(wav_filepaths[0]).all_metadata
, it looks like this:How can I fix this? Should I edit the metadata according to how your script parse it? I would be really grateful for your suggestion when you have time!
Best,
Rifa
The text was updated successfully, but these errors were encountered: