dico.voice.audio module
AudioBase structure is from discord.py’s AudioSource. https://github.com/Rapptz/discord.py/blob/master/discord/player.py#L71 LICENSE(MIT): https://github.com/Rapptz/discord.py/blob/master/LICENSE
- class dico.voice.audio.AudioBase
Bases:
ABCBase structure of the audio.
- abstract read()
This should read 20ms of the audio.
- Returns:
bytes
- static is_opus()
Whether this is already opus.
- cleanup()
Optionally clean up before destroying this audio instance.
- class dico.voice.audio.Audio(src)
Bases:
AudioBaseAudio for playing from file or URL.
- Parameters:
src (Union[str, Path]) – Source of the audio.
- Variables:
~.process (subprocess.Popen) – FFmpeg process for processing source.
~.volume (float) – Volume of the audio.
- read()
Reads 20ms of audio from source.
- Returns:
bytes
- cleanup()
Cleans up subprocess.