DotNetSpeech.dll在VS2013无法使用

zcw1967 2014-01-05 05:19:51
系统是win7,64位的,vs2013无法使用,无论是不是x86平台,请高手解惑,谢谢!
...全文
304 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zcw1967 2014-01-08
  • 打赏
  • 举报
回复
使用另一个方法
using System;
using System.Speech.Synthesis;

namespace SampleSynthesis
{
class Program
{
static void Main(string[] args)
{

// Initialize a new instance of the SpeechSynthesizer.
SpeechSynthesizer synth = new SpeechSynthesizer();

// Configure the audio output.
synth.SetOutputToWaveFile(@"C:\Test\Sample.wav");

// Register for the SpeakCompleted event.
synth.SpeakCompleted += new EventHandler<SpeakCompletedEventArgs>(synth_SpeakCompleted);

// Build a prompt.
PromptBuilder builder = new PromptBuilder();
builder.AppendText("This sample asynchronously speaks a prompt to a WAVE file.");

// Speak the string asynchronously.
synth.SpeakAsync(builder);

Console.WriteLine();
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
}

// Handle the SpeakCompleted event.
static void synth_SpeakCompleted(object sender, SpeakCompletedEventArgs e)
{

// Create a SoundPlayer instance to play the output audio file.
System.Media.SoundPlayer m_SoundPlayer =
new System.Media.SoundPlayer(@"C:\Test\Sample.wav");

// Play the output file.
m_SoundPlayer.Play();
}
}
}

zcw1967 2014-01-08
  • 打赏
  • 举报
回复
是我的系统问题吧,还是不能用!
zcw1967 2014-01-08
  • 打赏
  • 举报
回复
完了,没了回答。
本拉灯 2014-01-05
  • 打赏
  • 举报
回复
没装语音库吧。WIN7用这个组件是没问题的我也用
全栈极简 2014-01-05
  • 打赏
  • 举报
回复
不能用报什么错吗?其实用这个就能实现。http://technet.microsoft.com/zh-CN/library/ms586901

8,833

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 组件/控件开发
社区管理员
  • 组件/控件开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧