Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

add u8 sample format

CJ Paisc6560bd6cba4
diff --git a/src-tauri/src/audio_toolkit/audio/recorder.rs b/src-tauri/src/audio_toolkit/audio/recorder.rs
index a0ca572b..3ec466dd 100644
--- a/src-tauri/src/audio_toolkit/audio/recorder.rs
+++ b/src-tauri/src/audio_toolkit/audio/recorder.rs
@@ -79,6 +79,10 @@ impl AudioRecorder {
);
let stream = match config.sample_format() {
+ cpal::SampleFormat::U8 => {
+ AudioRecorder::build_stream::<u8>(&thread_device, &config, sample_tx, channels)
+ .unwrap()
+ }
cpal::SampleFormat::I8 => {
AudioRecorder::build_stream::<i8>(&thread_device, &config, sample_tx, channels)
.unwrap()