一.app版本需要先去百度智能云申请
注意填写完,需要打包成自定义基座或者安装rpk包,本地是无效的
封装recording-popup.vue
组件
{{ tips }}
使用recording-popup
const recordingPopupRef = ref('') const text = ref('') const openRecord = () => { recordingPopupRef.value.recordShow = true }, const micInput = (str) => { //如果你知道输入框的cursor,就可以像我这样写,要是不知道就写成text.value += str了 if (cursor === 0) { text.value += str } else { text.value = text.value.slice(0, cursor) + str + text.value.slice(cursor); } }
二.小程序版本,进入微信小程序后台-->进入设置-->第三方设置-->添加插件->搜索同声传译-->完成添加。
在manifest.json文件中增加插件版本等信息
"mp-weixin" : { "plugins" : { "WechatSI" : { "version" : "0.3.5", "provider" : "" } }, }
封装recording-popup.vue
组件
{{ tips }}
使用recording-popup
const recordShow = ref(false) const text = ref('') const open = () => { recordShow.value = true } const micInput = (str) => { //如果你知道输入框的cursor,就可以像我这样写,要是不知道就写成text.value += str了 if (cursor === 0) { text.value += str } else { text.value = text.value.slice(0, cursor) + str + text.value.slice(cursor); } }