project restructure with Rust workspaces
This commit is contained in:
parent
1f03a44f33
commit
6e585dd37d
428 changed files with 19372 additions and 6061 deletions
39
crates/jarvis-core/src/db/structs.rs
Normal file
39
crates/jarvis-core/src/db/structs.rs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
use crate::config;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::config::structs::SpeechToTextEngine;
|
||||
use crate::config::structs::WakeWordEngine;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Settings {
|
||||
pub microphone: i32,
|
||||
pub voice: String,
|
||||
|
||||
pub wake_word_engine: WakeWordEngine,
|
||||
pub speech_to_text_engine: SpeechToTextEngine,
|
||||
|
||||
pub api_keys: ApiKeys,
|
||||
}
|
||||
|
||||
impl Default for Settings {
|
||||
fn default() -> Settings {
|
||||
Settings {
|
||||
microphone: -1,
|
||||
voice: String::from(""),
|
||||
|
||||
wake_word_engine: config::DEFAULT_WAKE_WORD_ENGINE,
|
||||
speech_to_text_engine: config::DEFAULT_SPEECH_TO_TEXT_ENGINE,
|
||||
|
||||
api_keys: ApiKeys {
|
||||
picovoice: String::from(""),
|
||||
openai: String::from(""),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct ApiKeys {
|
||||
pub picovoice: String,
|
||||
pub openai: String,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue