为 Google 助理设置 USB 麦克风



我正在尝试在我的pi3上设置Google家庭助理,但是麦克风有问题。当我在麦克风上运行测试时,它说不存在文件:

$ arecord --format=S16_LE --duration=5 --rate=16k --file-type=raw out.raw            
arecord: main:722: audio open error: No such file or directory 

根据谷歌开发人员的说明,我需要使用以下命令设置一个名为.asoundrc的目录:

pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
}
pcm.mic {
type plug
slave {
pcm "hw:<card number>,<device number>"
}
}
pcm.speaker {
type plug
slave {
pcm "hw:<card number>,<device number>"
}
}

当我运行此命令时,尽管出现此错误:

bash: !default: event not found

我将不胜感激任何反馈!

您不必手动将其作为命令运行。您只需要在主目录中创建一个名为".asoundrc"的文件。使用此链接了解更多信息以及如何解决音频问题。

最新更新