aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/nlu_engine_choice.dart
diff options
context:
space:
mode:
authorAnuj-S62 <anuj603362@gmail.com>2024-07-11 15:18:31 +0530
committerAnuj-S62 <anuj603362@gmail.com>2024-07-21 19:52:11 +0530
commit0b59086cdddd40689e57969aa7914ba38f1ec2dd (patch)
tree975c38663f57d497eeab0e2649e51308aef9a755 /lib/widgets/nlu_engine_choice.dart
parentecd34435c1a74b39bf41d59ad479fdc85d0afb7b (diff)
Update Voice Agent Flutter App
- update voice-agent flutter app to use whisper AI for speech-to-text functionality. - Integrated SharedPreferences to store the application state. Bug-AGL: SPEC-5200 Change-Id: I9a05b1d135c1fa07949333391ff828f166b7fe8e Signed-off-by: Anuj-S62 <anuj603362@gmail.com>
Diffstat (limited to 'lib/widgets/nlu_engine_choice.dart')
-rw-r--r--lib/widgets/nlu_engine_choice.dart6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/widgets/nlu_engine_choice.dart b/lib/widgets/nlu_engine_choice.dart
index 32db7dd..53a4aaa 100644
--- a/lib/widgets/nlu_engine_choice.dart
+++ b/lib/widgets/nlu_engine_choice.dart
@@ -68,6 +68,9 @@
// }
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+
+import '../models/app_state.dart';
enum NLUEngine { snips, rasa }
@@ -90,7 +93,8 @@ class _NLUEngineChoiceState extends State<NLUEngineChoice> {
@override
void initState() {
super.initState();
- _selectedEngine = NLUEngine.snips; // Initialize the selection
+ final appState = context.read<AppState>();
+ _selectedEngine = appState.intentEngine == "snips" ? NLUEngine.snips : NLUEngine.rasa;
_theme = widget.theme;
}