SDKsReact
Full React SDK reference
Full SDK reference for the React SDK
Components
| Component | Description |
|---|---|
SonioxProvider | Provider component for the Soniox client |
AudioLevel | Component to display the audio level (not available for React Native) |
SonioxProvider props
@soniox/react exports three related prop types so you can split provider props in wrapper HOCs without re-deriving them:
| Type | Description |
|---|---|
SonioxProviderProps | Discriminated union consumed by SonioxProvider. Pass either config (config-driven) or client (client-driven) — never both. |
SonioxProviderConfigProps | The config-driven leaf of the union. Use when you want the provider to construct a SonioxClient internally from SonioxConnectionConfig. |
SonioxProviderClientProps | The client-driven leaf of the union. Use when you already own a SonioxClient instance and just want to expose it through context. |
Hooks
| Hook | Description |
|---|---|
useRecording | Main hook for real-time speech-to-text session |
useTts | Main hook for real-time text-to-speech session |
useMicrophonePermission | Hook for checking microphone permission |
useAudioLevel | Hook for real-time audio volume and spectrum data (not available for React Native) |
useSoniox | Hook toaccess the SonioxClient from context |