- 1001
assert_eq!(effective.synthesis_model.as_deref(), Some("tts-chat")); - 1002
assert_eq!( - 1003
effective.transcription_model.as_deref(), - 1004
Some("stt-workspace") - 1005
); - 1006
assert!(effective.enabled, "a tier never changes the enable switch"); - 1007
assert_eq!(narrowed(workspace.clone(), None), workspace); - 1008
} - 1009
- 1010
#[test] - 1011
fn a_voice_tier_with_an_unknown_provider_is_refused_at_write() { - 1012
let mut tier = vak_config::VoiceConfig { - 1013
provider: Some("google".into()), - 1014
..Default::default() - 1015
}; - 1016
assert!( - 1017
check_tier(&tier) - 1018
.unwrap_err() - 1019
.contains("unknown voice provider") - 1020
); - 1021
tier.provider = Some("openai".into()); - 1022
assert!(check_tier(&tier).is_ok()); - 1023
tier.provider = None; - 1024
tier.synthesis_model = Some("x".repeat(257)); - 1025
assert!(check_tier(&tier).is_err()); - 1026
assert!(check_tier(&vak_config::VoiceConfig::default()).is_ok()); - 1027
} - 1028
- 1029
#[test] - 1030
fn a_voice_note_tells_the_model_the_truth() { - 1031
assert_eq!(VoiceNote::Heard("hi".into()).prompt_line(), "hi"); - 1032
assert_eq!( - 1033
VoiceNote::Unheard("no speech was recognized".into()).prompt_line(), - 1034
"[voice note not transcribed: no speech was recognized]" - 1035
); - 1036
} - 1037
- 1038
#[test] - 1039
fn hosted_routes_need_a_pinned_model() { - 1040
assert!(pinned_model(None, "transcription").is_err()); - 1041
assert!(pinned_model(Some(&" ".to_string()), "transcription").is_err()); - 1042
assert_eq!( - 1043
pinned_model(Some(&" model-x ".to_string()), "transcription").unwrap(), - 1044
"model-x" - 1045
); - 1046
} - 1047
} - 1048
Indexing the workspace…
Vakyartha documentation is discovering safe artifacts, anchors, and source references.