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:
Set up your temporary API key endpoint
In client environments (browser, mobile app, React Native, etc.), you don't want to expose your API key. Create a temporary API key endpoint on your server and use it to issue short-lived keys for the client.
Read more about using temporary API keys with the 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