前言
如果你不会编写安卓插件,你可以先看看我之前零基础的文章(uniapp0基础编写安卓原生插件和调用第三方jar包和编写语音播报插件之零基础编写安卓插件),
我们使用android.speech.tts.TextToSpeech进行编写语言播放插件
开始
uniapp
<template>
<view style="margin: 80rpx 20rpx;">
<view>
<button type="primary" @click="t1">初始化语音播放</button>
</view>
<view style="margin-top: 30rpx;">
<button type="primary" @click="t2">播放语音1</button>
</view>
<view style="margin-to