【发布时间】:2014-10-03 20:15:02
【问题描述】:
我想使用aubiopitch 连续输出来自输入源的信号频率。由于aubiopitch 喜欢输入文件而不是流,所以我尝试使用process substitution:
$ aubiopitch -i <(sox -q -d -t wav -)
我希望这能输出从我的默认音频输入设备读取的信号频率。相反,我得到了这个:
./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
问题似乎不在于sox,因为这个命令可以正常工作:
cat <(sox -q -d -t wav -) > output.wav
它会创建一个output.wav 文件,除了aubiopitch 之外,播放似乎没什么问题:
$ aubiopitch output.wav
Segmentation fault: 11
这里发生了什么?是否是 RIFF 标头的长度设置错误?
如果重要的话,我正在运行 OSX 10.7.5,并且我重新编译了 aubio 以使用我的旧 OSX 版本。
【问题讨论】:
标签: audio sox audio-analysis aubio