peasy-audio
Async Rust client for the PeasyAudio API — analyze BPM, calculate bitrate, and convert audio formats. Built with reqwest, serde, and tokio.
Built from PeasyAudio, a comprehensive audio toolkit offering free online tools for analyzing tempo, calculating file sizes, comparing audio formats, and converting between MP3, WAV, FLAC, OGG, and AAC. The site includes in-depth guides on lossless vs. lossy audio encoding, format comparison charts, and a glossary covering concepts from bitrate and sample rate to audio codecs and clipping.
Try the interactive tools at peasyaudio.com — Audio BPM Analyzer, Audio Frequency Calculator, Audio File Size Calculator, and more.
Table of Contents
- Install
- Quick Start
- What You Can Do
- API Client
- Learn More About Audio Tools
- Also Available
- Peasy Developer Tools
- License
Install
[]
= "0.2.0"
= { = "1", = ["full"] }
Or via cargo:
Quick Start
use Client;
async
What You Can Do
Audio Analysis Tools
Digital audio is represented as a series of samples captured at a fixed rate — CD-quality audio uses 44,100 samples per second (44.1 kHz) with 16-bit depth, producing 1,411 kbps of uncompressed data. Lossy codecs like MP3 and AAC reduce this dramatically (128-320 kbps) by discarding inaudible frequencies using psychoacoustic models, while lossless codecs like FLAC compress without any data loss. PeasyAudio provides calculators and analysis tools for understanding these encoding parameters.
| Tool | Slug | Description |
|---|---|---|
| BPM Analyzer | audio-bpm |
Calculate beats per minute for tempo analysis |
| Frequency Calculator | audio-freq |
Compute audio frequency values and wavelengths |
| File Size Calculator | audio-filesize |
Estimate file sizes for different bitrate and duration combinations |
use Client;
async
Learn more: Audio BPM Analyzer · Audio Format Comparison · Convert Between Audio Formats
Browse Reference Content
PeasyAudio includes a comprehensive glossary of audio engineering terminology and practical guides for common workflows. The glossary covers foundational concepts like bitrate (the number of bits processed per second, determining audio quality and file size), sample rate (how many times per second the audio signal is measured), WAV (Microsoft's uncompressed audio container), and FLAC (Free Lossless Audio Codec, the open-source standard for archival-quality audio).
| Term | Description |
|---|---|
| Bitrate | Bits per second — determines audio quality and file size |
| Sample Rate | Samples per second — 44.1 kHz (CD), 48 kHz (video), 96 kHz (hi-res) |
| WAV | Waveform Audio File Format — uncompressed PCM container |
| FLAC | Free Lossless Audio Codec — open-source lossless compression |
use Client;
async
Learn more: Audio Glossary · Audio Format Comparison · Convert Between Audio Formats
Search and Discovery
The API supports full-text search across all content types — tools, glossary terms, guides, use cases, and format documentation. Search results are grouped by content type, making it easy to find the right tool or reference for any audio workflow.
use Client;
async
Learn more: REST API Docs · All Audio Tools
API Client
The client wraps the PeasyAudio REST API with strongly-typed Rust structs using serde deserialization.
use Client;
async
Available Methods
| Method | Description |
|---|---|
list_tools(&opts) |
List tools (paginated, filterable) |
get_tool(slug) |
Get tool by slug |
list_categories(&opts) |
List tool categories |
list_formats(&opts) |
List file formats |
get_format(slug) |
Get format by slug |
list_conversions(&opts) |
List format conversions |
list_glossary(&opts) |
List glossary terms |
get_glossary_term(slug) |
Get glossary term |
list_guides(&opts) |
List guides |
get_guide(slug) |
Get guide by slug |
list_use_cases(&opts) |
List use cases |
search(query, limit) |
Search across all content |
list_sites() |
List Peasy sites |
openapi_spec() |
Get OpenAPI specification |
Full API documentation at peasyaudio.com/developers/. OpenAPI 3.1.0 spec: peasyaudio.com/api/openapi.json.
Learn More About Audio Tools
- Tools: Audio BPM Analyzer · Audio Frequency Calculator · Audio File Size Calculator · All Tools
- Guides: Audio Format Comparison · Convert Between Audio Formats · All Guides
- Glossary: Bitrate · Sample Rate · WAV · FLAC · All Terms
- Formats: All Formats
- API: REST API Docs · OpenAPI Spec
Also Available
| Language | Package | Install |
|---|---|---|
| Python | peasy-audio | pip install "peasy-audio[all]" |
| TypeScript | peasy-audio | npm install peasy-audio |
| Go | peasy-audio-go | go get github.com/peasytools/peasy-audio-go |
| Ruby | peasy-audio | gem install peasy-audio |
Peasy Developer Tools
Part of the Peasy Tools open-source developer ecosystem.
| Package | PyPI | npm | crates.io | Description |
|---|---|---|---|---|
| peasy-pdf | PyPI | npm | crate | PDF merge, split, rotate, compress — peasypdf.com |
| peasy-image | PyPI | npm | crate | Image resize, crop, convert, compress — peasyimage.com |
| peasy-audio | PyPI | npm | crate | Audio trim, merge, convert, normalize — peasyaudio.com |
| peasy-video | PyPI | npm | crate | Video trim, resize, thumbnails, GIF — peasyvideo.com |
| peasy-css | PyPI | npm | crate | CSS minify, format, analyze — peasycss.com |
| peasy-compress | PyPI | npm | crate | ZIP, TAR, gzip compression — peasytools.com |
| peasy-document | PyPI | npm | crate | Markdown, HTML, CSV, JSON conversion — peasyformats.com |
| peasytext | PyPI | npm | crate | Text case conversion, slugify, word count — peasytext.com |
License
MIT