Skip to content

AudioResourceOptions

Defined in: packages/voice/src/resource.ts:23

Options for createAudioResource.

T = unknown

optional effects?: AudioEffect[]

Defined in: packages/voice/src/resource.ts:39

PCM effects (pitchShift, robot, echo, gain, or your own), run in order on every frame. Like inlineVolume, they decode and re-encode. resource.effects can be changed while it plays.


optional ffmpegPath?: string

Defined in: packages/voice/src/resource.ts:31

FFmpeg executable. Default "ffmpeg".


optional inlineVolume?: boolean

Defined in: packages/voice/src/resource.ts:27

Allow resource.volume.set(). Decodes and re-encodes Opus input, so it costs CPU. Default false.


optional inputType?: StreamType

Defined in: packages/voice/src/resource.ts:25

What the input holds. Default: from the file extension (.ogg/.opus/.pcm), otherwise "arbitrary".


optional live?: boolean

Defined in: packages/voice/src/resource.ts:45

A live source (a user’s voice from receiver.subscribe()): the player waits for it without counting missed frames, and frames that pile up beyond 100 ms are dropped to keep the delay low. Default false.


optional metadata?: T

Defined in: packages/voice/src/resource.ts:29

Anything you want to keep with the resource (a title, who queued it).


optional prefetch?: number

Defined in: packages/voice/src/resource.ts:33

Frames read ahead of playback. Default 10 (200 ms); 1 when live.