Skip to the content.

Version 3.1 (2024-03-24)

Added

Code Additions

These are utilized in the implementation of the song command to handle audio data and interact with streaming content.

@commands.command(name='song')
async def get_current_song(self, ctx):
    await ctx.send("Please stand by, checking what song is currently playing...")
    try:
        song_info = await get_song_info_command()
        await ctx.send(song_info)
    except Exception as e:
        chat_logger.error(f"An error occurred while getting current song: {e}")
        await ctx.send("Sorry, there was an error retrieving the current song.")

Functions Added for Song Command

async def get_song_info_command():
    # Function implementation
async def get_song_info():
    # Function implementation
async def twitch_gql_token_valid():
    # Function implementation
async def detect_song(raw_audio_b64):
    # Function implementation
async def convert_to_raw_audio(in_file, out_file):
    # Function implementation
async def record_stream(outfile):
    # Function implementation