alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

SSML interpret as spell-out doesn't work correctly #662

Closed Betatester777 closed 3 years ago

Betatester777 commented 3 years ago

I'm submitting a...


[ ] 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:

Expected Behavior

The content is spelled independently of the number and order of the characters.

Current Behavior

In some cases content is ignored. In this sentence the dot sign is silent. hello<say-as interpret-as="spell-out">.</say-as> others are working as expected: `hello.abc

. .?` ## Possible Solution ## Steps to Reproduce (for bugs) set the value of the speak method as described bellow `const LaunchRequestHandler = { canHandle(handlerInput) { return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest'; }, handle(handlerInput) { const speakOutput = 'hello.abc'; return handlerInput.responseBuilder .speak(speakOutput) .reprompt(speakOutput) .getResponse(); ` ## Context ## Your Environment * ASK SDK for Node.js used: 2.10.1 * Operating System and version: alexa developer concole ## Node.js and NPM Info * Node.js version used for development: * NPM version used for development:
ShenChen93 commented 3 years ago

Hi @Betatester777 ,

I could reproduce this issue and seems single dot will be ignored in ssml. However, it's not a SDK issue as the <say-as interpret-as="spell-out">.</say-as> do exist in response body. I am curious in which situation you would need a single dot ? I could help reach out to service team for this feature request if theres' a good scenario.

Thanks, Shen

Betatester777 commented 3 years ago

Hi Shen, my use case was a dictation As you remember from your school days, the teacher reads sentences aloud and spells out the punctuation marks. Currently I'm using constants for punctuation marks as a workaround, but with proper support it is much easier to spell the punctuation marks in any language. Regards, Ingo

ShenChen93 commented 3 years ago

Hi @Betatester777 ,

Sorry for responding late. Our service team suspected the problem is in the way the trailing punctuation is attached to the ultimate word of the preceding sentence. This movement should not cross boundary, but it seems it does.

The service team provide another workaround, E.G.:

Morgen. <say-as interpret-as="spell-out">.</say-as> . Ich bin ein Berliner. <say-as interpret-as="spell-out">.</say-as> .

I will post update here once this issue is fixed.

Thanks, Shen

ShenChen93 commented 3 years ago

Service side acknoledged this issue, thus I will close it from SDK side now