hound

A pure-Rust WAV encoding and decoding library with zero runtime dependencies.

Library
Cargo
v3.5.1
637 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
48 /100 Fair
Development Activity 44
Maintenance 16
Community 52
Maturity 60
Momentum 20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
74 /100 Good
Architecture 75
Code Quality 78
Innovation 55
Learning Curve 88

hound is a WAV (RIFF/WAVE) audio file encoding and decoding library written entirely in Rust, with no runtime dependencies. It provides WavReader and WavWriter types for reading and writing PCM integer and IEEE float samples at any bit depth (8/16/24/32-bit) supported by the WAV format, correctly handling both the simple WAVEFORMATEX and extensible WAVEFORMATEXTENSIBLE header variants used by real-world WAV files.

With nearly 15 million cumulative downloads, hound is one of the most widely used building blocks in the Rust audio ecosystem for anything that needs to read or write .wav files directly — audio analysis tools, synthesizers exporting rendered audio, and test fixtures for higher-level audio libraries like cpal. Its API is deliberately small and typed around WavSpec (channels, sample rate, bit depth, sample format), making straightforward tasks like writing a sine wave or computing RMS from a file just a few lines of code, as shown directly in its own documentation examples.

What You Get

  • WavWriter for creating WAV files with a specified WavSpec (channels, sample rate, bits per sample, sample format) and writing samples one at a time
  • WavReader for opening and iterating over samples in existing WAV files, including format/spec introspection
  • Support for both integer PCM and IEEE float sample formats across 8/16/24/32-bit depths
  • Correct handling of both WAVEFORMATEX and the extended WAVEFORMATEXTENSIBLE RIFF header variants found in real-world files
  • A fuzz-tested decoder (fuzz/ directory with fuzz targets) plus a testsamples/ corpus covering many real-world WAV header variants

Common Use Cases

  • Writing synthesized or recorded audio samples to a .wav file from a Rust application
  • Reading and analyzing existing WAV files (e.g. computing RMS, converting to mono) in an audio-processing pipeline
  • Providing WAV I/O as a lightweight dependency in a synthesizer, DAW, or audio test-fixture crate without pulling in a full multimedia framework
  • Round-tripping audio captured via cpal (see the crate’s own examples/cpal.rs) to and from disk for offline processing

Under The Hood

Architecture — The crate is small and flat: src/lib.rs defines the shared WavSpec, error types, and top-level documentation/examples, while src/read.rs and src/write.rs implement WavReader and WavWriter respectively as separate, independently-testable modules that share only the WavSpec data type — there is no shared internal abstraction layer beyond that, keeping the whole library easy to audit. Tech Stack — Pure Rust with zero runtime dependencies (only a cpal dev-dependency for its illustrative recording example); it deliberately pins to an older cpal version in Cargo.toml to preserve compatibility with older Rust toolchains rather than chasing the dependency’s latest release. Code Quality — The testsamples/ directory contains a curated corpus of real-world WAV files covering both header variants and several bit-depth/sample-rate combinations, and the fuzz/ directory holds cargo-fuzz targets exercising the decoder against malformed input, which is a meaningfully high correctness bar for a binary-format parser. API Design — The library’s own doc-comments in lib.rs double as its primary usage guide, showing complete, runnable examples (rendering a sine wave, computing RMS) rather than referring out to separate docs; the WavSpec struct groups all format parameters into one typed value passed to both reader and writer, so there’s a single mental model for describing a WAV file’s shape.

Used by 7 apps in this directory

TypeScript
64%
Other

Epicenter

Developer Tools · Knowledge Management · Note Taking

4,808

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
64
Dependency
Built with
TypeScript 64%
HTML 13%
Svelte 13%
Updated 5 days ago
Rust
95%
MIT

Fyrox

Game Development

9,568

A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts

View details
85
Repo Health
79
Technical
68
Dependency
Built with
Rust 95%
Updated 5 days ago
Rust
59%
MIT

Handy

Productivity · Voice AI

32,320

Free, offline, open-source speech-to-text that pastes directly into any app on Windows, macOS, and Linux.

View details
87
Repo Health
78
Technical
72
Dependency
Built with
Rust 59%
TypeScript 30%
Updated 4 days ago
Rust
70%
AGPL 3.0

RustDesk

Networking

124,658

Open-source, self-hosted remote desktop built in Rust — your data, your infrastructure, no third-party cloud.

View details
93
Repo Health
84
Technical
71
Dependency
Built with
Rust 70%
Dart 22%
Updated 4 days ago
Rust
77%
AGPL 3.0

Spacedrive

Collaboration · File Storage

39,041

One file manager for all your devices and clouds — powered by a Virtual Distributed File System built in Rust.

View details
56
Repo Health
84
Technical
63
Dependency
Built with
Rust 77%
TypeScript 20%
Updated 2 months ago
TypeScript
53%
MIT

Voicebox

AI Development · Productivity · Voice AI

55,864

Clone voices, dictate anywhere, and give AI agents your voice — all locally.

View details
79
Repo Health
76
Technical
68
Dependency
Built with
TypeScript 53%
Python 35%
Updated 1 months ago
MIT

YuE2 Studio

Mcp · Music Audio

320

Windows desktop studio that runs the YuE2 song model on your own NVIDIA GPU: it writes an editable sheet-music score first, then sings it as a full song with vocals, offline, with covers, LoRA training and an MCP server for agents.

View details
60
Repo Health
83
Technical
76
Dependency

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers