Coder Social home page Coder Social logo

Alexa cannot talk back! about avs HOT 14 CLOSED

respeaker avatar respeaker commented on September 28, 2024
Alexa cannot talk back!

from avs.

Comments (14)

xiongyihui avatar xiongyihui commented on September 28, 2024

Did you run alexa-audio-check which checks audio input and output?

Maybe check if /etc/asound.conf is the same with https://github.com/respeaker/seeed-voicecard/blob/master/asound_4mic.conf

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_direct.c:1765:(snd1_pcm_direct_parse_open_conf) Unknown field ac108-slavepcm
ALSA lib pcm_direct.c:1765:(snd1_pcm_direct_parse_open_conf) Unknown field ac108-slavepcm
ALSA lib pcm_direct.c:1765:(snd1_pcm_direct_parse_open_conf) Unknown field ac108-slavepcm
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
RMS: 205
RMS: 187
RMS: 185
RMS: 221
RMS: 2611
This is what i got if I run alexa-audio-check.
/etc/asound.conf is the same.
What should I do?

from avs.

xiongyihui avatar xiongyihui commented on September 28, 2024

The alexa-audio-check will play an alarm. If you didn't hear anything, the default audio output is not configured correctly or you forget to install the dependencies:

sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
gir1.2-gstreamer-1.0 python-gi python-gst-1.0 python-pyaudio

To check audio input and output, try:

arecord -f cd -v s.wav
aplay -v s.wav

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

Thanks! I install the dependencies. When I try arecord -f cd -v s.wav, I got this:
ALSA lib pcm_direct.c:1765:(snd1_pcm_direct_parse_open_conf) Unknown field ac108-slavepcm
arecord: main:788: audio open error: Invalid argument

from avs.

xiongyihui avatar xiongyihui commented on September 28, 2024

Oh, there is an error in the file /etc/asound.conf

You can re-install seeed-voicecard which updated https://github.com/respeaker/seeed-voicecard/blob/master/asound_4mic.conf

The asound_4mic.conf will be copied to /etc/voicecard

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

Thanks!!! Now arecord -f cd -v s.wav and aplay -v s.wav work fine! It can record and play the sound just recorded.
But alexa-audio-check still doesn't trigger any alarm. I got the same feedback as above if I run alexa-audio-check.

from avs.

xiongyihui avatar xiongyihui commented on September 28, 2024

That's weird! How about try to use other mp3 players?

sudo apt install gstreamer1.0-tools mpv vlc

gst-launch-1.0 playbin
 uri=https://archive.org/download/SuperMarioBros.ThemeMusic/SuperMarioBros.mp3

mpv https://archive.org/download/SuperMarioBros.ThemeMusic/SuperMarioBros.mp3

cvlc https://archive.org/download/SuperMarioBros.ThemeMusic/SuperMarioBros.mp3

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

The second and the third one work! How to set them as the player for Alexa??

from avs.

xiongyihui avatar xiongyihui commented on September 28, 2024

To change the player of Alexa, you need to modify https://github.com/respeaker/avs/blob/master/avs/player.py

But I think we need to figure out why gstreamer does't work. It's most likely that some gstreamer plugins are missing.

I just wonder which OS do you use? I got no problem with the latest raspbian.

Make sure that all the dependencies are installed.

sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
sudo apt-get install gir1.2-gstreamer-1.0 python-gi python-gst-1.0

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

How do I modify that?
The OS I have is Raspbian GNU/Linux 9 (stretch). Yes, all the dependency are installed.
Btw, when I run alexa-auth, I got:
Exception AttributeError: "'NoneType' object has no attribute 'StreamClosedError'" in <generator object _server_request_loop at 0x75d49f80> ignored.
I cannot see any WARNING shown in the tutorial.

from avs.

bennr01 avatar bennr01 commented on September 28, 2024

Hi,
i just had the same problem with the 2-mic array.
Running the following command as root fixed the problem for me:
apt-get install gstreamer1.0-plugins-*.
I hope this helps.

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

Doesn't work for me. I probably still need to change the player...

from avs.

wangzt12 avatar wangzt12 commented on September 28, 2024

I reviewed the install process. When I install
sudo apt install gstreamer1.0 gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly
I got:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
gstreamer1.0-omx-dbg : Depends: gstreamer1.0-omx (= 1.0.0.1-0+rpi12+jessiepmg) but 1.10.4-1+rpt3 is to be installed
E: Unable to correct problems, you have held broken packages.

from avs.

xiongyihui avatar xiongyihui commented on September 28, 2024

It is likely that the default of pi's gstreamer audio sink is GstOMXHdmiAudioSink. It ignores ALSA configurations (/etc/asound.conf or ~/.asoundrc)

image

To verify if it's the case:

sudo apt-get install gstreamer1.0-tools
gst-launch-1.0 playbin uri=https://archive.org/download/SuperMarioBros.ThemeMusic/SuperMarioBros.mp3
# Audio output port should be HDMI

 gst-launch-1.0 playbin uri=https://archive.org/download/SuperMarioBros.ThemeMusic/SuperMarioBros.mp3  audio-sink=alsasink
# Audio output port should be the default alsa output device

If you don't want HDMI audio output, try:

sudo apt remove gstreamer1.0-omx gstreamer1.0-omx-rpi

from avs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.