Skip to content
HN On Hacker News ↗

GitHub - askpext/HERTZ: Professional audio polishing in the browser. Zero servers. 100% Private. Built with FFmpeg.wasm.

▲ 8 points by askadityapandey 4w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this entire text is AI.

100 %

AI likelihood · overall

AI
0% human-written 100% AI-generated
SEGMENTS · HUMAN 0 of 1
SEGMENTS · AI 1 of 1
WORD COUNT 445
PEAK AI % 100% · §1
Analyzed
Jul 30
backend: pangram/v3.3
Segments scanned
1 windows
avg 445 words each
Distribution
0 / 100%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 445 words · 1 segments analyzed

Human AI-generated
§1 AI · 100%

High-fidelity client-side audio processing engine. HERTZ is a web-based Digital Audio Workstation (DAW) utility designed for instant vocal polishing. It leverages the Web Audio API for real-time signal processing and FFmpeg.wasm for client-side encoding. Unlike traditional tools that rely on server-side processing (FFmpeg binaries on Linux), HERTZ runs entirely within the user's browser thread via WebAssembly.

Core Architecture The application is built on a "Zero-Server" architecture. The goal is to eliminate the latency, bandwidth costs, and privacy risks associated with uploading sensitive audio data to cloud storage. The Pipeline

Ingestion: Decodes varied input formats (WAV, MP3, M4A, OGG) into a raw 32-bit floating-point AudioBuffer. Manipulation: Provides a non-destructive editing layer using Wavesurfer.js regions, allowing users to define sample-accurate start/end points. Digital Signal Processing (DSP):

Constructs an OfflineAudioContext for faster-than-realtime rendering. Routes audio through a hardcoded vocal chain (EQ -> Compressor -> Limiter). Analysis pass determines peak amplitude for accurate normalization.

Encoding:

Transfers processed buffer to the ffmpeg.wasm virtual file system. Executes LAME MP3 encoding at 192kbps VBR. Streams the resulting Blob directly to the user's download manager.

Signal Chain Specification HERTZ does not use generic presets. The audio engine implements a specific vocal chain optimized for spoken word and podcast clarity. 1. High-Pass Filter

Cutoff: 80Hz Q: 1.4 Purpose: Removes sub-bass rumble and DC offset artifacts often present in consumer microphones.

2. Dynamics Compressor A hard-knee compressor designed to level vocal dynamic range without introducing pumping artifacts.

Threshold: -20.0 dB Ratio: 3.1:1 Knee: 5.0 dB Attack: 0.03s (30ms) Release: 0.1s (100ms)

3. Normalization Post-compression gain staging ensures compliance with broadcast loudness standards.

Target: -3.0 dB Peak Method: Linear gain calculation based on absolute max amplitude scanning.

Technical Constraints & Browser Security HERTZ relies on SharedArrayBuffer to facilitate multi-threaded processing in FFmpeg.wasm. Modern browsers restrict this feature behind strict security headers to prevent Spectre/Meltdown vulnerabilities. To run HERTZ locally or in production, the host must serve the following headers: Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp If these headers are missing, ffmpeg.wasm will fail to initialize, and the application will throw a buffer allocation error. The included vite.config.ts handles this for local development.

Installation & Development Requirements

Node.js 18.x or higher NPM or Bun package manager A modern browser with WebAssembly support (Chrome 90+, Firefox 90+, Safari 15+)

Setup # Clone the repository git clone [https://github.com/askpext/hertz.git](https://github.com/askpext/hertz.git)

# Enter directory cd hertz

# Install dependencies npm install Running Locally npm run dev The application will launch at http://localhost:5173. Building for Production npm run build This generates a static asset bundle in /dist. Note that you cannot simply open index.html locally; it must be served via a web server that supports the required COOP/COEP headers (e.g., Vercel, Netlify, or GitHub Pages).