--
You received this message because you are subscribed to the Google Groups "birdvox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to birdvox+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/birdvox/2db71250-426c-43bc-ad08-7920457bc18bn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/birdvox/CAKS_OiR3RLYS8GNtOfmdohH5Jn4BpU21qMMJgkWTGeMpnj87WQ%40mail.gmail.com.
Hello Davyd, Josh, Justin, and all,
Thank you for the feature request. I have opened a ticket on the GitHub issue tracker: https://github.com/BirdVox/birdvoxdetect/issues/75
Davyd is correct that using an off-the-shelf converter like pysox should get you going, as long as you're OK with loading the entire MP3 file first.
For context, we've designed BirdVoxDetect in such a way that it can process audio files of arbitrary length, even if they don't fit into RAM. This is important for full night recordings: they are ~1GB in size and their spectrograms are even heavier, which tends to overflow the memory. Thus, internally, we process audio files by "chunks" of 450 seconds. (i.e. 8 chunks per hour)
I think that a realistic path to address this would be to replace calls to pysoundfile by calls to librosa.load with a movable offset parameter and a fixed duration of 450 seconds.
Documentation: https://librosa.org/doc/latest/generated/librosa.load.html
Source code: https://librosa.org/doc/latest/_modules/librosa/core/audio.html#load
For WAV and FLAC files, should be backwards compatible, both in terms of usage and package dependencies. (we already require librosa for computing spectrograms)
As a bonus, it will become possible to process MP3 files directly
in BirdVoxDetect by installing ffmpeg or gstreamer to the conda
environment. See this paragraph on the README section of librosa:
https://github.com/librosa/librosa#audioread-and-mp3-support
How does this sound? If you agree with the plan i can experiment
with librosa.load and prepare a pull request for the next version
of BirdVoxDetect.
Sincerely,
Vincent.
To view this discussion on the web visit https://groups.google.com/d/msgid/birdvox/CAFOenNG1NjVWLjB5_%2B1xJWin0O7f7t8tpeA%3D_Vk%2B0qqVOwF6%3DA%40mail.gmail.com.