Package group.worldstandard.pudel.api.audio


package group.worldstandard.pudel.api.audio
Audio and voice connection management API.

This package provides interfaces for managing Discord voice connections, audio playback, and audio recording. Plugins can use these interfaces to implement music bots, voice recording, speech-to-text, and other audio features.

DAVE Requirement: Starting March 1st, 2026, all voice connections require DAVE (Discord Audio/Voice Encryption). Plugins MUST provide a DAVEProvider when connecting to voice channels.

Key Components:

Audio Playback Example:

VoiceManager voiceManager = context.getVoiceManager();

// Connect to voice channel
voiceManager.connect(guildId, voiceChannelId);

// Set audio provider
voiceManager.setAudioProvider(guildId, new MyAudioProvider());

Audio Receiving Example:

// Set audio receiver for recording
voiceManager.setAudioReceiver(guildId, new AudioReceiver() {
    @Override
    public void handleAudio(long userId, byte[] audioData) {
        // Process received audio
    }
});
Since:
2.3.0
  • Class
    Description
    Interface for providing audio data to Discord voice connections.
    Interface for receiving audio data from Discord voice connections.
    Interface for DAVE (Discord Audio/Voice Encryption) protocol implementation.
    Exception thrown when DAVE operations fail.
    Represents the status of a voice connection.
    Manager for voice connections and audio handling.