musistudio / wukong-robot-install-script

wukong-robot的一键安装脚本.
MIT License
89 stars 37 forks source link

树莓派通过MobaXtem连接运行wukong-robot #6

Open Hhhhhheart opened 5 years ago

Hhhhhheart commented 5 years ago

image

Hhhhhheart commented 5 years ago

MobaXterm X11 proxy: Unsupported authorisation protocol xcb_connection_has_error() returned true Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 connect(2) call to /tmp/jack-0/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed 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: 2719 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843 CRITICAL:main:离线唤醒机制初始化失败:[Errno -9997] Invalid sample rate

musistudio commented 5 years ago

请检查一下你的麦克风是否配制好

Hhhhhheart commented 5 years ago

我是耳机连接树莓派自带的3.5mm,麦克风是插声卡上 ` pcm.!default { type asym playback.pcm { type plug slave.pcm "hw:0,0" } capture.pcm { type plug slave.pcm "hw:1,0" } }

ctl.!default { type hw card 1 }

`

musistudio commented 5 years ago

你要先使用arecord -d 3 temp.wavaplay temp.wav命令测试一下麦克风和耳机是否可用

Hhhhhheart commented 5 years ago

情况是这样的,录音可以录,但是测试听录音耳机没声音,然后运行孙悟空的时候耳机能听到师傅你好什么什么的然后就没声音了,就出现以上的代码错误

musistudio commented 5 years ago

安装一下pulseaudio试试 sudo apt-get install pulseaudio

Hhhhhheart commented 5 years ago

这个也已经安装了,还是不能正常运行

musistudio commented 5 years ago

这属于snowboy的问题,详情请看这个issue:https://github.com/Kitt-AI/snowboy/issues/334

Hhhhhheart commented 5 years ago

好的我试试看,我另外换成putty来运行这个python,现在只有这个问题了,换了个麦克风,都能正常录音和播放。 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 924 connect(2) call to /tmp/jack-1000/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed 是连接失败,是否与我在台湾不能连接有关?

musistudio commented 5 years ago

这个和网络是无关的,按道理来说应该可以使用wukong了,你唤醒试试

Hhhhhheart commented 5 years ago

还是不行,我重新安装一下试试,请问是不是在一键安装之前是要换源吗?我之前树莓派安装没有换源,里面有让我选择源我选的是github,是否与这个有关

musistudio commented 5 years ago

和源无关,这个源指的是git的仓库源

Hhhhhheart commented 5 years ago

那现在树莓派要在安装前要手动换源吗 sudo wget http://wukong-install.oss-cn-hangzhou.aliyuncs.com/changeSource.sh && sudo chmod 777 changeSource.sh &&./changeSource.sh

musistudio commented 5 years ago

不需要换源的,和源没关系

peter880805 commented 4 years ago

请问这个问题解决了吗,我在win10子系统下安装 也出现了类似的错误提示

siennx commented 4 years ago

我在 raspberry 3A+ 上也遇到同樣問題, aplay 跟 arecord都正常. 但是一到執行pyaudio就出錯. 之前運行都好好的. 試了好多網路的方法都沒辦法解決.