我已经在我的树莓树上安装了wip,但是当我想使用它时,我得到了这个错误
[wit] initialized sox: 14.4.0
[wit] init state machine
[wit] initialized with device: default
[wit] ready. state=idle
formats: can't open input `default': snd_pcm_open error: No such file or directory
[wit] couldn't open input device using alsa. Trying with coreaudio...
formats: no handler for given file type `coreaudio'
[wit] Failed to open input device
task '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value',
/home/martin/rust/src/libcore/option.rs:357发布于 2015-04-09 21:47:25
编辑~/.asoundrc并添加以下内容:
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:0,0"
}
capture.pcm {
type plug
slave.pcm "hw:1,0"
}
}这个小的ALSA配置设置使用默认声卡作为播放设备(hw:0,0),并将hw:1,0 (假设是您的USB麦克风)设置为默认捕获设备。
(取自“设置默认录制设备”下的http://wiki.audacityteam.org/wiki/USB_mic_on_Linux。)
要确定在slave.pcm之后应写入的内容,请运行以下命令:
aplay -l
arecord -l结果将指示应该分别在playback.pcm和capture.pcm下执行什么操作。
例如,arecord -l会在我的机器上产生以下输出:
**** List of CAPTURE Hardware Devices ****
card 1: USBSA [Andrea PureAudio USB-SA], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0slave.cpm旁边的文本应为"hw:X,Y",其中X和Y取自上述输出中的第二行:
card X: ..., device Y: ...发布于 2015-04-22 05:15:38
对以上内容进行更正。需要编辑~/.asoundrc
请注意文件名中的"a“。
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:0,0"
}
capture.pcm {
type plug
slave.pcm "hw:1,0"
}
}https://stackoverflow.com/questions/28083153
复制相似问题