#[derive(Debug, Clone, Eq, PartialEq)]
pub enum SpeechUnlockType {
OpenWakeWordAlexa,
OpenWakeWordHeyMycroft,
OpenWakeWordHeyJarvis,
OpenWakeWordAhojHugo,
}
#[derive(Debug, Clone)]
pub struct UnlockConfig {
pub unlock_type: SpeechUnlockType,
pub detection_threshold: f32,
pub quite_threshold: i16,
pub endpoint_duration_secs: f32,
pub save_wavs: bool,
pub unlock_time_secs: u8,
}
impl Default for UnlockConfig {
fn default() -> Self {
UnlockConfig {
unlock_type: SpeechUnlockType::OpenWakeWordAlexa, detection_threshold: 0.3, quite_threshold: 1, endpoint_duration_secs: 0.2, save_wavs: false, #[cfg(not(debug_assertions))]
unlock_time_secs: 30, #[cfg(debug_assertions)]
unlock_time_secs: 15, }
}
}