- Introduction
- Features
- How It Works
- Technologies Used
- Installation
- Usage Guide
- Screenshots
- Building From Source
- Running Tests
- Contributing
- Contributors
- Support the Project
- License
FrontLine Lyrics is a always-on-top overlay for Windows that listens to whatever is playing on your system and shows synced lyrics in real time, Spotify, YouTube, Apple Music, a local media player, or anything else that comes out of your speakers.
It works two ways, it can automatically follow the track info exposed by Windows' native media session (title, artist, playback position), and it can also listen to your system audio directly and recognize the song with Shazam, so it still works with sources that don't expose media metadata at all.
- Automatic track detection: via Windows Media Session (SMTC) reads title, artist and playback position straight from any compatible player, with no manual input.
- Audio-fingerprint recognition: as a fallback/primary source, records a snippet of system audio (WASAPI loopback) and identifies the song with Shazam.
- Auto mode: continuously re-listens and re-syncs as tracks change, with adaptive retry backoff and a cooldown guard against false "previous track" triggers.
- Synced lyrics display: an always-on-top, transparent, draggable overlay window that scrolls lyrics in time with the music.
- Pause-aware sync: pausing the track pauses the lyrics scroll too, so everything stays perfectly aligned when playback resumes.
- Live translation: translate the displayed lyrics into English, Spanish, French, Portuguese, or a romanized transliteration, resolved in parallel across multiple translation backends for reliability.
- Manual search: look up lyrics and cover art by artist/song name when you'd rather not rely on auto-detection.
- Playback shortcuts: previous/next track controls built right into the lyrics view, plus manual sync-time adjustment, all without leaving the overlay.
- Customizable overlay: adjustable font size and a compact/expanded layout.
- Multi-language UI: interface available in English, Portuguese, and Spanish.
FrontLine Lyrics is split into two cooperating processes:
FrontlineServer(Python, headless) — the audio/recognition engine. It captures system audio via WASAPI loopback, talks to the Windows Media Session API for auto-follow, fingerprints audio snippets with Shazam, fetches synced lyrics from LRCLIB, and runs translations. It's packaged as a standalone.exewith PyInstaller and exposes a local WebSocket server.FrontLineOverlay(C# / WPF) — the visible overlay window. It launches the Python server as a child process on startup and communicates with it exclusively over the WebSocket, sending commands (LISTEN,AUTO_TOGGLE,TRANSLATE,MANUAL_SEARCH, etc.) and receiving live state broadcasts to render.
| Layer | Stack |
|---|---|
| Desktop overlay | C#, WPF (.NET) |
| Backend / audio engine | Python 3.13, asyncio, websockets |
| Audio capture | pyaudiowpatch (WASAPI loopback) |
| Song recognition | shazamio |
| Lyrics source | LRCLIB |
| Translation | deep-translator, translators (parallel multi-backend resolution) |
| Media metadata (auto-follow) | Windows Runtime — GlobalSystemMediaTransportControlsSessionManager via winrt |
| Packaging | PyInstaller (server), MSIX (Microsoft Store) |
| Testing | pytest, pytest-asyncio, pytest-mock, requests-mock |
The easiest way to install FrontLine Lyrics is through the Microsoft Store:
- Launch FrontLine Lyrics, the overlay appears on top of your other windows.
- Play music in any app (Spotify, browser, local player, etc.).
- Click LISTEN to start automatic recognition/follow, or toggle AUTO to keep it continuously syncing as tracks change.
- Use SEARCH to look up lyrics by artist and song name directly.
- Use the translation toggles (Orig / Rom / EN / ES / FR / PT) to switch how the lyrics are displayed.
- Adjust font size, drag the window anywhere, and use the previous/next track buttons to control playback without leaving the overlay.
| Home screen | Listening | Synced lyrics |
|---|---|---|
| The initial screen when you open the overlay | Recognizing what's currently playing | Lyrics scrolling in sync with the music |
Want to tinker with the code or build your own copy? Here's how:
- Clone the repository:
git clone https://github.com/juliocax/FrontLine-Lyrics-Desktop.git - Open Visual Studio and make sure the .NET desktop development workload (which includes WPF tooling) is installed.
- Open
Frontline.slnin Visual Studio. - Set
Frontlineas the startup project and run it.
If you make changes to the Python backend (FrontlineServer), you'll also need to rebuild the standalone executable and swap it into the C# project so Frontline picks up your changes:
- From the
FrontlineServerfolder, rebuild the.exewith PyInstaller:pyinstaller --noconfirm --onedir --windowed --collect-all anyascii --collect-all winrt \ --hidden-import winrt.windows.media.control --hidden-import winrt.windows.storage.streams \ --hidden-import engine --hidden-import engine.crash_guard --hidden-import engine.media_session \ --hidden-import engine.music_manager --hidden-import engine.audio_capture \ --hidden-import engine.recognition --hidden-import engine.lyrics --hidden-import engine.cover_art \ --hidden-import engine.translation --hidden-import engine.smtc_policy --hidden-import engine.tuning \ --hidden-import engine.task_utils --hidden-import engine.workers --hidden-import engine.ws_server \ --name "FrontlineServer" "FrontlineServer.py" - From the
distfolder created by PyInstaller, copy the_internalfolder andFrontlineServer.exe, and use them to replace the existing ones inFrontline/FrontlineServer. - Run the
Frontlineproject again — it will launch your updated server automatically.
The Python backend (FrontlineServer/engine) has a pytest suite covering the pure logic modules (SMTC clock-trust heuristics, lyrics parsing/matching, translation racing, cover art caching, MusicManager state helpers) with all external network calls mocked, so the tests run offline and don't touch Shazam, LRCLIB, Deezer or the translation backends for real.
- From the
FrontlineServerfolder, install the runtime and test dependencies:pip install -r requirements.txt pip install -r requirements-dev.txt - Run the suite:
Or, from the repository root:
pytestpytest FrontlineServer/tests/
Tests run automatically on every pull request via GitHub Actions (see .github/workflows/python-tests.yml).
Contributions are welcome! Before opening a pull request:
- Read CONTRIBUTING.md for how the project is organized, how to get set up on either side, and how to run the test suite.
- This project follows the Code of Conduct, please read it before participating in issues, PRs, or discussions.
See CONTRIBUTORS.md for the full list of people who have contributed code to this project.
If FrontLine Lyrics is useful to you, consider buying me a coffee.
Distributed under the MIT License. See LICENSE for more information.



