DiscordVoiceConfig
Configuration options for the DiscordVoice provider.
Defined in: src/providers/io/discord/DiscordVoice.ts:311
Configuration options for the DiscordVoice provider.
Remarks
There is no apiKey — authentication is handled entirely by the discord.js client the application owns. The provider only needs the already-authenticated VoiceConnection.
Example
const discord = new DiscordVoice({
userId: '187642154529521664', // optional: lock capture to one speaker
silenceDurationMs: 1000,
debug: true,
});
See
DiscordVoice for the provider class
Properties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
connection? | DiscordVoiceConnection | undefined | Voice connection to attach at initialize time. Remarks Alternatively call attach() later — useful when the bot joins the channel after the pipeline is initialized. | src/providers/io/discord/DiscordVoice.ts:319 |
debug? | boolean | false | Whether to enable debug logging for this provider. | src/providers/io/discord/DiscordVoice.ts:349 |
silenceDurationMs? | number | 1000 | Milliseconds of silence after which a user’s receive stream ends. Remarks Passed to receiver.subscribe() as { end: { behavior: EndBehaviorType.AfterSilence, duration } }. The provider automatically re-subscribes the next time the user speaks. | src/providers/io/discord/DiscordVoice.ts:342 |
userId? | string | undefined | Lock audio capture to a single Discord user id. Remarks When omitted, the provider subscribes to every user who speaks. Overlapping speech from multiple users interleaves in the emitted chunk stream (no mixing is performed), which can confuse STT — set userId for one-on-one conversations. | src/providers/io/discord/DiscordVoice.ts:330 |