AudioResourceOptions
Defined in: packages/voice/src/resource.ts:23
Options for createAudioResource.
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”effects?
Section titled “effects?”
optionaleffects?: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.
ffmpegPath?
Section titled “ffmpegPath?”
optionalffmpegPath?:string
Defined in: packages/voice/src/resource.ts:31
FFmpeg executable. Default "ffmpeg".
inlineVolume?
Section titled “inlineVolume?”
optionalinlineVolume?: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.
inputType?
Section titled “inputType?”
optionalinputType?:StreamType
Defined in: packages/voice/src/resource.ts:25
What the input holds. Default: from the file extension (.ogg/.opus/.pcm), otherwise "arbitrary".
optionallive?: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.
metadata?
Section titled “metadata?”
optionalmetadata?:T
Defined in: packages/voice/src/resource.ts:29
Anything you want to keep with the resource (a title, who queued it).
prefetch?
Section titled “prefetch?”
optionalprefetch?:number
Defined in: packages/voice/src/resource.ts:33
Frames read ahead of playback. Default 10 (200 ms); 1 when live.