The audio generation step: prompts, takes, and hard proof
Most people think the audio generation step starts with a text prompt and ends with a music file. In our pipeline, that would be reckless. We run an autonomous YouTube channel. A failed upload costs a day. So we treat audio generation as a factory process, not a creative chat. The step receives a JSON brief from the signal analysis step. That brief already contains a genre, a mood range, a key, a target BPM, a song structure, and sometimes lyrics. It is precise enough that the model has no room to wander.
Converting that JSON into a prompt is an art. Suno does not accept JSON. It wants plain text. We build a style block with terms like 'warm analog synth,' 'tight drums near the back,' and 'male vocal with a cracked edge.' We add a tempo phrase like '120 BPM.' We insert the lyrics, but not as one block. We split them with [Verse], [Chorus], and [Bridge]. This pushes Suno to follow a structure. We also set the song title, because Suno uses it as a semantic anchor. The whole thing becomes one long text prompt.
Then we fire off calls. Usually four to eight takes. Suno’s API is asynchronous, so we poll until the batch is ready. Each take comes back as a partial file. Sometimes Suno returns a 30 second clip when we asked for two minutes. Sometimes the file is corrupted. We do not inspect those directly. We let the next checks catch them. The evaluation loop is where the real work happens.
Every candidate is decoded to raw PCM. That alone catches many failures. We check sample rate and channel count. We measure loudness using a LUFS meter. A track that is louder than -7 LUFS is already too distorted for YouTube’s loudness normalization. We also look at true peak. If it goes over -1 dBTP, it is rejected. We run a tempo detector and compare it to the requested BPM. Two percent error is the maximum, but we usually see less. Then we analyze the key. If the brief says D minor and the track is in E flat minor, we reject it. Wrong key will clash with the reference track in the video.
Technical checks do not prove that the vocals are right. We run a speech-to-text model on the vocal stem. Then we compare the transcript to the original lyrics. We are not expecting a perfect transcript. Suno models love to slur words. Instead, we look for the hook. If the chorus lyric phrase does not appear, the take is pointless. We also confirm that any words Suno added on its own are not offensive or copied from another song. For instrumental requests, we run the same transcription and check that no words appear. A random humming vocal is a rejection.
Takes that pass the previous checks go to a ranking model. We train that model on public performance data from connected channels. It is small. It uses features from the audio itself: time to the first beat drop, spectral centroid, average vocal pitch confidence, and energy in the low-mids. The model looks at what those features meant for the channel's past watch time and retention. It then scores each take. The highest score is promoted. The remaining takes are deleted immediately. That keeps storage small and prevents accidental mixing of versions.
The selected file now needs a proof of identity. We compute a SHA-256 hash of the final audio. That hash goes into the release manifest. We also generate a beat grid with exact timestamps for every beat, from the first downbeat to the last. The grid becomes the sync reference for the video renderer. The hash becomes the truth for the muxer. If a later stage encounters a file with that hash, it knows it is the one we approved. If the file differs, the hash fails and the pipeline stops. No ifs.
The last output of the stage is a rejection log. Every failed take leaves a reason. That log goes back to the prompt builder, not as punishment but as memory. It makes the next run better. It also feeds the signal analysis stage for the following release. If Suno starts drifting toward brighter mixes, the log will show it. We will see the pattern before it reaches the channel. That is the point of this step. It is not just a call to an API. It is a checkpoint that shapes, checks, selects, and signs.