Soniox
SDKsReact

Full React SDK reference

Full SDK reference for the React SDK

Components

ComponentDescription
SonioxProviderProvider component for the Soniox client
AudioLevelComponent 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:

TypeDescription
SonioxProviderPropsDiscriminated union consumed by SonioxProvider. Pass either config (config-driven) or client (client-driven) — never both.
SonioxProviderConfigPropsThe config-driven leaf of the union. Use when you want the provider to construct a SonioxClient internally from SonioxConnectionConfig.
SonioxProviderClientPropsThe client-driven leaf of the union. Use when you already own a SonioxClient instance and just want to expose it through context.

Hooks

HookDescription
useRecordingMain hook for real-time speech-to-text session
useTtsMain hook for real-time text-to-speech session
useMicrophonePermissionHook for checking microphone permission
useAudioLevelHook for real-time audio volume and spectrum data (not available for React Native)
useSonioxHook toaccess the SonioxClient from context