gpt4 book ai didi

usb - Raspberry Pi 未从 USB 麦克风录音

转载 作者:行者123 更新时间:2023-12-04 21:41:58 25 4
gpt4 key购买 nike

我有一个带有 USB Daffodil 声卡的 USB 集线器(Plugabble)。
扬声器工作良好,但麦克风不工作。我不知道该怎么做才能让它发挥作用。

usb声卡设置为默认

arecord 命令记录但不记录声音。

aplay 播放的声音很好听。

以下是我的一些设置:

pi@raspberrypi ~ $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Set
C-Media USB Headphone Set, USB Audio
Default Audio Device
sysdefault:CARD=Set
C-Media USB Headphone Set, USB Audio
Default Audio Device
front:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
Front speakers
surround40:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0
C-Media USB Headphone Set, USB Audio
IEC958 (S/PDIF) Digital Audio Output


pi@raspberrypi ~ $ sudo lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 005: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 006: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

pi@raspberrypi ~ $ sudo amixer set Capture cap 8
amixer: Unable to find simple control 'Capture',0

pi@raspberrypi ~ $ amixer
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 151
Mono:
Front Left: Playback 44 [29%] [-20.13dB] [on]
Front Right: Playback 44 [29%] [-20.13dB] [on]
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum
Playback channels: Mono
Capture channels: Mono
Limits: Playback 0 - 32 Capture 0 - 16
Mono: Playback 23 [72%] [34.36dB] [on] Capture 9 [56%] [13.39dB] [on]
Simple mixer control 'Auto Gain Control',0
Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [off]

谢谢!

最佳答案

这取决于您的发行版,因为不同的发行版以不同的方式处理设备。

所以我认为你正在运行一个 raspian jessy,但试图像你一样配置它。

所以如果我是对的,你应该进入文件 alsa.conf用命令sudo nano /usr/share/alsa/alsa.conf并编辑行

 defaults.ctl.card 0
defaults.pcm.card 0


 defaults.ctl.card 1
defaults.pcm.card 1

然后转到文件 .asoundrc使用命令 sudo nano /home/pi/.asoundrc并对其进行编辑,使其看起来如下所示:
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}

重新启动,希望它会起作用。

如果我的猜测有误,请在答案下发表评论,我会更新它:) 希望它有所帮助。

关于usb - Raspberry Pi 未从 USB 麦克风录音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23975046/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com