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.

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.

  • 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.jsregions, allowing users to define sample-accurate start/end points.
  • Digital Signal Processing (DSP):- Constructs an OfflineAudioContextfor faster-than-realtime rendering.
  • Routes audio through a hardcoded vocal chain (EQ -> Compressor -> Limiter).
  • Analysis pass determines peak amplitude for accurate normalization.

  • Constructs an

  • Encoding:- Transfers processed buffer to the ffmpeg.wasmvirtual file system.
  • Executes LAME MP3 encoding at 192kbps VBR.
  • Streams the resulting Blob directly to the user's download manager.

  • Transfers processed buffer to the

HERTZ does not use generic presets. The audio engine implements a specific vocal chain optimized for spoken word and podcast clarity.

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

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)

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.

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.

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

```

Clone the repository

git clone https://github.com/askpext/hertz.git

Enter directory

cd hertz

Install dependencies

npm install
``npm run devThe application will launch athttp://localhost:5173`.

npm run buildThis 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).