效果如下
小程序语音转文字
注:该文件通过loading遮罩层,解决语音转文字插件频繁使用出现的 -30011 please wait recognition finished 问题
------------------------------以下是代码-----------------------------
如不需要保留音频,可vedio-player 注释掉
<view class="yuyinWrap">
<!-- <textarea class='event-content-view' fixed maxlength="{
{orderNoteMax}}" placeholder='请输入内容' value='{
{noteNum}}' cursor-spacing="90" bindinput="bindInputNote" placeholder-class="init_textarea">
<text class="currentWordNumber">{
{noteNum.length | 0}}/{
{orderNoteMax}}</text>
</textarea> -->
<view class="vedio-player" style="{
{!videoUrl.length?'display:none':null}};margin-top:0">
<view class="vedio-file" bindtap="playVedio">
<van-icon name="play-circle-o" />
<view class="item-list">
<view wx:for="{
{30}}" wx:for-item="item" class="item {
{vedioProcess>item*5?'active':''}}" wx:key="index"></view>
</view>
<view class="time">{
{vedioTime}}s</view>
</view>
<!-- <view wx:if="{
{isDelVedio}}" class="del-vedio" bindtap="delVedio">
<van-icon name="clear" />
</view> -->
</view>
<view class="button-view" bind:tap="openVedio">
<image src="../../assets/images/small-blue-record.png"></image>
<span>点击录制音频</span>
</view>
<van-popup show="{
{ vedioVisible }}" position="bottom" custom-style="height: 20%;" z-index="999" overlay="{
{false}}" bind:close="onClose" closeable="{
{true}}" class="audio-dialog">
<view class="vedioDialog">
<view style="margin-bottom:30rpx">
<view>剩余时间:{
{surplusTime}}s</view>
<view wx:if="{
{false}}" class="vedio-player" style="{
{!videoUrl.length?'display:none':null}}">
<view class="vedio-file" style="width: 600rpx;" bindtap="playVedio">
<van-icon name="play-circle-o" />
<view class="item-list">
<view wx:for="{
{30}}" wx:for-item="item" class="item {
{vedioProcess>item*5?'

最低0.47元/天 解锁文章
3531

被折叠的 条评论
为什么被折叠?



