在一个覆盆子圆周率,我试图记录作为一个.flac或.wav文件的gstreamer音频。
我希望音频文件被发送到不正常的google语音api服务器
但是我的gstreamer管道输出作为wav
gst-launch-0.10 -e alsasrc device=hw:1 ! audioconvert ! audioresample ! audio/x-raw-int, depth=16, rate=16000, channels=1 ! wavenc ! filesink location= o.wav或者是亚麻
gst-launch-0.10 -e alsasrc device=hw:1 ! audioconvert ! audioresample ! audio/x-raw-int, depth=16, rate=16000, channels=1 ! flacenc ! filesink location= o.flac总是被拒绝。
错误:(文件格式错误或采样错误)
{"status":5,"id":"11e0fa5e371b2f0a1a87def81f8383bc-1","hypotheses":[]}使用sox进行正常记录,用ffmpeg或flac进行编码是有效的,因此我想gstreamer的输出文件某种程度上损坏了,或者iam丢失了什么。
编辑:使用-v http://hastebin.com/vovefeyewe.vbs运行的管道在alsasrc之后添加了一个队列,但仍然存在相同的问题
解决了
附加参数解决了这个问题。
gst-launch-0.10 -e -v alsasrc device=hw:1 ! audioconvert ! audioresample ! "audio/x-raw-int, rate=(int)16000, channels=(int)1, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, channles=(int)1" ! wavenc ! filesink location=g.wav如果没有声音,或者只有随机噪声,google将拒绝带有错误格式错误的文件。
发布于 2013-10-20 08:39:06
您能在管道中添加-v选项并发送输出吗?
https://stackoverflow.com/questions/19471723
复制相似问题