Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Text To Speech (Revisited)

Reply
Thread Tools Display Modes

Text To Speech (Revisited)

 
 
AlexB
Guest
Posts: n/a

 
      03-01-2008
Jon, I want to express my gratitude. You gave me a momentum. Your post
brought certain things into focus and I began paying attention.

It turned out to be very easy and doable.

First I thought of doing it in a .vbs file and run it from my C# code but
there was a better way an MSDN guy suggested.

This is how it looks in C#

using SpeechLib;

// some code

public void textToSpeech ( string text )
{
SpVoice voice = new SpVoice ( );
voice.Speak ( text, SpeechVoiceSpeakFlags.SVSFlagsAsync );
voice.WaitUntilDone ( 30000 );
}

// some code
// An example of using the function call:

textToSpeech ( this.nodesAfterSearch.Count.ToString ( ) + " Records
Found" );

Parts of my code were simplified quite a bit. I now can delete a folder with
..wma and .wav files. Before I could not think of computer telling me the
numbers of items that were found in text or treeView. Now it is a piece of
cake. Viva MS! The options it offers to developers are incredible.

Thanks again, I appreciate it.

"Jon" <> wrote in message
news:...
> "AlexB" <> wrote in message
> news:...
>> P.S. Do you think the SAPI.spvoice will be able to pronounce
>> CAAntiSpyware? This is the most important question. If it will, I will
>> try
>> yoour object for sure. there is little risk involved.

>
>
> Probably not, so I only say how I tend to use it.
>
> For example I have an email program that I wrote that tells me when an
> email
> arrives by voice. I may be out of the room, so the voice serves the
> purpose
> of alerting me to the fact that an email has arrived. Since the voice
> might
> be incomprehensible or I may not hear it from another room, it also pops
> up
> a dialog to show the me the finer details.
>
> So in your case you could perhaps use the voice to alert you to the fact
> that an odd process has been detected and have some dialog to show the
> actual details of the process.
>
> Anyhow, whatever you choose hope it goes well with your project.
>
> --
> Jon
>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
text to speech charles cashion Windows Vista General Discussion 1 03-22-2008 02:49 AM
Text To Speech alexB Windows Vista General Discussion 15 03-01-2008 08:37 PM
Speech Enabled Games, speech recognition ( Business, Professional ( Medical, Legal ) Text-to-Speech Solutions ( TTS ) ( RealSpeak Telecom Call Center, Solo, Word, Mobile ) , Voice Control for ( Automotive, Mobile, Games ) applications, OCR analysis, ola7 Windows Vista General Discussion 0 07-29-2007 02:31 PM
Text to speech Amrykid Windows Vista General Discussion 1 05-16-2007 02:45 AM
Speech to text Anthony Windows Vista Installation 3 03-01-2007 07:07 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59