question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSML code ignored when speak tag is used

See original GitHub issue

I have a service that returns a strings with SSML strings in them. If I pass this to the ApiAiAssistant SDK wrapped in a <speak> tag, Google Home complete ignores everything inside the <say-as> tag. Is this because the app hasn’t been fully deployed?

Examples:

const phonetic_name = 'Product <say-as interpret-as="characters">ABC1</say-as> - Bottle';

//  Google Home says: "We found Product less-than say as interpret as equals 
//  characters greater-than A-B-C-1 less-than say as greater-than Bottle"
assistant.ask(`We found ${phonetic_name}`);

//  Google Home says: "We found less-than speak greater-than Product 
//  less-than say as interpret as equals characters greater-than A-B-C-1 less-than
//  say as greater-than Bottle less-than speak greater-than
assistant.ask(`We found <speak>${phonetic_name}</speak>`)

//  Google Home says: "We found Product Bottle"
//  Web simulator response:
//  { "response": "We found Product<unknown word to simulator>- Bottle\n" }
//
//  Further down in the debugInfo:
//  "final_response": {
//    "rich_response": {
//      "items": [{
//        "simple_response": {
//          "ssml": "<speak>We found Product <say-as interpret-as=\"characters\">ABC1</say-as> - Bottle</speak>"
//        }
//      }]
//    }
//  }
assistant.ask(`<speak>We found ${phonetic_name}</speak>`)

The last one seems to be the correct way to do this, however in both the simulator and on the Google Home device it’s refusing say the things inside the say-as tags. Am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
glittlecommented, Aug 8, 2017

All I needed was to read out numbers, so I got what I needed by doing 'my number'.split('').join(' ') and it correctly reads the numbers for me.

0reactions
Swivelgamescommented, Aug 8, 2017

@glittle Please see my solution and let me know if it works for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSML tags supported by Amazon Connect
If you use an unsupported tag in your input text, it's automatically ignored when it's processed. All SSML-enhanced text must be enclosed within...
Read more >
Speech Synthesis Markup Language (SSML) - Google Cloud
An empty element that places a marker into the text or tag sequence. It can be used to reference a specific location in...
Read more >
Lexicon is ignored in SSML using MS cognitive speech service
Lexicon is ignored in SSML using MS cognitive speech service. I try to use a lexicon but the TTS service ignores it. This...
Read more >
SSML | Conversational Actions - Google Developers
Use <s>...</s> tags to wrap full sentences, especially if they contain SSML elements that change prosody (that is, <audio>, <break> ...
Read more >
Audio SSML tag does not work using progressive response
If we don't use the speak tags, it returns a valid 204 status code, playing the text and ignoring the <audio src> tag....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found