hound

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

Library
Cargo
v3.5.1
635stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
52/100Fair
Development Activity60
Maintenance16
Community52
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
74/100Good
Architecture75
Code Quality78
Innovation55
Learning Curve88

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 6 apps in this directory

TypeScript
72%
Other

Epicenter

Knowledge Management · Note Taking · Developer Tools

4,761

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
68
Dependency
Built with
TypeScript72%
Svelte15%
Updated today
Rust
95%
MIT

Fyrox

Game Development

9,512

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
Rust95%
Updated yesterday
Rust
57%
MIT

Handy

Productivity

29,916

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
73
Dependency
Built with
Rust57%
TypeScript31%
Updated today
Rust
68%
AGPL 3.0

RustDesk

Networking

121,233

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

View details
93
Repo Health
84
Technical
75
Dependency
Built with
Rust68%
Dart24%
Updated today
Rust
77%
AGPL 3.0

Spacedrive

File Storage · Collaboration

38,790

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

View details
60
Repo Health
84
Technical
65
Dependency
Built with
Rust77%
TypeScript20%
Updated 3 weeks ago
TypeScript
53%
MIT

Voicebox

AI Development · Productivity

50,841

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

View details
84
Repo Health
76
Technical
69
Dependency
Built with
TypeScript53%
Python35%
Updated 1 weeks ago

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

Search