微信小程序接入阿里Paraformer实时麦克风语音识别成文字教程及代码
阿里的Paraformer对接流程
https://help.aliyun.com/zh/model-studio/developer-reference/paraformer-real-time-speech-recognition-api
由于阿里官方没有提供微信小程序的实现代码,于是我就自己写了一个基于websocket的微信小程序语音识别。
先看效果代码
wxml
<view> <button bindtap="startRecording">开始录音</button> <button bindtap="stopRecording">停止录音</button> <view>实时语音识别结果</view> <view>{{voicetext}}</view> </view>js
点击查看代码
网友评论0