WhoBuilt

Giving voice an action in React Native

Oct 9, 2019· 29 min· 703 views·Watch on YouTube

Speaker

Wouter van den Broek of Science Mobile Health presents at React Native EU 2019 about adding voice input, commands, and speech output to React Native apps.

How voice systems work

Wouter describes voice assistants as a growing part of mobile technology, used on phones, in cars, and at home. He outlines a pipeline that converts speech to text, infers a user’s intent, performs an action, and may respond with generated speech.

Voice can support, but not replace, app flows

At Science Mobile Health, Wouter’s team explored voice input and commands for Clean Cards, a medical app that helps patients record vital signs. A demo illustrates the limits of unreliable voice recognition, and he cautions against using voice for critical tasks. He suggests using it to support existing features, such as filling fields or triggering actions.

Add speech input and intent recognition

Wouter demonstrates React Native Voice for speech-to-text, noting that mobile operating systems support more than 40 languages and can recognize speech offline. For interpreting requests, he uses Wit.ai: developers train an app-specific model with example phrases, then send it text and receive likely intents with confidence scores. His example recognizes “Where am I?” as a request to fetch the user’s location.

Connect voice commands to app actions

Wouter explains that iOS Shortcuts can launch an app with data attached, while Google Voice Actions were more restricted at the time. His Siri Shortcut example uses an invocation phrase and user information to open the app and navigate to a relevant screen. He notes that users may need guidance to set shortcuts up.

Add spoken feedback

Wouter shows text-to-speech through Expo modules, where an app passes text and can select a voice and language. He says speech output runs on-device and responds quickly, while the demo also shows that voice interactions can fail. He recommends voice for accessibility and as support for existing app flows.

Takeaways

  • Keep critical app tasks usable without voice, since recognition can fail.
  • Use speech-to-text to make numeric or decision-heavy inputs easier to enter.
  • Train intent models with phrases users might actually say, then check confidence before acting.
  • Use OS shortcuts to connect spoken commands with specific app screens or actions.
  • Consider on-device speech output for accessible feedback that works without a network.

Mentioned in this talk

Search inside this talk

What was claimed 11

Show all 11 facts

Related talks