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
>
>
>
>
|