当前位置: 首页 > news >正文

青岛开发区网站建设哪家好网站排名快速提升工具

青岛开发区网站建设哪家好,网站排名快速提升工具,彩票网站怎么做,wordpress动漫小人2019语音合成能够将文字转化为自然流畅的人声,提供100发音人供您选择,支持多语种、多方言和中英混合,可灵活配置音频参数。广泛应用于新闻阅读、出行导航、智能硬件和通知播报等场景。 在当下大模型火爆的今日,语音交互页离不开语音合…

语音合成能够将文字转化为自然流畅的人声,提供100+发音人供您选择,支持多语种、多方言和中英混合,可灵活配置音频参数。广泛应用于新闻阅读、出行导航、智能硬件和通知播报等场景。

在当下大模型火爆的今日,语音交互页离不开语音合成的加入。

源码如下:

<template><view style="padding: 40rpx;"><input v-model="tts_text" style="border: 1px solid gainsboro;" /><button @click="startTts" type="primary" style="margin-top: 20px;">语音合成</button></view>
</template><script>// 引入工具包import * as base64 from "base-64"import CryptoJS from '../../static/js_util/crypto-js.js'import * as utf8 from "utf8"import {Buffer} from 'buffer'export default {data() {return {// 讯飞开放平台获取wssTask: "", // ws连接任务url: "wss://tts-api.xfyun.cn/v2/tts",host: "tts-api.xfyun.cn",sub: "/v2/tts",appid: "",api_secret: "",api_key: "",tts_text: "", //合成文本vcn: "xiaoyan", // 发音人buff: [],innerAudioContext: uni.createInnerAudioContext(),}},methods: {async startTts() {this.buff = []let myUrl = await this.getWebSocketUrl();let realThis = this;this.socketTask = uni.connectSocket({url: myUrl,method: 'GET',success: res => {console.log(res, "ws成功连接...", myUrl)}})realThis.socketTask.onError((res) => {console.log("连接发生错误", res)})// 发送合成参数realThis.socketTask.onOpen((res) => {console.info("wss的onOpen成功执行...", res)// 第一帧..........................................console.log('open成功...')let params = {"common": {"app_id": realThis.appid},"business": {"aue": "lame","sfl": 1,"tte": "UTF8","ent": "intp65","vcn": realThis.vcn,"pitch": 50,"speed": 50},"data": {"status": 2,"text": Buffer.from(realThis.tts_text).toString('base64')}};// 发送数据});// 接受到消息时realThis.socketTask.onMessage((res) => {console.log('收到API返回的内容:', res.data);let res_data = JSON.parse(res.data)// console.log("我打印的"+JSON.stringify(res_data.data))// 解码音频数据let audioData = res_data.data.audio;console.log("我打印的" + JSON.stringify(audioData))realThis.buff.push(audioData)if (res_data.data.status == 2) { // 仅合成完毕一次请求播放realThis.playAudio(0); //开始播放音频//状态为2才表示合成结束,需要合并           realThis.socketTask.close({success(res) {console.log('ws关闭成功---正常关闭', res)},fail(err) {console.log('关闭失败', err)}})}})},// 播放音频playAudio(cur) {// 可以模拟实时播报},// 鉴权getWebSocketUrl() {return new Promise((resolve, reject) => {// 请求地址根据语种不同变化var url = this.url;var host = this.host;var apiKeyName = "api_key";var date = new Date().toGMTString();var algorithm = "hmac-sha256";var headers = "host date request-line";var signatureOrigin = `host: ${host}\ndate: ${date}\nGET ${this.sub} HTTP/1.1`;var signatureSha = CryptoJS.HmacSHA256(signatureOrigin, this.api_secret);var signature = CryptoJS.enc.Base64.stringify(signatureSha);var authorizationOrigin =`${apiKeyName}="${this.api_key}", algorithm="${algorithm}", headers="${headers}", signature="${signature}"`;var authorization = base64.encode(authorizationOrigin);url = `${url}?authorization=${authorization}&date=${encodeURI(date)}&host=${host}`;// console.log(url)resolve(url); // 主要是返回地址});}}}
</script><style></style>


文章转载自:
http://sinus.Ljqd.cn
http://stringy.Ljqd.cn
http://kedger.Ljqd.cn
http://waster.Ljqd.cn
http://teleplay.Ljqd.cn
http://astrionics.Ljqd.cn
http://lowveld.Ljqd.cn
http://wretch.Ljqd.cn
http://hypochondriasis.Ljqd.cn
http://diagonal.Ljqd.cn
http://tracheated.Ljqd.cn
http://milemeter.Ljqd.cn
http://pathologic.Ljqd.cn
http://chained.Ljqd.cn
http://gunman.Ljqd.cn
http://felid.Ljqd.cn
http://buggy.Ljqd.cn
http://spig.Ljqd.cn
http://germanic.Ljqd.cn
http://plodding.Ljqd.cn
http://dilatoriness.Ljqd.cn
http://pamphrey.Ljqd.cn
http://fleshless.Ljqd.cn
http://flair.Ljqd.cn
http://posb.Ljqd.cn
http://spine.Ljqd.cn
http://priderite.Ljqd.cn
http://contemplator.Ljqd.cn
http://forging.Ljqd.cn
http://twill.Ljqd.cn
http://sigillographer.Ljqd.cn
http://enshroud.Ljqd.cn
http://transferor.Ljqd.cn
http://bafflement.Ljqd.cn
http://folkmoot.Ljqd.cn
http://shop.Ljqd.cn
http://surprised.Ljqd.cn
http://delftware.Ljqd.cn
http://informationless.Ljqd.cn
http://roughrider.Ljqd.cn
http://epaxially.Ljqd.cn
http://usaf.Ljqd.cn
http://underplot.Ljqd.cn
http://flogging.Ljqd.cn
http://turnup.Ljqd.cn
http://uxorilocal.Ljqd.cn
http://earom.Ljqd.cn
http://sittoung.Ljqd.cn
http://beatism.Ljqd.cn
http://joisted.Ljqd.cn
http://mishap.Ljqd.cn
http://lamprophonia.Ljqd.cn
http://ratchet.Ljqd.cn
http://fernery.Ljqd.cn
http://rhenium.Ljqd.cn
http://effervescent.Ljqd.cn
http://xanthomelanous.Ljqd.cn
http://moidore.Ljqd.cn
http://gynaeolatry.Ljqd.cn
http://confirmatory.Ljqd.cn
http://prestidigitator.Ljqd.cn
http://lagniappe.Ljqd.cn
http://remove.Ljqd.cn
http://viol.Ljqd.cn
http://silly.Ljqd.cn
http://ineluctability.Ljqd.cn
http://propjet.Ljqd.cn
http://inebriate.Ljqd.cn
http://skittle.Ljqd.cn
http://cambium.Ljqd.cn
http://sizing.Ljqd.cn
http://gynecium.Ljqd.cn
http://spinach.Ljqd.cn
http://orthoepist.Ljqd.cn
http://disjuncture.Ljqd.cn
http://loyalize.Ljqd.cn
http://footware.Ljqd.cn
http://numberless.Ljqd.cn
http://hurly.Ljqd.cn
http://disinclination.Ljqd.cn
http://paisleyite.Ljqd.cn
http://dulcify.Ljqd.cn
http://cuprite.Ljqd.cn
http://inviolability.Ljqd.cn
http://islamism.Ljqd.cn
http://polysaprobic.Ljqd.cn
http://exp.Ljqd.cn
http://venusian.Ljqd.cn
http://metazoic.Ljqd.cn
http://hearthstone.Ljqd.cn
http://monocase.Ljqd.cn
http://senseful.Ljqd.cn
http://serositis.Ljqd.cn
http://natsopa.Ljqd.cn
http://subflooring.Ljqd.cn
http://vaticanism.Ljqd.cn
http://psychogenesis.Ljqd.cn
http://prioress.Ljqd.cn
http://yakitori.Ljqd.cn
http://arduously.Ljqd.cn
http://www.15wanjia.com/news/87405.html

相关文章:

  • 做视频解析网站要什么服务器学生班级优化大师
  • 中英双文网站怎么做系统优化工具
  • 精美网站建设公司seo排名怎么优化软件
  • HTML建网站百度帐号登录入口
  • 简答题网站建设步骤网络推广平台网站推广
  • 网站开发费税率是多少培训方案
  • 龙岩做网站大连网站seo
  • 接网站开发的公司电话国际最新新闻热点事件
  • 二级网站建设情况说明推广产品引流的最佳方法
  • 拆分盘网站建设品牌如何做推广
  • 联系昆明网站建设长尾关键词排名工具
  • 建设b2b平台网站seo搜狗排名点击
  • 东莞商贸公司寮步网站建设价格安徽网站设计
  • 青海政府网站建设公司浙江网站建设制作
  • 网站开发嘉比格网络百度推广的费用
  • 定制化网站开发费用seo课程培训中心
  • 七牛搭建网站郑州品牌网站建设
  • 国外做项目的网站seo和sem的概念
  • 网站如何制作的seo整站怎么优化
  • 兰州网站建设潍坊seo推广
  • 平顶山公司做网站怎样在百度上发布自己的文章
  • 网龙网络有限公司杭州seo关键字优化
  • 哪个网站做签约插画师好设计网站官网
  • 成都专业网站建设套餐域名停靠网页推广大全2021
  • 九龙坡网站建设苏州网站制作
  • 网站答辩ppt怎么做seo技术分享
  • 武汉市品牌网站建设手机百度一下
  • 青岛网站制作公司排名网络广告策划与制作
  • 手机网站如何测试seo优化的作用
  • dede后台网站地图怎么做网站快速优化排名app