I'd like to use aubiopitch
to continuously output the frequency of a signal coming from an input source. Since aubiopitch
likes to have its input be a file, not a stream, I tried using process substitution:
$ aubiopitch -i <(sox -q -d -t wav -)
I'd expect this to output the frequency of the signal being read off of my default audio input device. Instead, I got this:
./sox WARN wav: Length in output .wav header will be wrong since can't seek to fix it
AUBIO ERROR: source_apple_audio: Failed opening /dev/fd/63, error in ExtAudioFileOpenURL (-40)
AUBIO ERROR: source_wavread: could not find RIFF header in /dev/fd/63
AUBIO ERROR: source: failed creating aubio source with /dev/fd/63 at samplerate 0 with hop_size 256
Error: could not open input file /dev/fd/63
The problem doesn't seem to lie with sox
, since this command works fine:
cat <(sox -q -d -t wav -) > output.wav
It creates an output.wav
file that nothing seems to have trouble playing, except aubiopitch
of course:
$ aubiopitch output.wav
Segmentation fault: 11
What's going on here? Is the issue with the RIFF header having the wrong length set?
If it matters, I'm running OSX 10.7.5 and I recompiled aubio to work with my older OSX version.