Urgent.News

What's breaking now, across thousands of outlets.

Tech

How I Turned My Idle RTX 4060 into the Backend for a Free Audio Separation Website

I had an RTX 4060 in my Windows PC that wasn’t getting much gaming time. Instead of leaving it idle, I connected it to a website. The result is UVR Online: users upload a song, choose a separation model, then listen to and download the separated tracks. The website runs in the cloud. The actual audio inference runs on my local computer in China, serving users around the world. I didn’t need a…

An idle RTX 4060 graphics card was repurposed to serve as the backend for a free audio separation website called UVR Online. Users could upload songs, select a separation model, and download the separated tracks. The website operated in the cloud, while the audio inference ran on the local computer in China. No public IP address or port forwarding was required at the home location.

The architecture consisted of several components: the browser for uploading and downloading audio files, Cloudflare R2 for private storage, a Next.js interface and Next.js for task pages and audio players, a Go API for task creation, permissions, upload authorization, and coordination between workers, PostgreSQL for task state management, Redis for rate limiting, Cloudflare R2 for holding private input and output files, and Python, PyTorch CUDA, FFmpeg for audio validation, separation, and encoding locally.

The separation engine used existing models from the UVR ecosystem and headless inference code. The local PC would pull work from the cloud server, which communicated with the home computer using outbound HTTPS requests. Each task involved downloading the input using a signed URL, checking the audio with ffprobe, running the selected model on the GPU, encoding and uploading the results to R2, and reporting completion to the API.

The browser also uploaded directly to R2, keeping large audio files out of the application server's data path. To handle incomplete tasks, claimed tasks had a lease and an attempt token. The Worker renewed the lease while the task was being worked on, and if the lease expired, the server could requeue the task within its retry limit. Claiming tasks was atomic in PostgreSQL, and completion was idempotent.

The bottleneck during the project proved to be file transfer, particularly over a slow VPN route. The size of the audio files also played a significant role, with larger MP3s expanding into much bigger uncompressed tracks. Therefore, the export format became an important infrastructure decision and user preference.

The setup allowed for the reuse of existing hardware while keeping the public website separate from the GPU machine. It also provided a pathway to future Workers if needed. However, the operation was largely dependent on the local PC, home connection, and available upload bandwidth.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

COBOL for Beginners: The 60-Year-Old Language That Still Runs the World's Money

COBOL is older than the internet, older than the personal computer, and it still moves trillions of dollars every single day.

  • COBOL, created in 1959, still processes 80% of in-person financial transactions
  • COBOL's English-like structure makes it accessible to non-programmers
  • High demand for COBOL developers drives up salaries in niche field

More from Sunday 15 November →