Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


speech

Support for speech has been increasing dramatically in mobile device. The following actions allow to recognize and synthesize speech.

speech-to-text

The languages→record text action prompts the user with a specialized dialog to dictate their text.
This code might not work on your current device: missing Microphone capabilities.
var text := languages → record text
The implementation of this dialog based on available support for such feature. If available, TouchDevelop will use the native speech recognition support; otherwise it might to fallback on the Project Hawaii cloud based services.

text-to-speech

The languages→speak text and languages→speak ssml uses text-to-speech technology to speak text aloud.
This code might not work on your current device: missing Speech capabilities.
  • speak aloud text using the default intonations
languages → speak text("en-US", "female", "TouchDevelop is cool!")
var ssml := web → xml("<speak xml:lang=\"En-US\" version=\"1.0\">\n<say-as interpret-as=\"letters\">Hello</say-as>\n</speak>")
languages → speak ssml(ssml)