Search code examples
audiosoxpitch

How to warp/shift a pitch so I can hear a bat


I am looking for a way to "hear" a bat. I have a 192khz sound recording of a bat and want to hear it. So "transform" it into a 0-12kHz recording?

I saw what I thought might be similar: change pitch of multiple audio files with Sox

And tried using something like: log(12/192) * log(2) * 1200 == 4800

sox 331817.flac 331817_warp.wav pitch -4800

You can see the whole spectrogram here:(192Khz)

sox 331817.flac -n rate 192.0k spectrogram -l -m -X 160 -z 95 -Z 0 -r -Y 257 -o spectro.png

enter image description here

You can see my warped spectro here:

sox 331817_warp.wav -n rate 12.0k spectrogram -l -m -X 160 -z 95 -Z 0 -r -Y 257 -o spectro_warp.png

enter image description here

Here's a video which encouraged me its possible: https://www.youtube.com/watch?v=qJOloliWvB8


Solution

  • Try speed -4800c; it lowers both pitch and tempo. This is the least intrusive way of lowering pitch as it does not need to resample the sound. It will make the entire sound fragment a factor 16 longer, so take your time listening to it. Trim it down if possible; I suspect this is also what they did in the video.

    Keep in mind that even a sample rate of 192 kHz may not be enough to accurately capture the full spectrum of a bat's voice. Nyquist frequency is half of the sample rate; any audio above 96 kHz will be distorted. No post-processing is going to fix that.