API Reference#

Global#

avcord.setup_av(name_module)#

Setup PyAV audio sources by importing discord module

Parameters

name_module (str) – Module want to be imported (must from discord.py, disnake, or pycord package)

avcord.setup_encoder(vc)#

Use PyAV opus encoder instead of native opus encoder for given VoiceClient

It is highly recommended to call this function before playing audio in given VoiceClient. To avoid “Segmentation fault” error when playing PyAV audio sources.

Parameters

vc (VoiceClient) – Connected voice client

avcord.AVPCMAudio(url)#

PyAV PCM audio source

The source will take and convert to pcm audio.

Parameters

url (str) – web or file URL location to stream

avcord.AVOpusAudio(url)#

PyAV Opus audio source

The source will take and convert to opus audio.

Parameters

url (str) – web or file URL location to stream