removed on-device STT, as android and ios already have on-device STT built into the keyboard.

This commit is contained in:
Joshua
2024-07-10 13:57:10 -06:00
parent 711991c7bf
commit 5d2e162da8
2 changed files with 1 additions and 35 deletions
@@ -98,40 +98,6 @@ class _PromptBoxWidgetState extends State<PromptBoxWidget> {
),
),
),
Expanded( // TODO: Microphone context upload -> or STT??
child: Padding(
padding: const EdgeInsets.all(14),
child: FlutterFlowIconButton(
borderColor: Colors.transparent,
borderRadius: 30,
borderWidth: 1,
buttonSize: 40,
icon: // Backend.stt.speechToText.isListening ?
// const Icon(
// Icons.mic_none,
// color: AppTheme.error,
// size: 30,
// ) :
const Icon(
Icons.mic_off_outlined,
color: AppTheme.darkest,
size: 30,
),
onPressed: () {
if(Backend.stt.isSpeechEnabled()) {
if(Backend.stt.speechToText.isListening) {
print('De-activating STT.');
Backend.stt.stopListening();
}
print('Activating STT.');
entry_text = Backend.stt.startListening() as String;
} else {
print('Microphone is unavailable for STT');
}
},
),
),
),
Expanded( // TODO: Video context upload
child: Padding(
padding: const EdgeInsets.all(14),
+1 -1
View File
@@ -39,5 +39,5 @@ class SpeechToText {
/// This is the callback that the SpeechToText plugin calls when
/// the platform returns recognized words.
String onSpeechResult(SpeechRecognitionResult result) => (text = result.recognizedWords);
void onSpeechResult(SpeechRecognitionResult result) => (text = result.recognizedWords);
}