From 0b59086cdddd40689e57969aa7914ba38f1ec2dd Mon Sep 17 00:00:00 2001 From: Anuj-S62 Date: Thu, 11 Jul 2024 15:18:31 +0530 Subject: 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 --- lib/grpc/generated/voice_agent.pb.dart | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'lib/grpc/generated/voice_agent.pb.dart') diff --git a/lib/grpc/generated/voice_agent.pb.dart b/lib/grpc/generated/voice_agent.pb.dart index 2c0f9fa..892b95e 100644 --- a/lib/grpc/generated/voice_agent.pb.dart +++ b/lib/grpc/generated/voice_agent.pb.dart @@ -9,6 +9,7 @@ // ignore_for_file: non_constant_identifier_names, prefer_final_fields // ignore_for_file: unnecessary_import, unnecessary_this, unused_import +import 'dart:async' as $async; import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; @@ -274,6 +275,7 @@ class S_RecognizeVoiceControl extends $pb.GeneratedMessage { VoiceAudio? audioStream, NLUModel? nluModel, $core.String? streamId, + STTFramework? sttFramework, }) { final $result = create(); if (audioStream != null) { @@ -285,6 +287,9 @@ class S_RecognizeVoiceControl extends $pb.GeneratedMessage { if (streamId != null) { $result.streamId = streamId; } + if (sttFramework != null) { + $result.sttFramework = sttFramework; + } return $result; } S_RecognizeVoiceControl._() : super(); @@ -295,6 +300,7 @@ class S_RecognizeVoiceControl extends $pb.GeneratedMessage { ..aOM(1, _omitFieldNames ? '' : 'audioStream', subBuilder: VoiceAudio.create) ..e(2, _omitFieldNames ? '' : 'nluModel', $pb.PbFieldType.OE, defaultOrMaker: NLUModel.SNIPS, valueOf: NLUModel.valueOf, enumValues: NLUModel.values) ..aOS(3, _omitFieldNames ? '' : 'streamId') + ..e(4, _omitFieldNames ? '' : 'sttFramework', $pb.PbFieldType.OE, defaultOrMaker: STTFramework.VOSK, valueOf: STTFramework.valueOf, enumValues: STTFramework.values) ..hasRequiredFields = false ; @@ -347,6 +353,15 @@ class S_RecognizeVoiceControl extends $pb.GeneratedMessage { $core.bool hasStreamId() => $_has(2); @$pb.TagNumber(3) void clearStreamId() => clearField(3); + + @$pb.TagNumber(4) + STTFramework get sttFramework => $_getN(3); + @$pb.TagNumber(4) + set sttFramework(STTFramework v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasSttFramework() => $_has(3); + @$pb.TagNumber(4) + void clearSttFramework() => clearField(4); } class RecognizeVoiceControl extends $pb.GeneratedMessage { @@ -355,6 +370,8 @@ class RecognizeVoiceControl extends $pb.GeneratedMessage { NLUModel? nluModel, RecordMode? recordMode, $core.String? streamId, + STTFramework? sttFramework, + OnlineMode? onlineMode, }) { final $result = create(); if (action != null) { @@ -369,6 +386,12 @@ class RecognizeVoiceControl extends $pb.GeneratedMessage { if (streamId != null) { $result.streamId = streamId; } + if (sttFramework != null) { + $result.sttFramework = sttFramework; + } + if (onlineMode != null) { + $result.onlineMode = onlineMode; + } return $result; } RecognizeVoiceControl._() : super(); @@ -380,6 +403,8 @@ class RecognizeVoiceControl extends $pb.GeneratedMessage { ..e(2, _omitFieldNames ? '' : 'nluModel', $pb.PbFieldType.OE, defaultOrMaker: NLUModel.SNIPS, valueOf: NLUModel.valueOf, enumValues: NLUModel.values) ..e(3, _omitFieldNames ? '' : 'recordMode', $pb.PbFieldType.OE, defaultOrMaker: RecordMode.MANUAL, valueOf: RecordMode.valueOf, enumValues: RecordMode.values) ..aOS(4, _omitFieldNames ? '' : 'streamId') + ..e(5, _omitFieldNames ? '' : 'sttFramework', $pb.PbFieldType.OE, defaultOrMaker: STTFramework.VOSK, valueOf: STTFramework.valueOf, enumValues: STTFramework.values) + ..e(6, _omitFieldNames ? '' : 'onlineMode', $pb.PbFieldType.OE, defaultOrMaker: OnlineMode.ONLINE, valueOf: OnlineMode.valueOf, enumValues: OnlineMode.values) ..hasRequiredFields = false ; @@ -439,6 +464,24 @@ class RecognizeVoiceControl extends $pb.GeneratedMessage { $core.bool hasStreamId() => $_has(3); @$pb.TagNumber(4) void clearStreamId() => clearField(4); + + @$pb.TagNumber(5) + STTFramework get sttFramework => $_getN(4); + @$pb.TagNumber(5) + set sttFramework(STTFramework v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasSttFramework() => $_has(4); + @$pb.TagNumber(5) + void clearSttFramework() => clearField(5); + + @$pb.TagNumber(6) + OnlineMode get onlineMode => $_getN(5); + @$pb.TagNumber(6) + set onlineMode(OnlineMode v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasOnlineMode() => $_has(5); + @$pb.TagNumber(6) + void clearOnlineMode() => clearField(6); } class RecognizeTextControl extends $pb.GeneratedMessage { @@ -791,6 +834,33 @@ class ExecuteResult extends $pb.GeneratedMessage { void clearStatus() => clearField(2); } +class VoiceAgentServiceApi { + $pb.RpcClient _client; + VoiceAgentServiceApi(this._client); + + $async.Future checkServiceStatus($pb.ClientContext? ctx, Empty request) => + _client.invoke(ctx, 'VoiceAgentService', 'CheckServiceStatus', request, ServiceStatus()) + ; + $async.Future s_DetectWakeWord($pb.ClientContext? ctx, VoiceAudio request) => + _client.invoke(ctx, 'VoiceAgentService', 'S_DetectWakeWord', request, WakeWordStatus()) + ; + $async.Future detectWakeWord($pb.ClientContext? ctx, Empty request) => + _client.invoke(ctx, 'VoiceAgentService', 'DetectWakeWord', request, WakeWordStatus()) + ; + $async.Future s_RecognizeVoiceCommand($pb.ClientContext? ctx, S_RecognizeVoiceControl request) => + _client.invoke(ctx, 'VoiceAgentService', 'S_RecognizeVoiceCommand', request, RecognizeResult()) + ; + $async.Future recognizeVoiceCommand($pb.ClientContext? ctx, RecognizeVoiceControl request) => + _client.invoke(ctx, 'VoiceAgentService', 'RecognizeVoiceCommand', request, RecognizeResult()) + ; + $async.Future recognizeTextCommand($pb.ClientContext? ctx, RecognizeTextControl request) => + _client.invoke(ctx, 'VoiceAgentService', 'RecognizeTextCommand', request, RecognizeResult()) + ; + $async.Future executeCommand($pb.ClientContext? ctx, ExecuteInput request) => + _client.invoke(ctx, 'VoiceAgentService', 'ExecuteCommand', request, ExecuteResult()) + ; +} + const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); -- cgit