Open dbarnespaychex opened 4 years ago
Manually adding a displayText
value to the SimpleResponse
presents the text correctly on a phone. This leads me to wonder if there's a bug in whatever logic is stripping SSML to create display text.
"simpleResponse": {
"textToSpeech": "<speak>You were paid <say-as interpret-as=\"unit\">$609.20</say-as> on <say-as interpret-as=\"date\" format=\"md\">Jan 10</say-as>.</speak>",
"displayText": "You were paid $609.20 on Jan 10."
}
If you're trying to compose sentences with SSML tags inside you may want to wrap sections in <s>
like <speak><s>You were paid</s><say-as...
Hi @Fleker thanks for your response!
I did try using <s>...</s>
around various parts of the sentence but had no luck. It seems as if there's a bug in whatever code strips the SSML so it can be presented as plain text. Maybe the $
is throwing off a Regular Expression somewhere?
Hello, I hope I'm just doing something wrong, but this response renders correctly on a smart device but incorrectly on a phone:
Here's how it renders on a phone. Note the missing space between "paid" and "$609.20":![bug phone](https://user-images.githubusercontent.com/7923345/82226065-031e9700-98f4-11ea-8215-afb2e8895464.GIF)
It appears this way in both the emulator and on a real phone. Maybe it has something to do with showing a card in addition to the simple response?
I've tried re-arranging the words in the sentence, using
<break/>
between the 2 words, wrapping "paid" in<s>...</s>
, and even inserting a Unicode non-breaking space between the 2 words, but the visual presentation still strips that white space between "paid" and "$609.20".Can someone point me in the right direction? What am I doing wrong?