当前位置: 首页 > 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.pierceye.com/news/507967/

相关文章:

  • 邵阳网站建设推广56m做图片视频的网站是什么
  • 如何提高网站的点击率域名空间网站推广
  • 上海松江做网站建设wordpress 拒绝连接
  • 有免费的个人网站吗富德生命人寿保险公司官方网站保单服务
  • 网站备案 子域名网页视频制作软件
  • 空间 网站网站建设哪个好
  • 公司网站域名价格云南免费网站建设
  • 网站跳转域名不变常见网站架构
  • 山东省建设厅电工证查询网站网站标题的选择
  • 网站建设是属于软件吗电话销售哪里找客户电话
  • 用vue做网站的实例网站制作郑州
  • 五个网站想自己在家做外贸网站
  • 收费的电影网站怎么做网页设计图片的应用
  • 班级网站建设步骤橘子皮主题wordpress
  • 网站模板源文件网站制作需求文档
  • 青岛注册公司网站建网站需要那些步骤
  • 深圳做网上商城网站小蘑菇网站建设软件
  • 广州住建网站网站空间购买价格
  • 金华永康网站建设公司做网站的优点
  • 有免费的微网站制作吗瑞安哪里有培训做网站的
  • 苏州住房和城乡建设局网站wordpress中文书
  • 盐城市滨海县建设局网站wordpress 4.8.1 漏洞
  • 荆州市城市建设投资开发有限公司网站百度人工服务24小时
  • 永久域名购买昆明网站建设优化企业
  • 自适应网站模板下载网页设计培训哪好
  • 做门窗网站便宜的vps租用网站
  • 龙岗附近公司做网站建设多少钱公司行业类型有哪些
  • 188旅游网站管理系统源码做外贸有那些网站平台
  • 江苏网站建设要多少钱近三个月以来的国际新闻
  • 旬阳做网站免费漫画软件