百度语音识别cordova插件
卡农LLLL 发布于2018-01 浏览:10658 回复:24
6
收藏
https://www.npmjs.com/package/cordova-plugin-baiduasr

npm可以直接安装.详细的都发在npm上了.

git里面有源码.源码其实很简单.我不生产代码,只是代码搬运工.

cordova是混合应用的一种.使开发者很方便的用HTML5做app.

目前该插件只支持android.

后续可能会把唤醒.TTS这些加上.

收藏
点赞
6
个赞
共24条回复 最后由用户已被禁言回复于2022-04
#28Actinia_Wood回复于2018-09
#21 liupeng9030回复
ios版的,你不帮我写,我自己已经写好了

请问能否分享一下适用于IOS的cordova百度语音识别插件  或者留一下联系方式。。

0
#27求代课1357回复于2018-07
#18 cswwwsws回复
加了windows 就是cannot read property 'begin' of undefined
展开

谢谢您的指点

0
#26卡农LLLL回复于2018-06
#25 13345019562回复
您好群主,git上下下来后,运行testAgular的代码,无法运行apk啊。请回复一下。是不是少东西? FATAL EXCEPTION: main Process: com.zhijiaiot.app, PID: 20123 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zhijiaiot.app/com.zhijiaiot.app.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.zhijiaiot.app.MainActivity" on path: DexPathList[[zip file "/data/app/com.zhijiaiot.app-2/base.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.zhijiaiot.app-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5258) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
展开

https://www.npmjs.com/package/cordova-plugin-baiduasr

是作为cordova插件使用的.

0
1
#2513345019562回复于2018-05

您好群主,git上下下来后,运行testAgular的代码,无法运行apk啊。请回复一下。是不是少东西?

FATAL EXCEPTION: main
Process: com.zhijiaiot.app, PID: 20123
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zhijiaiot.app/com.zhijiaiot.app.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.zhijiaiot.app.MainActivity" on path: DexPathList[[zip file "/data/app/com.zhijiaiot.app-2/base.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.zhijiaiot.app-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.zhijiaiot.app-2/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

0
#24Aisulie回复于2018-05

加了window后 cannot read property 'begin' of undefined怎么解决?

0
#23卡农LLLL回复于2018-02
#22 liupeng9030回复
android我也重构了

我要给你66个大拇指.能共享就更好了.cordova插件制作看懂官网的文档真的很简单呢.哈哈哈

0
#22liupeng9030回复于2018-02
#13 卡农LLLL回复
..额额...暂时还没有计划做ios的呢..

android我也重构了

0
#21liupeng9030回复于2018-02
#13 卡农LLLL回复
..额额...暂时还没有计划做ios的呢..

ios版的,你不帮我写,我自己已经写好了

0
#19卡农LLLL回复于2018-02
#18 cswwwsws回复
加了windows 就是cannot read property 'begin' of undefined
展开

用window.baiduAsrPlugin.begin调用呢?js文件其实就在www/BaiduAsrPlugin.js里面.你看下这个js文件注册了没有

0
#18cswwwsws回复于2018-02

加了windows 就是cannot read property 'begin' of undefined

0
#17cswwwsws回复于2018-02

cameraTakePicture() {
navigator.camera.getPicture(onSuccess, onFail, {
quality: 50,
destinationType: Camera.DestinationType.DATA_URL
});

function onSuccess(imageData) {
this.src = "data:image/jpeg;base64," + imageData;
}

function onFail(message) {
alert('Failed because: ' + message);
}
},

这个是相机的 

刚刚打印出来看了 好像是baiduAsrPlugin is not defined 怎么吧这个变为全局呢

0
#16cswwwsws回复于2018-02

startSound() {
alert("开始录音")
alert(baiduAsrPlugin)
try{
baiduAsrPlugin.begin();
}catch (e){
alert('e++++'+e)
}
},
endSound() {
alert("结束录音")
baiduAsrPlugin.stop();;
},
resultEnd() {
alert("录音结果")
baiduAsrPlugin.registerNotify(function (res) {
//res参数都带有一个type
alert(JSON.stringify(res));
},function(err){
alert(err);
});
},

 

相机都调用成功了 这个就不成功

0
#15cswwwsws回复于2018-02

我用vue 怎么没调用成功

0
#14liupeng9030回复于2018-01
#13 卡农LLLL回复
..额额...暂时还没有计划做ios的呢..

目前手机要么安卓,要么苹果,android的已经做了,苹果的也是迟早的事情。  还请楼主做一个苹果的百度语音cordova插件,我这边也比较着急。

0
#13卡农LLLL回复于2018-01
#12 liupeng9030回复
我明白的,有ios的sdk,但是我不是做ios开发的,所以希望楼主能像做android的cordova插件那样,做一个ios的demo
展开

..额额...暂时还没有计划做ios的呢..

0
#12liupeng9030回复于2018-01
#9 卡农LLLL回复
现在不是有ios的sdk吗.....百度语音是支持的.

我明白的,有ios的sdk,但是我不是做ios开发的,所以希望楼主能像做android的cordova插件那样,做一个ios的demo

0
#11liupeng9030回复于2018-01
#10 卡农LLLL回复
你不要这样重复的发一样的内容...占楼了呢.

我也不想占楼,可是刚一直发不出去,就多点了几下,sorry。

0
#10卡农LLLL回复于2018-01
#5 liupeng9030回复
什么时候能支持苹果

你不要这样重复的发一样的内容...占楼了呢.

0
#9卡农LLLL回复于2018-01
#6 liupeng9030回复
求助,什么时候能支持苹果?  急用

现在不是有ios的sdk吗.....百度语音是支持的.

0
#6liupeng9030回复于2018-01
#2 卡农LLLL回复
我再发一下链接..主贴想试试A标签.结果并不行.自己手动复制一下吧. https://www.npmjs.com/package/cordova-plugin-baiduasr https://github.com/rxnh8255/baiduasr  
展开

求助,什么时候能支持苹果?  急用

0
TOP
切换版块