1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Concrete codec backend implementations.
//!
//! Each backend is feature-gated. Compiling without any backend feature
//! produces a usable crate that exposes only the [`crate::CodecBackend`]
//! trait surface — useful for downstream crates that just want to consume
//! `Arc<dyn CodecBackend>` without dragging in candle.
//!
//! | Module | Feature | Status |
//! |---|---|---|
//! | [`encodec`] | `encodec` | Functional — Meta's `facebook/encodec_24khz` neural codec via `candle-transformers`. |
//! | [`dac`] | `dac` | Functional decode — Descript Audio Codec (`descript/dac_44khz`) via `candle-transformers`. Encode short-circuits until candle exposes a public RVQ encode path. |
//! | [`snac`] | `snac` | Functional — Multi-Scale Neural Audio Codec (`hubertsiuzdak/snac_24khz`, 3 codebooks @ vq_strides [4, 2, 1], 24 kHz) via `candle-transformers`. Both encode and decode are wired. |
// When the `dac` feature is off, keep a tiny compile-time-only stub module
// so doc links and downstream `use blazen_audio_codec::backends::dac` paths
// stay resolvable. The stub does NOT implement `CodecBackend` (it would
// require the candle stack); attempts to use it surface as a clear
// missing-feature error at the call site.
// Same compile-time stub pattern for SNAC when its feature is off.