> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Recording & Audio

> JavaScript API reference for Recording & Audio.

## RecordingConfig

Configure session recording (audio, video, transcript, and upload). See RecordingConfigOptions.

### Constructor

```typescript theme={null}
new RecordingConfig(opts: RecordingConfigOptions)
```

<ParamField path="enabled" type="boolean">
  Master switch for session recording. Defaults to `false`.
</ParamField>

<ParamField path="autoStart" type="boolean">
  Start recording automatically when the session begins. Defaults to `true`.
</ParamField>

<ParamField path="format" type="'wav' | 'ogg_opus' | 'mp3' | 'flac'">
  Output audio format. Defaults to `'ogg_opus'`.
</ParamField>

<ParamField path="channelMode" type="'mixed' | 'dual_channel'">
  `'mixed'` for a single combined track, `'dual_channel'` to separate participants. Defaults to `'dual_channel'`.
</ParamField>

<ParamField path="sampleRate" type="number">
  Output sample rate in Hz. Defaults to `0` (use source rate).
</ParamField>

<ParamField path="bitrateKbps" type="number">
  Output bitrate in kbps for compressed formats. Defaults to `0` (codec default).
</ParamField>

<ParamField path="storage" type="S3StorageConfig | null">
  Where to upload the recording. Defaults to `null` (default storage). See S3StorageConfig.
</ParamField>

<ParamField path="transcript" type="RecordingTranscriptConfig | null">
  Transcript settings. Defaults to `null` (no transcript). See RecordingTranscriptConfig.
</ParamField>

<ParamField path="maxDurationSeconds" type="number">
  Maximum recording length in seconds. Defaults to `0` (no limit).
</ParamField>

<ParamField path="maxFileSizeMb" type="number">
  Maximum recording file size in MB. Defaults to `0` (no limit).
</ParamField>

<ParamField path="recordingBeep" type="boolean">
  Play a beep to indicate recording is active. Defaults to `false`.
</ParamField>

<ParamField path="redactDtmf" type="boolean">
  Mute DTMF tones in the recording. Defaults to `false`.
</ParamField>

<ParamField path="customMetadata" type="Record<string, string>">
  Custom metadata stored with the recording.
</ParamField>

<ParamField path="recordingName" type="string">
  Human-readable name for the recording. Defaults to `''`.
</ParamField>

<ParamField path="recordingGroup" type="string">
  Group/label used to bucket related recordings. Defaults to `''`.
</ParamField>

<ParamField path="applyDenoise" type="boolean">
  Apply denoising to recorded audio. Defaults to `false`.
</ParamField>

<ParamField path="normalizeAudio" type="boolean">
  Normalize recorded audio loudness. Defaults to `false`.
</ParamField>

<ParamField path="trimSilence" type="boolean">
  Trim leading/trailing silence. Defaults to `false`.
</ParamField>

<ParamField path="recordVideo" type="boolean">
  Record participant video. Defaults to `false`.
</ParamField>

<ParamField path="recordScreenShare" type="boolean">
  Record screen-share video. Defaults to `false`.
</ParamField>

<ParamField path="recordScreenAudio" type="boolean">
  Record screen-share audio. Defaults to `false`.
</ParamField>

***

## S3StorageConfig

Configure an S3 (or S3-compatible) destination for recording uploads. See S3StorageConfigOptions.

### Constructor

```typescript theme={null}
new S3StorageConfig(opts: S3StorageConfigOptions)
```

<ParamField path="bucket" type="string">
  Target S3 bucket name.
</ParamField>

<ParamField path="region" type="string">
  AWS region of the bucket.
</ParamField>

<ParamField path="prefix" type="string">
  Key prefix prepended to uploaded objects.
</ParamField>

<ParamField path="accessKeyId" type="string">
  AWS access key id. Leave empty to use the default configured credentials.
</ParamField>

<ParamField path="secretAccessKey" type="string">
  AWS secret access key.
</ParamField>

<ParamField path="sessionToken" type="string">
  Temporary session token for STS credentials.
</ParamField>

<ParamField path="endpointUrl" type="string">
  Custom S3-compatible endpoint URL (for non-AWS providers).
</ParamField>

<ParamField path="storageClass" type="string">
  S3 storage class (e.g. `STANDARD`, `STANDARD_IA`).
</ParamField>

<ParamField path="serverSideEncryption" type="string">
  Server-side encryption mode (e.g. `AES256`, `aws:kms`).
</ParamField>

<ParamField path="kmsKeyId" type="string">
  KMS key id used when `serverSideEncryption` is `aws:kms`.
</ParamField>

<ParamField path="acl" type="string">
  Canned ACL applied to uploaded objects.
</ParamField>

<ParamField path="multipartUpload" type="boolean">
  Whether to use multipart upload for large objects. Defaults to `true`.
</ParamField>

<ParamField path="multipartPartSizeMb" type="number">
  Part size in MB for multipart uploads. Defaults to `8`.
</ParamField>

<ParamField path="uploadTimeoutSeconds" type="number">
  Per-upload timeout in seconds. Defaults to `0` (no limit).
</ParamField>

<ParamField path="maxRetryAttempts" type="number">
  Number of upload retry attempts. Defaults to `3`.
</ParamField>

<ParamField path="tags" type="Record<string, string>">
  Object tags to attach to uploads.
</ParamField>

<ParamField path="userMetadata" type="Record<string, string>">
  Custom `x-amz-meta-*` metadata to attach to uploads.
</ParamField>

<ParamField path="contentTypeOverride" type="string">
  Overrides the auto-detected `Content-Type`.
</ParamField>

***

## RecordingTranscriptConfig

Configure transcript generation for a recording. See RecordingTranscriptConfigOptions.

### Constructor

```typescript theme={null}
new RecordingTranscriptConfig(opts: RecordingTranscriptConfigOptions)
```

<ParamField path="enabled" type="boolean">
  Whether to produce a transcript alongside the recording. Defaults to `false`.
</ParamField>

<ParamField path="format" type="'json' | 'srt' | 'vtt'">
  Transcript file format. Defaults to `'json'`.
</ParamField>

<ParamField path="includeWordTimestamps" type="boolean">
  Include per-word timestamps. Defaults to `false`.
</ParamField>

<ParamField path="includeConfidence" type="boolean">
  Include per-segment confidence scores. Defaults to `false`.
</ParamField>

<ParamField path="speakerLabels" type="boolean">
  Label each segment with its speaker. Defaults to `true`.
</ParamField>

<ParamField path="language" type="string">
  Transcript language hint (BCP-47 code). Defaults to `''` (auto-detect).
</ParamField>

***

## RecordingOptions

Configure which media a room recording captures. See RecordingOptionsInit.

### Constructor

```typescript theme={null}
new RecordingOptions(init: RecordingOptionsInit)
```

<ParamField path="video" type="boolean">
  Record participant video. Defaults to `false`.
</ParamField>

<ParamField path="screenShare" type="boolean">
  Record screen-share. Defaults to `false`.
</ParamField>

***

## RecordingFormat

Container/codec for a call recording.

```typescript theme={null}
enum RecordingFormat {
  WAV = 'wav',
  OGG_OPUS = 'ogg_opus',
  MP3 = 'mp3',
  FLAC = 'flac',
}
```

***

## RecordingChannelMode

Channel layout for a call recording.

```typescript theme={null}
enum RecordingChannelMode {
  MIXED = 'mixed',
  DUAL_CHANNEL = 'dual_channel',
}
```

***

## RecordingTranscriptFormat

Output format for a recording's transcript.

```typescript theme={null}
enum RecordingTranscriptFormat {
  JSON = 'json',
  SRT = 'srt',
  VTT = 'vtt',
}
```

***

## RecordingState

Current state of a recording, reported via recording status events.

```typescript theme={null}
enum RecordingState {
  IDLE = 'idle',
  RECORDING = 'recording',
  FINALIZING = 'finalizing',
  UPLOADING = 'uploading',
  COMPLETED = 'completed',
  FAILED = 'failed',
}
```

***

## BackgroundAudioHandlerConfig

Create a BackgroundAudioHandlerConfig.

### Constructor

```typescript theme={null}
new BackgroundAudioHandlerConfig(opts: BackgroundAudioHandlerConfigOptions)
```

<ParamField path="file" type="string">
  Path to the audio file to play. Default: `''`.
</ParamField>

<ParamField path="volume" type="number">
  Playback volume multiplier, where 1.0 is the original level. Default: `1.0`.
</ParamField>

<ParamField path="looping" type="boolean">
  Whether to loop the file continuously. Default: `false`.
</ParamField>

<ParamField path="enabled" type="boolean">
  Whether background audio is active. Default: `true`.
</ParamField>

<ParamField path="mode" type="BackgroundAudioMode">
  Playback vs. mixing behavior. Default: `'mixing'`.
</ParamField>

<ParamField path="chunkSize" type="number">
  Number of audio samples per processing chunk. Default: `320`.
</ParamField>
