RecordingConfig
@siteed/expo-audio-studio / RecordingConfig
Interface: RecordingConfig
Defined in: src/ExpoAudioStream.types.ts:294
Properties
autoResumeAfterInterruption?
optional
autoResumeAfterInterruption:boolean
Defined in: src/ExpoAudioStream.types.ts:358
Whether to automatically resume recording after an interruption (default is false)
channels?
optional
channels:1
|2
Defined in: src/ExpoAudioStream.types.ts:299
Number of audio channels (1 for mono, 2 for stereo)
compression?
optional
compression:object
Defined in: src/ExpoAudioStream.types.ts:344
Configuration for audio compression
bitrate?
optional
bitrate:number
Bitrate for compression in bits per second
enabled
enabled:
boolean
Enable audio compression
format
format:
"aac"
|"opus"
Format for compression
- 'aac': Advanced Audio Coding - supported on all platforms
- 'opus': Opus encoding - supported on Android and Web; on iOS will automatically fall back to AAC
deviceDisconnectionBehavior?
optional
deviceDisconnectionBehavior:DeviceDisconnectionBehaviorType
Defined in: src/ExpoAudioStream.types.ts:372
How to handle device disconnection during recording
deviceId?
optional
deviceId:string
Defined in: src/ExpoAudioStream.types.ts:369
ID of the device to use for recording (if not specified, uses default)
enableProcessing?
optional
enableProcessing:boolean
Defined in: src/ExpoAudioStream.types.ts:323
Enable audio processing (default is false)
encoding?
optional
encoding:EncodingType
Defined in: src/ExpoAudioStream.types.ts:302
Encoding type for the recording (pcm_32bit, pcm_16bit, pcm_8bit)
features?
optional
features:AudioFeaturesOptions
Defined in: src/ExpoAudioStream.types.ts:335
Feature options to extract during audio processing
filename?
optional
filename:string
Defined in: src/ExpoAudioStream.types.ts:366
Optional filename for the recording (uses UUID if not provided)
interval?
optional
interval:number
Defined in: src/ExpoAudioStream.types.ts:305
Interval in milliseconds at which to emit recording data
intervalAnalysis?
optional
intervalAnalysis:number
Defined in: src/ExpoAudioStream.types.ts:308
Interval in milliseconds at which to emit analysis data
ios?
optional
ios:IOSConfig
Defined in: src/ExpoAudioStream.types.ts:326
iOS-specific configuration
keepAwake?
optional
keepAwake:boolean
Defined in: src/ExpoAudioStream.types.ts:311
Keep the device awake while recording (default is false)
notification?
optional
notification:NotificationConfig
Defined in: src/ExpoAudioStream.types.ts:320
Configuration for the notification
onAudioAnalysis()?
optional
onAudioAnalysis: (_
) =>Promise
<void
>
Defined in: src/ExpoAudioStream.types.ts:341
Callback function to handle audio features extraction results
Parameters
_
AudioAnalysisEvent
Returns
Promise
<void
>
onAudioStream()?
optional
onAudioStream: (_
) =>Promise
<void
>
Defined in: src/ExpoAudioStream.types.ts:338
Callback function to handle audio stream data
Parameters
_
Returns
Promise
<void
>
onRecordingInterrupted()?
optional
onRecordingInterrupted: (_
) =>void
Defined in: src/ExpoAudioStream.types.ts:361
Optional callback to handle recording interruptions
Parameters
_
Returns
void
outputDirectory?
optional
outputDirectory:string
Defined in: src/ExpoAudioStream.types.ts:364
Optional directory path where output files will be saved
sampleRate?
optional
sampleRate:SampleRate
Defined in: src/ExpoAudioStream.types.ts:296
Sample rate for recording in Hz (16000, 44100, or 48000)
segmentDurationMs?
optional
segmentDurationMs:number
Defined in: src/ExpoAudioStream.types.ts:332
Duration of each segment in milliseconds for analysis (default: 100)
showNotification?
optional
showNotification:boolean
Defined in: src/ExpoAudioStream.types.ts:314
Show a notification during recording (default is false)
showWaveformInNotification?
optional
showWaveformInNotification:boolean
Defined in: src/ExpoAudioStream.types.ts:317
Show waveform in the notification (Android only, when showNotification is true)
web?
optional
web:WebConfig
Defined in: src/ExpoAudioStream.types.ts:329
Web-specific configuration options