修改了唤醒识别初始化部分,可以唤醒识别,但还存在问题;增加了合成
This commit is contained in:
@ -55,5 +55,5 @@ flutter {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation files('..\\..\\..\\android\\libs\\Msc.jar')
|
||||
implementation files('../../../android/libs/Msc.jar')
|
||||
}
|
||||
|
@ -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);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user