Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I want to Convert Text in to audio(.wav format) in Web application. I am able to do in local but its not working in VPS. I am using SpeechLib.dll.
Please tell me any other way to do it.
Thanks In Advance.

using SpeechLib;



protected void btnStartProject_Click(object sender, EventArgs e)
{

int speechRate = -6; // Ranges from -10 to 10
int volume = 100; // Range from 0 to 100.
SpVoice speech = new SpVoice();

try
{

string path = "C:\\code\\";
SpeechStreamFileMode SpFileMode = SpeechStreamFileMode.SSFMCreateForWrite;
SpFileStream SpFileStream = new SpFileStream();
SpFileStream.Open(path + "d1.wav", SpFileMode, false);
Response.Write(path + ' ' + "P ");
speech.AudioOutputStream = SpFileStream;
speech.Rate = speechRate;
speech.Volume = volume;
Response.Write(path + ' ' + " 5 ");
speech.Speak(TextBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);
Response.Write("P-K");
speech.WaitUntilDone(Timeout.Infinite);
Response.Write("Abcd");
SpFileStream.Close();
Response.Write("wav file upload");

}
catch (Exception eds)
{
Response.Write(eds.Message);
}
}
Posted
Updated 16-Feb-12 19:19pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900