App icon, logs are now stored to log.txt file, work in progress on intergration with rustpotter
This commit is contained in:
parent
49a7a7ef2a
commit
d8b8ba2617
72 changed files with 515 additions and 2993 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use std::sync::Mutex;
|
||||
use vosk::{CompleteResult, DecodingState, Model, Recognizer};
|
||||
use vosk::{DecodingState, Model, Recognizer};
|
||||
|
||||
use crate::config::VOSK_MODEL_PATH;
|
||||
|
||||
|
|
@ -46,13 +46,13 @@ pub fn recognize(data: &[i16]) -> Option<String> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn stereo_to_mono(input_data: &[i16]) -> Vec<i16> {
|
||||
let mut result = Vec::with_capacity(input_data.len() / 2);
|
||||
result.extend(
|
||||
input_data
|
||||
.chunks_exact(2)
|
||||
.map(|chunk| chunk[0] / 2 + chunk[1] / 2),
|
||||
);
|
||||
// pub fn stereo_to_mono(input_data: &[i16]) -> Vec<i16> {
|
||||
// let mut result = Vec::with_capacity(input_data.len() / 2);
|
||||
// result.extend(
|
||||
// input_data
|
||||
// .chunks_exact(2)
|
||||
// .map(|chunk| chunk[0] / 2 + chunk[1] / 2),
|
||||
// );
|
||||
|
||||
result
|
||||
}
|
||||
// result
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue