You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
The trimOutputSpeech method of the ResponseBuilder class is meant to trim the "" tags from the input. However, there is an error in: if (trimmedOutputSpeech.startsWith("<speak>") && trimmedOutputSpeech.endsWith("</speak>")) {
return trimmedOutputSpeech.substring(8, trimmedOutputSpeech.length() - 8).trim();
}
The error is at the substring call with starting index of 8. The "<speak>" string only has 7 characters and a string has a starting index of 0. The character to the right of the ">" has an index of 7, not 8.
Expected Behavior
When setting ssml with the ResponseBuilder withSpeech method, the passed string should be able to contain enclosing <speak> markup.
The trimOutputSpeech method should only trim the <speak> tags and not any of the content.
Current Behavior
Any character to the right of an opening <speak> tag is trimmed.
Steps to Reproduce (for bugs)
// Provide a self-contained, concise snippet of code
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult
Possible Solution
// Not required, but suggest a fix/reason for the bug,
// or ideas how to implement the addition or change
Context
Wasted my time tracking it down.
Your Environment
ASK Java SDK version used: 8.x.x
Operating System and version: mac os 10.12.6
Java Info
Java version used for development:
The text was updated successfully, but these errors were encountered:
I'm submitting a...
The trimOutputSpeech method of the ResponseBuilder class is meant to trim the "" tags from the input. However, there is an error in:
if (trimmedOutputSpeech.startsWith("<speak>") && trimmedOutputSpeech.endsWith("</speak>")) {
return trimmedOutputSpeech.substring(8, trimmedOutputSpeech.length() - 8).trim();
}
The error is at the substring call with starting index of 8. The "<speak>" string only has 7 characters and a string has a starting index of 0. The character to the right of the ">" has an index of 7, not 8.
Expected Behavior
When setting ssml with the ResponseBuilder withSpeech method, the passed string should be able to contain enclosing <speak> markup.
The trimOutputSpeech method should only trim the <speak> tags and not any of the content.
Current Behavior
Any character to the right of an opening <speak> tag is trimmed.
Steps to Reproduce (for bugs)
Possible Solution
Context
Wasted my time tracking it down.
Your Environment
Java Info
The text was updated successfully, but these errors were encountered: