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

response.clear() may result in incorrect outputSpeech type #75

Closed
wthomsen opened this issue Aug 8, 2016 · 2 comments
Closed

response.clear() may result in incorrect outputSpeech type #75

wthomsen opened this issue Aug 8, 2016 · 2 comments

Comments

@wthomsen
Copy link

wthomsen commented Aug 8, 2016

Calling response.clear() completely resets the outputSpeech object on the json response. If one subsequently calls response.say('This was called after clear.'), the response json will look something like this

...
"outputSpeech": {
  "type": "PlainText",
  "text": "",
  "ssml": "<speak>This was called after clear.</speak>"
}
...

Perhaps when calling response.say(), the outputSpeech type should be checked or re-assigned.

@rickwargo
Copy link
Contributor

Agreed. PlainText is a subset of SSML (simply wrapped in a speech tag). Perhaps .clear() should maintain that consistency and set the type to SSML instead of PlainText as .say() automatically puts all output in SSML. I'll submit a pull request.

rickwargo added a commit to rickwargo/alexa-app that referenced this issue Aug 8, 2016
…peech to SSML, staying consistent with .say() always using SSML, and updates tests to follow this behavior.
@dblock
Copy link
Collaborator

dblock commented Dec 16, 2016

Fixed via rickwargo@3f48cd4.

@dblock dblock closed this as completed Dec 16, 2016
dblock pushed a commit that referenced this issue Dec 19, 2016
… SSML, staying consistent with .say() always using SSML, and updates tests to follow this behavior.
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

3 participants