AudioFetch

Live

A batch audio downloader for Soundgasm featuring streaming file transfers, client-side ZIP creation, real-time progress tracking, and URL parsing. Built to explore file handling patterns in Next.js.

AudioFetch - Batch Audio Downloader

Key Features

  • Batch processing: paste multiple URLs and download all at once
  • Streaming file transfers with memory-efficient chunked downloads
  • Client-side ZIP creation using JSZip—no server storage needed
  • Real-time progress tracking with per-file status indicators
  • Smart filename extraction and Unicode sanitization
  • Scan User Profile: Find all audio files from a Soundgasm user by searching Reddit, Google, Bing, and DuckDuckGo

Why I Built This

This project started as a practical need—downloading audio files from Soundgasm with proper filenames instead of cryptic hashes. But it quickly became an opportunity to explore several interesting web development patterns: streaming responses, client-side file manipulation, and building responsive UIs with real-time feedback.

Technical Deep Dive

Each component of AudioFetch explores a different pattern in modern web development:

Streaming File Transfers

Instead of loading entire files into memory, AudioFetch uses the ReadableStream API to process downloads in chunks. This enables:

  • • Memory-efficient handling of large audio files
  • • Real-time progress updates as bytes arrive
  • • Graceful handling of slow or interrupted connections

Client-Side ZIP Creation

Using JSZip, the app bundles multiple audio files into a single ZIP archive entirely in the browser. Benefits include:

  • • No server-side storage or temporary files needed
  • • Privacy: files never touch the server disk
  • • Reduced server load and bandwidth costs

URL Parsing & HTML Scraping

The server-side API fetches Soundgasm pages and extracts audio URLs using regex pattern matching:

  • • Extracts .m4a URLs from page source
  • • Multiple fallback methods for title extraction
  • • Validates URLs to prevent SSRF attacks

Progress Tracking

React state management provides real-time feedback with:

  • • Per-file status: pending → parsing → ready → downloading → completed
  • • Percentage progress bars calculated from Content-Length headers
  • • Overall batch progress with completed/total counters

Retry Logic with Exponential Backoff

Network requests are wrapped with resilient retry logic:

  • • 3 retry attempts with exponential backoff (1s, 2s, 3s delays)
  • • Graceful error handling that doesn't break batch operations
  • • Manual retry button for failed downloads

Filename Sanitization

Robust handling of international characters and edge cases:

  • • Unicode normalization (smart quotes → straight quotes)
  • • Cross-platform safe filenames (Windows, Mac, Linux)
  • • HTTP header encoding with RFC 5987 compliance

Multi-Source User Profile Scanner

Enter a Soundgasm user URL to automatically discover all their audio files using a comprehensive multi-source search strategy:

  • Reddit user submission history - Primary source, most effective for finding content
  • 17 audio-related subreddits - Searches gonewildaudio, pillowtalkaudio, AudioCandy, and more
  • Multiple Reddit sort options - new, relevance, and top to maximize coverage
  • Username mention search - Finds content shared by others mentioning the creator
  • Google/Bing/DuckDuckGo - Best-effort search (often blocked by bot detection)

Real-time progress UI powered by Server-Sent Events (SSE) provides streaming updates showing the current search source, live count of links found, and clean status indicators. Results are automatically deduplicated and seamlessly integrate with the existing batch download functionality. Successfully tested with 187+ unique audio files found for test users.

Note: Reddit and search engines often block requests from cloud servers. For best results with the User Profile Scanner, use the desktop app below.

Desktop App (Recommended for User Scanner)

A standalone Windows application that runs locally on your machine, bypassing cloud server restrictions:

  • No cloud blocking - Reddit and search engines respond normally to local requests
  • Full functionality - All features including User Profile Scanner work without limitations
  • Two versions available - Installer for permanent setup, or portable EXE for no-install use
  • Same familiar UI - Identical interface to the web app

Architecture

ClientReact 19 with useState for local state, JSZip for archive creation
APINext.js 15 App Router with 4 endpoints: parse-url, download, download-all, scan-user
ProxyServer acts as CORS proxy, streaming audio from Soundgasm CDN

Try AudioFetch

Download audio files from Soundgasm with proper filenames

Open AudioFetch App