修改了唤醒识别初始化部分,可以唤醒识别,但还存在问题;增加了合成

This commit is contained in:
2022-01-24 22:37:20 +08:00
parent e33c5a9737
commit 9bf7634f58
4 changed files with 336 additions and 69 deletions

View File

@ -55,5 +55,5 @@ flutter {
}
dependencies {
implementation files('..\\..\\..\\android\\libs\\Msc.jar')
implementation files('../../../android/libs/Msc.jar')
}

View File

@ -62,6 +62,7 @@ class Content extends StatefulWidget {
class _ContentState extends State<Content> {
String appID = 'da2aaf9b';
String ttsText = '今天合肥天气很不好';
IflytekSpeechDemo iflytekSpeechDemo = IflytekSpeechDemo();
@ -82,13 +83,20 @@ class _ContentState extends State<Content> {
ElevatedButton(
child: Text("start"),
onPressed: () {
print('被点击了');
iflytekSpeechDemo.start((Map<String, dynamic> event) async {
print('要唤醒');
iflytekSpeechDemo.wakeupStart((Map<String, dynamic> event) async {
print("flutter onOpenNotification: $event");
});
},
),
ElevatedButton(
child: Text("tts"),
onPressed: () {
print('我要合成');
iflytekSpeechDemo.ttsStart(ttsText);
},
),
],
),
);