Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion guide/voice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

### Barebones

To add voice functionality to your discord.js bot, you will need the `@discordjs/voice` package, as well as one of the encryption packages listed below. For example:
To add voice functionality to your discord.js bot, you will need the `@discordjs/voice` package. If your system does not support aes-256-gcm you also need one of the encryption packages listed below. For example:

::: tip
You can verify aes-256-gcm support by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`.
:::

:::: code-group
::: code-group-item npm
Expand Down Expand Up @@ -50,6 +54,8 @@ This guide assumes you have installed at least one additional dependency – FFm
- [`sodium-native`](https://www.npmjs.com/package/sodium-native)
- [`libsodium-wrappers`](https://www.npmjs.com/package/libsodium-wrappers)
- [`tweetnacl`](https://www.npmjs.com/package/tweetnacl)
- DAVE Protocol Support
- [`@snazzah/davey`](https://www.npmjs.com/package/@snazzah/davey) - to enable end-to-end encryption with the DAVE protocol.

::: tip
Outside a development environment, it is recommended for you to use `@discordjs/opus` and `sodium` to improve performance and improve the stability of audio playback!
Expand Down Expand Up @@ -88,6 +94,10 @@ bun add --global --production --add-python-to-path windows-build-tools
</CodeGroup>
:::

::: warning
Some Discord clients already require the DAVE protocol for end-to-end encryption in voice chat. Ensure you have `@snazzah/davey` installed to avoid compatibility issues, as `@snazzah/davey` is only set as a dev-dependency for `@discordjs/voice` and may not install in production environments without explicit installation.
:::

## Debugging Dependencies

The library includes a helper function that helps you to find out which dependencies you've successfully installed. This information is also very helpful if you ever need to submit an issue on the `@discordjs/voice` issue tracker.
Expand Down Expand Up @@ -115,6 +125,9 @@ Encryption Libraries
FFmpeg
- version: 4.2.4-1ubuntu0.1
- libopus: yes

DAVE Protocol
- @snazzah/davey: 0.1.6
--------------------------------------------------
*/
```
Expand All @@ -128,3 +141,5 @@ FFmpeg
- **FFmpeg**
- If you want to play audio from many different file types, you will need to have FFmpeg installed.
- If `libopus` is enabled, you will be able to benefit from increased performance if real-time volume alteration is disabled.
- **DAVE Protocol**
- Required for enabling end-to-end encryption in voice channels.