微信小程序 文字转为语音(插件:微信同声传译)
/*
* A JavaScript For AudioContext And WechatSI , voice play
* 注意事项:该函数需要小程序:”微信同声传译“ 插件支持,在微信公众平台-设置-第三方服务中添加此插件
(Note: this function requires small program: "WeChat simultaneous interpretation" plug-in support, add this plug-in in WeChat public platform-setting-third party service)
* 使用注意事项: 在小程序app.json 中添加插件,在需要的页面引入js
(Notes for use: add a plug-in in the small program app.json, and introduce js into the required page )
* "plugins": {
"WechatSI": { // 插件名称
"version": "0.3.3", // 插件版本
"provider": "wx069ba97219f66d99" // 插件appid
}
}
* 需要转换为语音的文字作为必要参数传入: AudioContext.AudioContext(参数);
(Text that needs to be converted to speech is passed in as a necessary parameter: AudioContext.AudioContext(params))
* author: cxr
*/
2021-04-24 12:55:27
2KB
文字转语音
1