React Native SDK
Build speech-to-text workflows in React Native with real-time API.
Soniox React SDK works with React Native and Expo out of the box, providing the same hooks for real-time speech-to-text. It lets you:
- Capture audio from the device microphone with a single hook
- Stream audio to Soniox in real time
- Receive transcription and translation results as reactive state
Quickstart
Install
Install via your preferred package manager:
Setup you temporary API key endpoint
In client enviroment (browser, mobile app, React Native, etc.), you don't want to expose your API key to the client. For this reason, you can create a temporary API key endpoint on your server and use it to issue temporary API keys for the client.
Read more about using Temporary API keys with React SDK
Create a custom audio source
Wrap any RN audio streaming library (e.g. @siteed/expo-audio-studio) with the AudioSource interface to stream PCM audio chunks to Soniox
Create your first real-time session
The core hooks (e.g. useRecording) are platform-agnostic.
To use them in React Native, provide a custom AudioSource that streams PCM
audio chunks