speechsynthesizer

SpeechSynthesizer in ASP.NET - async error

淺唱寂寞╮ 提交于 2020-01-13 20:23:26
问题 I would like to be able to generate speech in my ASP.NET app by calling speak.aspx?text=Hello%20world . This would give a response in .wav format. So far I have a blank page with code behind: protected void Page_PreRender(object sender, EventArgs e) { using (var ss = new SpeechSynthesizer()) { MemoryStream str = new MemoryStream(); ss.SetOutputToWaveStream(str); ss.Speak(Server.UrlDecode(Request.QueryString["text"])); Response.AddHeader("Content-Type", "audio/wav"); str.WriteTo(Response

SpeechSynthesizer in ASP.NET - async error

僤鯓⒐⒋嵵緔 提交于 2020-01-13 20:22:10
问题 I would like to be able to generate speech in my ASP.NET app by calling speak.aspx?text=Hello%20world . This would give a response in .wav format. So far I have a blank page with code behind: protected void Page_PreRender(object sender, EventArgs e) { using (var ss = new SpeechSynthesizer()) { MemoryStream str = new MemoryStream(); ss.SetOutputToWaveStream(str); ss.Speak(Server.UrlDecode(Request.QueryString["text"])); Response.AddHeader("Content-Type", "audio/wav"); str.WriteTo(Response

SpeechSynthesizer.SelectVoice() Fails with “No matching voice is installed or the voice was disabled”

家住魔仙堡 提交于 2019-12-29 01:28:13
问题 I am modifying Scott Hanselman's BabySmash code to support other languages. I installed the speech platform and a new language per these steps. The language now shows up in the registry: The language can now be selected and played by Windows: System.Speech.Synthesis.SpeechSynthesizer.GetInstalledVoices() now returns the voice. However SelectVoice() in the code below throws the error "System.ArgumentException: Cannot set voice. No matching voice is installed or the voice was disabled." string

No response to a HTTP Get request in WebAPI in .NET 4.5 while using SpeechSynthesis for converting text to speech

a 夏天 提交于 2019-12-24 05:53:32
问题 I'm trying to setup a simple web service using WebAPI. Here is what I have for code: public class SpeakController : ApiController { // // api/speak public HttpResponseMessage Get(String textToConvert, String outputFile, string gender, string age = "Adult") { VoiceGender voiceGender = (VoiceGender)Enum.Parse(typeof(VoiceGender), gender); VoiceAge voiceAge = (VoiceAge)Enum.Parse(typeof(VoiceAge), age); using (SpeechSynthesizer synthesizer = new SpeechSynthesizer()) { synthesizer

Is there any japanese TTS voice to work with C# SpeechSynthesizer

时间秒杀一切 提交于 2019-12-21 20:37:43
问题 Is there any Japanese voice for C#'s SpeechSynthesizer TTS? If so please state detailed information about it, better if documentation provided. Thanks in advance. 回答1: Microsoft's Agent had a set of free voices including Japanese based on the L&H TTS3000 engine. The engines were SAPI 4 compatible. Unfortunately the Microsoft Agent site seems to be unavailable at the moment 回答2: Microsoft has a list of third-party TTS engines here. In particular, NeoSpeech has a Japanese TTS engine. Also,

Ultra Fast Text to Speech (WAV -> MP3) in ASP.NET MVC

人走茶凉 提交于 2019-12-20 14:44:15
问题 This question is essentially about the suitability of Microsoft's Speech API (SAPI) for server workloads and whether it can be used reliably inside of w3wp for speech synthesis. We have an asynchronous controller that uses uses the native System.Speech assembly in .NET 4 (not the Microsoft.Speech one that ships as part of Microsoft Speech Platform - Runtime Version 11) and lame.exe to generate mp3s as follows: [CacheFilter] public void ListenAsync(string url) { string fileName = string.Format

No voice installed on the system or none available with the current security setting

℡╲_俬逩灬. 提交于 2019-12-20 02:26:10
问题 Exception on IIS Server When try to create .wav file on c# using SpeechSynthesizer. 回答1: This error is caused when the application is unable to access a voice for the SpeechSynthesizer to use. The first possible cause is the lack of any installed voices on the system. Odds are this isn't the problem, but you should still double check by running something like the following bit of code: SpeechSynthesizer ssTest = new SpeechSynthesizer(); System.Diagnostics.Debug.WriteLine(ssTest

Are the SpeakProgressEventArgs of the SpeechSynthesizer inaccurate?

瘦欲@ 提交于 2019-12-19 17:48:13
问题 Using the System.Speech.Synthesis.SpeechSynthesizer class in .Net 3.5, the AudioPosition property of the SpeakProgressEventArgs appears to be inaccurate. The following code produces the following output: Code: using System; using System.Speech.Synthesis; using System.Threading; namespace SpeechTest { class Program { static ManualResetEvent speechDoneEvent = new ManualResetEvent(false); static void Main(string[] args) { SpeechSynthesizer synthesizer = new SpeechSynthesizer(); synthesizer

using System.Speech.Synthesis with Windows10 universal app (XAML-C#)

╄→гoц情女王★ 提交于 2019-12-11 03:43:29
问题 I tried to use the SpeechSynthesizer from System.Speech.Synthesis because it seems more comprehensive than the one I used before (Windows.Media.SpeechSynthesis) : I want to be able to set the volume, the gender of the voice, ... Besides, the french prononciation has some bugs, so I wanted to check if System.Speech was better. I added the reference, but the Build gives this error and I can't fix it : Cannot find type System.MarshalByRefObject in module CommonLanguageRuntimeLibrary. 回答1: There

Synchronize video subtitle with text-to-speech voice

亡梦爱人 提交于 2019-12-10 02:56:32
问题 I try to create a video of a text in which the text is narrated by text-to-speech. To create the video file, I use the VideoFileWriter of Aforge.Net as the following: VideoWriter = new VideoFileWriter(); VideoWriter.Open(CurVideoFile, (int)(Properties.Settings.Default.VideoWidth), (int)(Properties.Settings.Default.VideoHeight), 25, VideoCodec.MPEG4, 800000); To read aloud the text I use SpeechSynthesizer class and write the output to a wave stream AudioStream = new FileStream(CurAudioFile,