[][src]Module serenity::voice

A module for connecting to voice channels.

Structs

Audio

Control object for audio playback.

DcaMetadata
Handler

The handler is responsible for "handling" a single voice connection, acting as a clean API above the inner connection.

Manager

A manager is a struct responsible for managing Handlers which belong to a single Shard. This is a fairly complex key-value store, with a bit of extra utility for easily joining a "target".

Enums

AudioType
Bitrate
DcaError

An error returned from the dca method.

VoiceError

An error returned from the voice module.

Traits

AudioReceiver

A receiver for incoming audio.

AudioSource

A readable audio source.

Functions

dca

Creates a streamed audio source from a DCA file. Currently only accepts the DCA1 format.

ffmpeg

Opens an audio file through ffmpeg and creates an audio source.

ffmpeg_optioned

Opens an audio file through ffmpeg and creates an audio source, with user-specified arguments to pass to ffmpeg.

opus

Creates an Opus audio source. This makes certain assumptions: namely, that the input stream is composed ONLY of opus frames of the variety that Discord expects.

pcm

Creates a PCM audio source.

ytdl

Creates a streamed audio source with youtube-dl and ffmpeg.

ytdl_search

Creates a streamed audio source from YouTube search results with youtube-dl,ffmpeg, and ytsearch. Takes the first video listed from the YouTube search.

Type Definitions

LockedAudio

Threadsafe form of an instance of the Audio struct, locked behind a Mutex.