BlueGit

ict rusty-teams

Files

rusty-teams / vendor / gpui-component / src / speech / system / unsupported.rs

unsupported.rs

unsupported.rs 708 B Download Raw
1use gpui::{App, SharedString};
2
3use crate::speech::{AudioFormat, RecognitionSession, SpeechError, SpeechRecognizer, SpeechSink};
4
5/// Placeholder until the platform recognizer lands.
6pub(super) struct PlatformRecognizer;
7
8impl PlatformRecognizer {
9 pub(super) fn new(_locale: Option<SharedString>) -> Self {
10 Self
11 }
12}
13
14impl SpeechRecognizer for PlatformRecognizer {
15 fn audio_format(&self) -> AudioFormat {
16 AudioFormat::default()
17 }
18
19 fn is_available(&self, _: &App) -> bool {
20 false
21 }
22
23 fn start(
24 &self,
25 _: SpeechSink,
26 _: &mut App,
27 ) -> Result<Box<dyn RecognitionSession>, SpeechError> {
28 Err(SpeechError::Unsupported)
29 }
30}