import system_util from "../system_util"
// import AndroidTTS from "./androidTTs/androidTTS.js"

const tts = uni.requireNativePlugin("tts")
const init = () => {
	var info = system_util.getInfo()
	if (info.osName == "android") {
		tts.init(res => {
			console.log(res)
		})
	}
}

const toSpeak = (content : string) => {
	var info = system_util.getInfo()
	if (info.osName == "android") {
		tts.speech(content, res => {
			console.log(res)
		})
	}
}

export default {
	init,
	toSpeak
}