An experimental module to bring native performance to voice sending.
- Rust v1.45+
- The stuff in Cargo.toml, requirements.txt and requirements-dev.txt
A working Rust compiler with rustc
and cargo
is required to build this package.
To build and install the package, do the following:
pip install -U -r requirements-dev.txt
pip install -U .
The compilation and Rust package resolution will be automatically handled by setuptools-rust
.
This voice implementation operates using the discord.py VoiceProtocol
interface.
To use it, pass the class into VoiceChannel.connect
:
from discord.ext.native_voice import VoiceClient
...
client = await voice_channel.connect(cls=VoiceClient)
client.play("audio.mp3")
The interface imitates the standard VoiceClient, but it is implemented natively in Rust.
MIT or Apache-2