By default, ASP.Net applications do not start with sufficient permissions to access speech synthesis, and an attempt to run Larsenal code will fail with a security error.
, WCF, , Windows. ASP.Net . , , .
, ? .
, 11-12-09, :
System.Speech , wav , , . -, :
1) Page.aspx 'embed', Windows Media. - "PlayText.aspx? Textid = whatever".
2) PlayText.aspx ( WCF) , .
3) Speechreader MemoryStream SpeechSynthesiser.SetOutputToWaveStream, . - Response.Write() - ed .
SpeechReader:
byte[] ITextReader.SpeakText(string text)
{
using (SpeechSynthesizer s = new SpeechSynthesizer())
{
using (MemoryStream ms = new MemoryStream())
{
s.SetOutputToWaveStream(ms);
s.Speak(text);
return ms.GetBuffer();
}
}
}
, . , . , , - :
<byte>23</byte>
<byte>42</byte>
<byte>117</byte>
...