MCPcopy Create free account
hub / github.com/evilsocket/cake / to_wav_bytes

Method to_wav_bytes

cake-core/src/models/mod.rs:152–154  ·  view source on GitHub ↗

Encode as WAV bytes (16-bit PCM).

(&self)

Source from the content-addressed store, hash-verified

150impl AudioOutput {
151 /// Encode as WAV bytes (16-bit PCM).
152 pub fn to_wav_bytes(&self) -> Vec<u8> {
153 crate::utils::wav::encode_wav_bytes(&self.samples, self.sample_rate)
154 }
155
156 /// Return raw PCM f32 bytes (little-endian).
157 pub fn to_pcm_bytes(&self) -> Vec<u8> {

Callers 3

runMethod · 0.80
generate_speechFunction · 0.80

Calls 1

encode_wav_bytesFunction · 0.50

Tested by 1