Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Alexa SDK Sample App audio issue #534

Closed
2 of 8 tasks
mdhussein opened this issue Feb 24, 2018 · 8 comments
Closed
2 of 8 tasks

Alexa SDK Sample App audio issue #534

mdhussein opened this issue Feb 24, 2018 · 8 comments

Comments

@mdhussein
Copy link

mdhussein commented Feb 24, 2018

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

Last year, I was able to run the sample app on my Raspberry pi 3.
This year, on a new raspberry pi, I am trying the Alexa SDK sample app.
Everything went fine and I was able to launch the sample app.
However, whenever I say something, I receive the HTTP_RESPONSE_NO_CONTENT.

What is the expected behavior?

Alexa Sample App responds to queries.

What behavior are you observing?

No response from Alexa Sample App

This is what I noticed:
###########################

Thinking...

###########################

2018-02-24 18:09:55.848 [ c] I InProcessAttachmentReader:readFailed:reason=SDS is closed
2018-02-24 18:09:56.118 [ c] 0 HTTP2Stream:receivedRequestId:value=x-amzn-requestid: 12470efffe37a252-000078a2-000a7327-7cd6ffdd8f21faf9-6afba8fa-5
2018-02-24 18:09:56.119 [ c] 0 HTTP2Stream:libcurl:streamId=5,text=Curl_http_done: called premature == 0
2018-02-24 18:09:56.119 [ c] 0 AudioInputProcessor:onSendCompleted:status=SUCCESS_NO_CONTENT
2018-02-24 18:09:56.119 [ c] 0 HTTP2Transport:cleanupFinishedStream:streamId=5,result=204
2018-02-24 18:09:56.119 [ c] 0 HTTP2StreamPool:releaseStream:streamId=5,numAcquiredStreams=1
2018-02-24 18:09:56.120 [ c] 0 CurlEasyHandleWrapper:reset:responseCode=HTTP_RESPONSE_SUCCESS_NO_CONTENT
2018-02-24 18:10:00.848 [ e] 0 DialogUXStateAggregator:transitionFromThinkingTimedOut
2018-02-24 18:10:00.848 [ e] 0 DialogUXStateAggregator:setState:from=THINKING,to=IDLE
2018-02-24 18:10:00.849 [ b] 1 FocusManager:releaseChannel:channelName=Dialog

Tell us about your environment:

What version of the AVS Device SDK are you using?

Tell us what hardware you're using:

  • Desktop / Laptop
  • Raspberry Pi
  • Other - tell us more:
    I have set the usb microphone to be the default.
    Speaker is connected to the raspberry.
    I used arecord and aplay to record my voice and I was able to hear it clearly.

Tell us about your OS (Type & version):

  • Linux
  • MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:
@mavamazon
Copy link
Contributor

Hi @mdhussein!

It seems that your mic records either silence or a distorted sound. Please run these commands to see if your mic is able to record:

arecord /tmp/test.wav
aplay /tmp/test.wav

@erickemde
Copy link

I'm having the same problem. I ran arecord and aplay and was able to record and play back audio.

@erickemde
Copy link

I said, "Alexa, what is 2 + 2". The application responded and looks like it is returning speech (there is a 'speaking ..' section in the response. My speakers are working (analog, not HDMI), but it seems like the audio isn't getting through.
alexa-error.txt

@mavamazon
Copy link
Contributor

Hi @erickemde!

It seems that you have an issue with playback, not recording.
Could you please install gstreamer tools:

sudo apt install gstreamer1.0-tools gstreamer1.0-alsa

Then see if both of the commands produce the sound through the expected output:

gst-launch-1.0 -m audiotestsrc ! alsasink
gst-launch-1.0 -m audiotestsrc ! autoaudiosink

@Punkown
Copy link

Punkown commented Mar 2, 2018

Hi @mavamazon ,

I get the same issue, using usb speaker and mic. - Jabra speak.

gst-launch-1.0 -m audiotestsrc ! alsasink - Getting sound
gst-launch-1.0 -m audiotestsrc ! autoaudiosink - Not getting sound

Thanks,

Regards
Payam

@mavamazon
Copy link
Contributor

Hey @pjaM1!

You can change the line in MediaPlayer.cpp (

m_pipeline.audioSink = gst_element_factory_make("autoaudiosink", "audio_sink");
), so that instead of:

m_pipeline.audioSink = gst_element_factory_make("autoaudiosink", "audio_sink");

you have:

m_pipeline.audioSink = gst_element_factory_make("alsasink", "audio_sink");

@Punkown
Copy link

Punkown commented Mar 2, 2018

Hi @mavamazon

After the change and then run:
make SampleApp && TZ=UTC ./SampleApp "/home/pi/build/Integration/AlexaClientSDKConfig.json" "/home/pi/third-party/alexa-rpi/models" DEBUG9

It works
Thanks,
Regards
Payam

@kencecka
Copy link
Contributor

kencecka commented Mar 2, 2018

Great - glad to hear it's working for you. Let us know if you have any further questions.

Ken

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants