Flagship 04 / 04Offline Android music player + on-device AI

Swara

A music player that never asks for the internet.

Swara Deck player in the Swara theme, with placeholder track details
Swara theme, recoloured preview
Before
Music apps that want an account and a connection.
What I built
An offline player with AI that runs on the phone.

Swara plays the music already on your phone, with no account. A small neural network strips vocals live for karaoke, voice commands are transcribed on the device, and Vibe Mode, mixes and Wrapped recaps are all computed locally. Plain Java on Media3 and Room.

~23mskaraoke latency added
8colour themes
Nointernet permission
Visit site ↗ View on GitHub ↗ All my work ↗
RoleSolo: product design and engineering
JavaMedia3 / ExoPlayerRoomMVVMONNX RuntimePyTorchGitHub Actions
(00) DemoPress play
(01) The playerInteractive

NOW PLAYINGSWARA
Raag Yaman, Alaap
Local library
ColorTheme.java / 8 themes

Eight themes, light and dark.

Each theme has its own accent in both modes. Pick one: the player, the glow and the controls re-tint, as they do in the app.

(02) ArchitectureMVVM, single source of truth

I skipped Kotlin and Compose because I wanted to learn what the Android framework does underneath. Playback lives in the service, data lives in the repository, and the screens only observe; when something breaks I know which layer to open.

UIActivitiesFragmentsRecyclerViewLiquid Glass views
ViewModelMusicViewModelLiveDataPlayback state
ServiceSwaraPlaybackServiceMedia3 sessionExoPlayerKorokae processor
RepositoryMusicRepositoryArtwork engine
DataRoomMediaStoreSharedPreferences
(03) FeaturesWhat the app does
01

Korokae karaoke

A small streaming network removes vocals inside the audio pipeline. No rendered files, about 23 ms of added latency.

02

Voice commands

Tap Hey Swara and ask to play a song, artist or album, pause or skip. Speech is transcribed on the phone.

03

Vibe Mode and Autoplay

Mood is estimated from the audio on the device, and the queue keeps going with songs that fit.

04

Swara Wrapped

Monthly and yearly recaps as story slides you can share or save as a video, counted on the phone.

05

Equalizer and sleep timer

An in-app equalizer, plus a sleep timer with presets or end of song.

06

Landscape and widgets

A landscape layout with a navigation rail, and horizontal and vertical home-screen widgets.

(04) The modelKorokae

The vocal-removal network is trained and exported in PyTorch, then runs inside a Media3 audio processor. A parity test checks that the Java engine matches PyTorch. The weights carry non-commercial MUSDB18 terms.

// Korokae
STFT: 1024 window, 512 hop
Linear 513 to 256, ReLU
causal GRU(256) x 2
Linear 256 to 513, sigmoid mask