Application case study · Local build, 1.0
Refrain
A local editor for replacing lyrics in an existing song recording.
The problem
Changing lyrics in a recording while retaining its accompaniment, melody, and phrasing requires coordinating transcription, vocal generation, and audio mixing.
The solution
Refrain separates and transcribes an uploaded recording, guides replacement vocals with the source performance, and mixes edits back into the song.
Visual demonstration
Technical implementation
A loopback Flask editor and command-line interface share a staged Python pipeline for audio decoding, stem separation, transcription, musical analysis, lyric alignment, singing, and reconstruction. Local project manifests and cached artifacts support resuming work and comparing takes. The default singer uses a synthetic house reference; source-voice conditioning is an explicit permission choice.
Challenges & lessons learned
The documented evaluation highlights the difficulty of aligning sung words: recognition timing is approximate, mismatched syllables can sound rushed, and intelligibility varies by passage. The editor provides timing corrections and warnings, while boundary blends and gain matching address transitions in the mix.
Refrain is designed for local inference and keeps project audio on the user’s machine. Its best-tested case is English lyrics with a clear lead melody; transcription, timing, and vocal quality can vary with the recording. The Twinkle screenshots show a candidate using the synthetic house voice.



