tools.auto_cover module
S.N.E.S. Auto-Cover Pipeline.
Full cover pipeline: YouTube rip -> lyrics lookup -> Suno cover. The LLM handles lyrics rewriting via the GAME ACTION injection. # 💀🔥 CORRUPTED COVER FREQUENCY PIPELINE
- async tools.auto_cover.run(youtube_url, song_info, style='', custom_themes='', rewritten_lyrics='', save_as='', ctx=None)[source]
Run the auto-cover pipeline up to the point the LLM takes over.
Entry point for the
auto_covertool. It orchestrates the three helper stages – rip the YouTube audio (_rip_youtube_audio), upload it to Discord for a fetchable URL (_upload_to_discord, deleting the temp mp3 and its directory immediately after), and look up the original lyrics (_lookup_lyrics) – then assembles a phase-tagged instruction payload rather than calling Suno itself. This is the GAME ACTION injection hand-off described in the module: the LLM reads the returnedinstructionand is expected to rewrite (or write) lyrics with Stargazer themes and then callgenerate_suno_musicwith the capturedaudio_urland style. The chosenphaseisready_for_sunowhenrewritten_lyricsis already supplied,rewrite_lyricswhen originals were found, orwrite_originalwhen no lyrics could be located. Touches the filesystem (temp files), the network (via the helpers), and the Discord channel throughctx.adapter.Dispatched by the tool loader as the
runhandler for theauto_covertool (the single-toolTOOL_NAME/runconvention); it is not called directly anywhere in the repo.- Parameters:
youtube_url (
str) – The YouTube link to rip and cover.song_info (
str) –Title - Artiststring used for the lyrics lookup and in the generated Suno title.style (
str) – Optional style override; defaults to the S.N.E.S.DEFAULT_STYLEpreset when empty.custom_themes (
str) – Optional extra theme notes appended to the rewrite instructions.rewritten_lyrics (
str) – Pre-rewritten lyrics; when present the rewrite step is skipped and the phase jumps straight to Suno.save_as (
str) – Optional name under which to save the resulting cover as a game asset; echoed back in the payload.ctx (
ToolContext|None) – The ToolContext supplying the channel ID and platform adapter.
- Return type:
- Returns:
A JSON string describing the pipeline result – the
phase, theaudio_url, the resolvedstyle, and aninstructionfor the next LLM step – or a JSONerrorobject if the context is missing or a stage failed.