cordova-plugin-IFlyspeech-m.../README.md

44 lines
1.0 KiB
Markdown
Raw Normal View History

2018-09-14 14:50:00 +08:00
# 科大讯飞的语音听说读写的cordova插件
## 安装方法
2020-10-19 16:24:36 +08:00
APP_KEY参数值为您在科大讯飞申请的appid
2018-09-14 14:50:00 +08:00
2018-09-14 14:58:03 +08:00
2020-10-19 16:24:36 +08:00
运行cordova plugin add https://gitee.com/shuto/cordova-plugin-IFlyspeech-master.git --variable APP_KEY=${APP_KEY}
2018-09-14 14:50:00 +08:00
## 调用方法
2018-09-14 14:53:32 +08:00
/** 开始录音 最大持续时间40秒
2018-09-14 14:50:00 +08:00
* @Param 成功callback
* @Param 失败callback
* @Param 是否显示录音画面
* @Param 是否显示标点
*
*/
2018-09-14 15:13:45 +08:00
xunfeiListenSpeaking.startListen(success, error, isShowDialog, isShowPunc);
2018-09-14 14:50:00 +08:00
// 停止录音
xunfeiListenSpeaking.stopListen();
/**
* 开始说话
* @Param 成功callback
* @Param 失败callback
* @Param 需要说出的信息
*/
xunfeiListenSpeaking.startSpeak(success, error, message);
// 停止说话
xunfeiListenSpeaking.stopSpeak();
// 暂停说话
xunfeiListenSpeaking.pauseSpeaking();
// 恢复说话
xunfeiListenSpeaking.resumeSpeaking();