https://github.com/wavekat/wavekat-core
Shared types for the WaveKat audio processing ecosystem. Common audio primitives (AudioFrame, IntoSamples) used across wavekat-vad, wavekat-turn, and other WaveKat crates.
https://github.com/wavekat/wavekat-core
audio audio-processing rust speech telephony voice voice-ai wavekat
Last synced: about 2 months ago
JSON representation
Shared types for the WaveKat audio processing ecosystem. Common audio primitives (AudioFrame, IntoSamples) used across wavekat-vad, wavekat-turn, and other WaveKat crates.
- Host: GitHub
- URL: https://github.com/wavekat/wavekat-core
- Owner: wavekat
- License: apache-2.0
- Created: 2026-03-27T05:09:23.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-27T09:37:19.000Z (3 months ago)
- Last Synced: 2026-03-27T17:42:02.076Z (3 months ago)
- Topics: audio, audio-processing, rust, speech, telephony, voice, voice-ai, wavekat
- Language: Rust
- Homepage: https://crates.io/crates/wavekat-core
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
[](https://crates.io/crates/wavekat-core)
[](https://docs.rs/wavekat-core)
[](https://codecov.io/gh/wavekat/wavekat-core)
Shared types for the WaveKat audio processing ecosystem.
> [!WARNING]
> Early development. API may change.
## What's Inside
| Type | Description |
|------|-------------|
| `AudioFrame` | Audio samples with sample rate, accepts `i16` and `f32` in slice, Vec, or array form |
| `IntoSamples` | Trait for transparent sample format conversion |
## Quick Start
```sh
cargo add wavekat-core
```
```rust
use wavekat_core::AudioFrame;
// From f32 — zero-copy (slice, &Vec, or array)
let frame = AudioFrame::new(&f32_samples, 16000);
// From i16 — normalizes to f32 [-1.0, 1.0] automatically
let frame = AudioFrame::new(&i16_samples, 16000);
// From an owned Vec — zero-copy, produces AudioFrame<'static>
let frame = AudioFrame::from_vec(vec![0.0f32; 160], 16000);
// Inspect the frame
let samples: &[f32] = frame.samples();
let rate: u32 = frame.sample_rate();
let n: usize = frame.len();
let empty: bool = frame.is_empty();
let secs: f64 = frame.duration_secs();
// Convert a borrowed frame to owned
let owned: AudioFrame<'static> = frame.into_owned();
```
## Audio Format Standard
The WaveKat ecosystem standardizes on **16 kHz, mono, f32 `[-1.0, 1.0]`**.
`AudioFrame` handles the conversion so downstream crates don't have to.
```
Your audio (any format)
|
v
AudioFrame::new(samples, sample_rate)
|
+---> wavekat-vad
+---> wavekat-turn
+---> wavekat-asr (future)
```
## Optional Features
### `wav`
Adds WAV file I/O via [`hound`](https://crates.io/crates/hound).
```sh
cargo add wavekat-core --features wav
```
```rust
use wavekat_core::AudioFrame;
// Read a WAV file (f32 or i16, normalized automatically)
let frame = AudioFrame::from_wav("input.wav")?;
println!("{} Hz, {} samples", frame.sample_rate(), frame.len());
// Write a frame to a WAV file (mono f32 PCM)
frame.write_wav("output.wav")?;
```
## License
Licensed under [Apache 2.0](LICENSE).
Copyright 2026 WaveKat.