Added fault-tolerance for when STT can't detect the sentence
Cleaning up returned text from STT. Extra spaces throw off == checks in assistant
Redirect http to https
Details:
host option is unnecessary, and it's an extra line item for the user to fiddle with. Without it, CloudFoundry will pick a random route and tell the user what the link it. Note: the user has to add https to that link to be able to use mic. Not sure how to force the route to be https.
Added an option to say "Sorry, didn't understand you, please try again." when the STT returns an empty object. The previous behavior was the show an internal server error on the web-ui. Now it asks the user to repeat.
Currently, STT returns an extra space at the end of the text. This is usually fine, except for when there are == checks in the assistant's dialogue. For example, when the banking skill will check for 'text==1234` in the one-time passcode section. With the additional space, we'd never get past that check.
Chrome doesn't allow using mic if you're using http. So this redirects the user to https when the app is running on cloud foundry. Note that cf puts weather the request was over http or https in a x-forwarded-proto header field, so we're using that.
Change Summary:
host: watson-voice-bot
==
checks in assistantDetails:
host
option is unnecessary, and it's an extra line item for the user to fiddle with. Without it, CloudFoundry will pick a random route and tell the user what the link it. Note: the user has to add https to that link to be able to use mic. Not sure how to force the route to be https.Added an option to say "Sorry, didn't understand you, please try again." when the STT returns an empty object. The previous behavior was the show an internal server error on the web-ui. Now it asks the user to repeat.
Currently, STT returns an extra space at the end of the text. This is usually fine, except for when there are
==
checks in the assistant's dialogue. For example, when the banking skill will check for 'text==1234` in the one-time passcode section. With the additional space, we'd never get past that check.Chrome doesn't allow using mic if you're using http. So this redirects the user to https when the app is running on cloud foundry. Note that cf puts weather the request was over http or https in a
x-forwarded-proto
header field, so we're using that.