修改了唤醒识别初始化部分,可以唤醒识别,但还存在问题;增加了合成
This commit is contained in:
@ -43,22 +43,45 @@ class IflytekSpeechDemo {
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> start(EventHandler onReceiveSpeechText) async {
|
||||
Future<String> wakeupStart(EventHandler onReceiveSpeechText) async {
|
||||
_onReceiveSpeechText = onReceiveSpeechText;
|
||||
try{
|
||||
return await _channel.invokeMethod('start');
|
||||
return await _channel.invokeMethod('wakeupStart');
|
||||
}catch(e) {
|
||||
print(e);
|
||||
return "9999999";
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> stop() async {
|
||||
return await _channel.invokeMethod('stop');
|
||||
Future<String> wakeupStop() async {
|
||||
return await _channel.invokeMethod('wakeupStop');
|
||||
}
|
||||
|
||||
Future<String> cancel() async {
|
||||
return await _channel.invokeMethod('cancel');
|
||||
Future<String> wakeupCancel() async {
|
||||
return await _channel.invokeMethod('wakeupCancel');
|
||||
}
|
||||
|
||||
Future<int> ttsStart(String ttsText) async {
|
||||
try{
|
||||
int ret = await _channel.invokeMethod('ttsStart', {
|
||||
"ttsText": ttsText
|
||||
});
|
||||
return ret;
|
||||
}catch(e) {
|
||||
print(e);
|
||||
return 9999999;
|
||||
}
|
||||
}
|
||||
Future<String> ttsCancel() async {
|
||||
return await _channel.invokeMethod('ttsCancel');
|
||||
}
|
||||
|
||||
Future<String> ttsPause() async {
|
||||
return await _channel.invokeMethod('ttsPause');
|
||||
}
|
||||
|
||||
Future<String> ttsResume() async {
|
||||
return await _channel.invokeMethod('ttsResume');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user