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

Alexa Sound effects? #18

Open
fryguy04 opened this issue Sep 19, 2018 · 2 comments
Open

Alexa Sound effects? #18

fryguy04 opened this issue Sep 19, 2018 · 2 comments

Comments

@fryguy04
Copy link

I'd like to have a sound effect instead of TTS "Door Open"

According to this Alexa Sound Library link, seems like it should be possible to embed in the "speak" variable (could be mistaken) like this:

<speak>
    This is Alexa's regular speech, followed by the sound effect "bear groan roar (1)".
    <audio src='soundbank://soundlibrary/animals/amzn_sfx_bear_groan_roar_01'/>
</speak>

Tried this but not working ... any thoughts?

./alexa_remote_control.sh -d "ALL" -e "speak:'test'.<audio src='soundbank://soundlibrary/home/amzn_sfx_door_open_01'/>"

@walthowd
Copy link
Owner

You would probably want to start by removing all the escaping at line 345:

TTS=$(echo ${COMMAND##*:} | ${SED} -r 's/[^-a-zA-Z0-9_.,?! ]//g' | sed 's/ /_/g')

@fryguy04
Copy link
Author

playing around with it now ... simple things not working (like removing sed) ... if anyone has ability to sniff a 'normal' Alexa packet with this sound I'd be up for coding the rest ... I just don't know what 'normal' looks like

Here's what it is sending currently and getting a response of {"Message":null}

{
  "@type": "com.amazon.alexa.behaviors.model.Sequence", "startNode": {
    "@type": "com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode",
    "type": "Alexa.Speak",
    "operationPayload": {
      "deviceType": "XXXXXXXXXXXX",
      "deviceSerialNumber": "XXXXXXXXXXX",
      "locale": "en-US",
      "customerId": "XXXXXXXXX",
      "textToSpeak": "speak:'testing'.<audio src='soundbank://soundlibrary/home/amzn_sfx_door_open_01'/>"
     }
   }
 }

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

No branches or pull requests

2 participants