当前位置:网站首页>uni-app开发语音识别app,讲究的就是简单快速。
uni-app开发语音识别app,讲究的就是简单快速。
2022-07-05 12:42:00 【No Bug】
因项目需要,得开发一个手机app,对于从来没有接触过移动端开发的我,对此还是比较恐惧的。
然后我发现了uni-app,才知道app开发也可以如此简单。
uni-app介绍(基于Vue的跨平台前端框架)
以下是来自官网的介绍。进入官网
uni-app
是一个使用 Vue.js (opens new window)开发所有前端应用的框架,开发者编写一套代码,可发布到iOS、Android、Web(响应式)、以及各种小程序(微信/支付宝/百度/头条/飞书/QQ/快手/钉钉/淘宝)、快应用等多个平台。
DCloud
公司拥有900万开发者、数百万应用、12亿手机端月活用户、数千款uni-app插件、70+微信/qq群。阿里小程序工具官方内置uni-app(详见 (opens new window)),腾讯课堂官方为uni-app录制培训课程(详见 (opens new window)),开发者可以放心选择。
uni-app
在手,做啥都不愁。即使不跨端,uni-app
也是更好的小程序开发框架(详见 (opens new window))、更好的App跨平台框架、更方便的H5开发框架。不管领导安排什么样的项目,你都可以快速交付,不需要转换开发思维、不需要更改开发习惯。
为什么要选择uni-app?
uni-app
在开发者数量、案例、跨端抹平度、扩展灵活性、性能体验、周边生态、学习成本、开发成本等8大关键指标上拥有更强的优势。
开发者/案例数量更多
数百万应用、uni统计月活12亿、70+微信/qq群、更高的百度指数
跨端完善度更高,真正落地的提高生产力
平台能力不受限
在跨端的同时,通过条件编译+平台特有API调用,可以优雅的为某平台写个性化代码,调用专有能力而不影响其他平台。
支持原生代码混写和原生sdk集成。
性能体验优秀
加载新页面速度更快、自动diff更新数据。
App端支持原生渲染,可支撑更流畅的用户体验。
小程序端的性能优于市场其他框架。评测
周边生态丰富
插件市场数千款插件。
支持NPM、支持小程序组件和SDK。
微信生态的各种sdk可直接用于跨平台App。
学习成本低
基于通用的前端技术栈,采用vue语法+微信小程序api,无额外学习成本。
开发成本低
不止开发成本,招聘、管理、测试各方面成本都大幅下降。
HBuilderX是高效开发神器,熟练掌握后研发效率至少翻倍(即便只开发一个平台)。
进入正题
点击路由转文字,可以进行实时转换。
主要用到的 plus.speech.startRecognize()
handleVoice() {
var options = { // 语音转文字的设置
engine: 'baidu'
};
console.log('开始语音识别:');
let _this = this; //在 plus.speech.startRecognize 里面的this不是Vue对象 , 拿不到data。所以需要_this
plus.speech.startRecognize(options, function(s){ //plus.speech.startRecognize可查官方文档
console.log(s);
_this.text += s;
}, function(e){
console.log('语音识别失败:'+JSON.stringify(e));
} );
},
边栏推荐
- CVPR 2022 | single step 3D target recognizer based on sparse transformer
- 解决 UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa2 in position 107
- 从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
- The solution of outputting 64 bits from printf format%lld of cross platform (32bit and 64bit)
- Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution
- 百日完成国产数据库opengausss的开源任务--openGuass极简版3.0.0安装教程
- MySQL splits strings for conditional queries
- 10 minute fitness method reading notes (5/5)
- Halcon 模板匹配实战代码(一)
- Install rhel8.2 virtual machine
猜你喜欢
VoneDAO破解组织发展效能难题
MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution
太方便了,钉钉上就可完成代码发布审批啦!
Simply take stock reading notes (3/8)
Laravel document reading notes -mews/captcha use (verification code function)
[cloud native] use of Nacos taskmanager task management
Taobao order amount check error, avoid capital loss API
Install rhel8.2 virtual machine
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
随机推荐
RHCSA1
Wechat enterprise payment to change access, open quickly
MySQL splits strings for conditional queries
Comprehensive upgrade of Taobao short video photosynthetic platform
A possible investment strategy and a possible fuzzy fast stock valuation method
SAP SEGW 事物码里的 ABAP Editor
Transactions from January 6 to October 2022
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
Difference between JUnit theories and parameterized tests
MySQL 巨坑:update 更新慎用影响行数做判断!!!
Actual combat simulation │ JWT login authentication
开发者,云原生数据库是未来吗?
The solution of outputting 64 bits from printf format%lld of cross platform (32bit and 64bit)
A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
HiEngine:可媲美本地的云原生内存数据库引擎
Yyds dry inventory JS intercept file suffix
A small talk caused by the increase of sweeping
实战模拟│JWT 登录认证
Vonedao solves the problem of organizational development effectiveness
RHCAS6