Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Errno -9997] Invalid sample rate #302

Open
xbf321 opened this issue Dec 30, 2023 · 0 comments
Open

[Errno -9997] Invalid sample rate #302

xbf321 opened this issue Dec 30, 2023 · 0 comments
Assignees
Labels
operation problem 用户操作问题

Comments

@xbf321
Copy link

xbf321 commented Dec 30, 2023

确认已寻找过答案

我已确认在 Github issue 页、常见问题页、文档 中都查找过,没有找到类似问题和资料。我也没有 google / bing/ 百度 / duckduckgo 到相关解答。

安装方式

docker安装

docker run -it -p 7090:5001
--device /dev/snd
-e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native
-v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native
-v ~/.config/pulse/cookie:/root/.config/pulse/cookie
--name wukong-robot
wzpan/wukong-robot:latest

操作系统

openwrt 系统 x86

离线唤醒相关

如果是离线唤醒相关的问题,是否已确保 arecord temp.wavaplay temp.wav (Linux) 或 rec temp.wavplay temp.wav (Mac)已正常工作?(注意要求不能带任何其他参数)如果不能,请先配置好麦克风和音响再尝试。

—— 我已确保录音、播放都正常工作才尝试 wukong-robot 。

问题描述

具体说明下问题

2023-12-30 07:22:19,041 - robot.detector - detector.py - initDetector - line 94 - INFO - 使用 snowboy 进行离线唤醒
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2718
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2842
2023-12-30 07:22:19,097 - robot.detector - detector.py - initDetector - line 113 - CRITICAL - 离线唤醒机制初始化失败:[Errno -9997] Invalid sample rate
Stack (most recent call last):
File "wukong.py", line 188, in
wukong.run()
File "wukong.py", line 95, in run
detector.initDetector(self)
File "/app/robot/detector.py", line 113, in initDetector
logger.critical(f"离线唤醒机制初始化失败:{e}", stack_info=True)

root@OpenWrt:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: speakermic [Hangouts Meet speakermic], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0


root@OpenWrt:~# cat /etc/asound.conf
pcm.!default {
type plug slave {
pcm "hw:speakermic,0"
}
}

ctl.!default {
type hw
card 2
}


使用 arecord 和 aplay 正常

@xbf321 xbf321 added the operation problem 用户操作问题 label Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operation problem 用户操作问题
Projects
None yet
Development

No branches or pull requests

2 participants