Audio API #5389
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!5389
Loading…
Reference in a new issue
No description provided.
Delete branch "benno1237/audio_api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Semi) Functional API for Red's audio cog
this is proof of concept PR and is far from being ready to review yet. I am however more than happy about any comments/suggestions/contributions. It's quite a lot of code so expect some things to break please. I will thoroughly test this in the near future and hopefully eliminate each and every issue.
Since it is just a draft PR for now, I also didn't really care about code style tools like isort and black.
Yes, it adds 10k+ lines. Atm, there is heaps of duplicated code in the API and core audio. My idea was however to keep the initial PR as "small" as somehow possible. Thus core audio only has the changes which are needed in order for it to work (hopefully?). IF an interest exists however, I will go ahead and rewrite the majority of core audio to use the functionality provided by this API.
Semi good docs of what it includes can be seen here: https://red-discordbot-audio.readthedocs.io/en/latest/framework_audio.html
Please, ignore the messy commit history.
Hey Benno,
First off I just want to say thank you for doing this. It's great to be able to hook into audio and I'll be honest, I was surprised when my simple piece of code worked first time!
I've just got a few things as review comments for the example.
The API itself is working great, so far I have a podcasts cog over at Vexed01/vex-unsupported-cogs which functions.
However, I've noticed some of the core audio commands don't appear to work.
llset javaandllset externaldon't respond and neither doesplayorsing.nowskipstopdisconnectdo work for me. I'm running the latest version (as of midday 4th Jan) with external lavalink on 1275.I also sometimes get this whenever I start my bot:
I also got this on my cog; the fix was
await bot.wait_until_red_ready()in a task before initializing the connection. You might want to add this to the example as well as Red.@ -0,0 +1,186 @@.. config shiteAgain, thanks for your effort Vexed. You were right, the sing command wasn't working. Latest commit has a few changes which did fix it for me tho. The play command however was working for me beforehand too. Would be nice to further elaborate on that (or did the last commit fix that for you?).
Thanks for your docs changes too. Did them manually in my IDE so... should be all present in the latest commit
Talked about this in Discord. Everything I've tried now works for me, this gets a big 👍 for functionality.
Hey, first of all thanks a lot for this PR, it's great to be able to extend Audio's features while staying compatible with the cog, and I have been waiting for this, so I was excited to try it out!
This PR is big, and I want to test it properly on my bot. I will explain what I'm gonna do in the following days/months:
Our blind test events
I wanted to try the API by writing a blind test cog. If you don't know, a blind test is basically throwing some songs with the bot, and people have to try to guess the music first.
We use the Audio cog for these events a lot and it's working well. However, it's a horrible mess to manage, we usually need one animator who does the talk, and someone else for managing the bot. Imagine the following situation :
Mix the command mess, the moderation in that active channel, the talking, watching for answers, writing the scores in a separate doc, also finding the next song link... And that's how we currently manage blind tests, a lot of work that could be simplified.
The blind test cog
So I had the idea of making things easier with the bot for long, but the components and audio API are what motivated me to finally do it!
It's a player. With buttons. You load a playlist, then you shall only have to use buttons, and no one talks/enter commands.
Here's a demo video. I know, it's french, but you should mostly understand it. (Buttons when clicking on the menu mean: bumpskip, bump, remove, insert song after x).
https://user-images.githubusercontent.com/23153234/150119026-9c8e269e-a68b-4273-b360-ffa738879446.mp4
The issues I had so far
Lot of them. Then none. If you saw my conversation on Discord, you saw that I had some issues, well I couldn't reproduce any of them :P
I will report what I have in the future, but for now it's pretty stable, and I can fall back to the Audio cog's commands easily. I guess the issues caused in the beginning were due to my intense testing and let lavalink in a weird state.
How things will go
I'm gonna move Botnol (99 servers, handles a 27k members server alone) to dpy2 and audio API from now on for Audio features, and will report issues, both from the API and the Audio cog.
This is just a comment review, but things started well! If it's still stable after some time, I will approve the PR and comment the experience I had. Thanks a lot for your hard work, I hope this will be merged soon!
Oh btw, I published my blind test cog, you can see it here : https://github.com/laggron42/Laggrons-Dumb-Cogs/tree/blind_test/alpha/blindtest
@ -0,0 +1,231 @@import asyncioHey Benno, just noticed this when external Lavalink is configured but unavailable:

Ich schließe den PR: Er umfasst über 10.000 geänderte Zeilen in 84 Dateien, stammt von 2021 und hat massive Konflikte mit dem heutigen Audio-Cog (Lavalink-v4-Umbau, Java-Versionen, neue Managed-Node-Logik). So ist er weder reviewbar noch portierbar. Eine Audio-API müsste neu und in kleinen Schritten gegen den aktuellen Code entstehen.
Generated by Claude Code
Pull request closed