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

qq登录网站怎么做安全的网站建设推广

qq登录网站怎么做,安全的网站建设推广,erp沙盘模拟实训报告,商务网站建设模板咨询区 user2110292我的项目有一个需求需要将可以将 文本 转化为 声音#xff0c;请问大家是否有开源的 C# 库 来解决这件事情#xff1f;回答区 HABJAN最近 Google 发布了一个开源的 Google Cloud Text To Speech 包#xff0c;.NET版本的github链接#xff1a;https://gi… 咨询区 user2110292我的项目有一个需求需要将可以将 文本 转化为 声音请问大家是否有开源的 C# 库 来解决这件事情回答区 HABJAN最近 Google 发布了一个开源的 Google Cloud Text To Speech 包.NET版本的github链接https://github.com/jhabjan/Google.Cloud.TextToSpeech.V1可参考下面的例子GoogleCredential credentials GoogleCredential.FromFile(Path.Combine(Program.AppPath, jhabjan-test-47a56894d458.json));TextToSpeechClient client  TextToSpeechClient.Create(credentials);SynthesizeSpeechResponse response  client.SynthesizeSpeech(new SynthesisInput(){Text  Google Cloud Text-to-Speech enables developers to synthesize natural-sounding speech with 32 voices},new VoiceSelectionParams(){LanguageCode  en-US,Name  en-US-Wavenet-C},new AudioConfig(){AudioEncoding  AudioEncoding.Mp3} );string speechFile  Path.Combine(Directory.GetCurrentDirectory(), sample.mp3);File.WriteAllBytes(speechFile, response.AudioContent);HABJAN完全不需要使用任何开源框架在 .NET 内部提供的 System.Speech.Synthesis 类就可以帮你解决这个问题引用下 System.speech.dll 命名空间即可。using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Speech.Synthesis; // first import this packagenamespace textToSpeech{public partial class home : Form{public string s  pran; // storing string (pran) to sprivate void home_Load(object sender, EventArgs e){speech(s); // calling the function with a string argument}private void speech(string args) // defining the function which will accept a string parameter{SpeechSynthesizer synthesizer  new SpeechSynthesizer();synthesizer.SelectVoiceByHints(VoiceGender.Male , VoiceAge.Adult); // to change VoiceGender and VoiceAge check out those links belowsynthesizer.Volume  100;  // (0 - 100)synthesizer.Rate  0;     // (-10 - 10)// Synchronoussynthesizer.Speak(Now Im speaking, no other functionll work);// Asynchronoussynthesizer.SpeakAsync(Welcome  args); // here args  pran}       }}这里简单提一下最好用异步方式 SpeakAsync 替代同步的 Speak 方法这样的话调用线程就不会被阻塞提高程序的吞吐率。点评区 这个功能好不过建议大家了解下强大的 Google.Cloud.TextToSpeech。
http://www.zqtcl.cn/news/507967/

相关文章:

  • 济南网站建设济南wordpress计次查询
  • 做英文小工具网站赚钱商城网站是免费开吗
  • 做网站需要注意的问题seo推广代运营
  • 采购网站大全wordpress decorum
  • wordpress建站教程道一网页效果图素材
  • 广州网站开发哪家专业免费咨询怀孕医生
  • 洛阳网站的优化阿里云购买域名后怎么建网站
  • 我是做环保类产品注册哪些浏览量大的网站推销自己的产品比较好呢网站功能模块设计
  • 叫人做网站多少钱百度免费网站怎样建设
  • 本地南通网站建设新手编程入门先学什么
  • asp网站开发的背景与环境久久建筑网会员
  • 河北省住房建设厅官方网站个人计算机做服务器建网站
  • 上海自助建站费用页游网站
  • 浙江省住建厅网站沈阳网站建设专家
  • 基础建设文本网站施工企业在施工过程中发现设计文件和图纸有差错的应当
  • 做互联网交易网站的条件17网站一起做网店揭阳
  • 做公司网站合同asp.net sql server网站建设 pdf
  • 建筑兼职网站天津网站优化公司哪家好
  • 怎么做网站设计商城型网站开发网站建设
  • 建设网站目录帮别人做网站要投资吗
  • 网站meta 优化建议桥梁建设设计网站
  • 网站建设 甘肃wordpress rss去掉
  • 网站安全检测大连网龙建站优化推广
  • 人才网官方网站公众号排名优化软件
  • 淘宝返利网站建设软件开发哪里学好
  • 烟台网站制作公司如何注册国外网站
  • discuz企业网站网站可以做音频线吗
  • 怎样制作网站教程哪家好制作网页的的网站
  • 网站没有织梦后台无锡seo公司网站
  • 哈尔滨住房和城乡建设厅网站公司网站建设 费用入账