question

Paulo Cândido avatar image
Paulo Cândido asked

custom skill with audio files stops, turns its light off, and gives a final light flash

I'm developing a custom skill with no TTS interaction, all of skill output was recorded by a human, so we have a lot (thousands) of audio files, stored on self-hosted swift s3. this s3 is shared with other products and delivers hundreds of millions of requests worldwide.


Sometimes (sporadically) the application unexpectedly stops, with no message. It just turns its light off, and after one second, it gives a last flash. (see the video https://drive.google.com/file/d/16CzqDporcxeiValF-wTjcbbH5b9A9Iqq/view?usp=sharing). It would have one more audio file to play.


I believe it's somehow related to our s3 (timeout maybe?) but I didn't find a place to check or get a log.


Have anyone seen this kind of error before? Or is there a code of error, to understand this kind of stop without a message?

Is there a way to get logs to debug this problem?

What way would you start the investigation?

audiossmlcustom skill
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image
Andy Whitworth answered

Hi Paulo. Can you provide some more information about your skill, for example:

  1. Are you using the Alexa Audio Player interface to play the audio files (it sounds like you are) ?
  2. Where is your code running (AWS lambda?) and what language is it written in ?
  3. If using AWS lambda, are there any errors in your cloudwatch logs ?
  4. What type of access control do you have in place on your audio files ? Are they open to all or are you using some policy/permissions configuration to allow access to your skill code ?

Any other implementation details would help.

Andy.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Paulo Cândido avatar image
Paulo Cândido answered

Hi Andy,

  1. No, i'm using SSML, here is an example
{
	"body": {
		"version": "1.0",
		"response": {
			"outputSpeech": {
				"type": "SSML",
				"ssml": "
<speak><audio src=\"https://s3.glbimg.com/v1/AUTH_81a30b66364940f9ba49c02f412bb520/receitas/navegacao/saudacao_04_ran.wav.mp3\"/></speak>"
			},
			"reprompt": {
				"outputSpeech": {
					"type": "SSML",
					"ssml": "
<speak><audio src=\"https://s3.glbimg.com/v1/AUTH_81a30b66364940f9ba49c02f412bb520/receitas/navegacao/saudacao_notrec_01.mp3\"/></speak>"
				}
			},
			"shouldEndSession": false,
			"type": "_DEFAULT_RESPONSE"
		},
		"sessionAttributes": {},
		"userAgent": "ask-node/2.12.0 Node/v16.16.0"
	}
}

2 and 3. No, my backend was developed on VoiceFlow (https://www.voiceflow.com/)

4. they're public and open to wideworld (you can see some examples in the snippet above)

it's worth note the ssml outputs I see on the Alexa simulator (amazon developer console) are right, and without any modification, sometimes I have success and sometimes I got a failure.

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Whitworth avatar image Andy Whitworth commented ·
Ah, I understand.

I'm not familiar with voiceflow so can't advise on debugging techniques.

Try posting on the Alexa slack channel (#general) at alexa.design/slack lots of helpful devs on there (myself included ;) )

0 Likes 0 ·
Paulo Cândido avatar image
Paulo Cândido answered

Thanks Andy, I'll send there. I really believe it wasn't the voiceflow (backend), because part of the response was played :/

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.