Different audio device in System.Speech.Synthesis
-
Hi, I'm writing an application that uses an System.Speech.Synthesis.SpeechSynthesizer to generate some speech. The class has a method to set the output to the default audio device or to another audiostream (System.IO.Stream). But how can I tell it to use just another audio device? I think I might have to get a Stream object of that other device to pass it to the SetOutputToAudioStream() method of the synthesizer, but I have no clue how to do so. Any help would be appreciated. Michael.
-
Hi, I'm writing an application that uses an System.Speech.Synthesis.SpeechSynthesizer to generate some speech. The class has a method to set the output to the default audio device or to another audiostream (System.IO.Stream). But how can I tell it to use just another audio device? I think I might have to get a Stream object of that other device to pass it to the SetOutputToAudioStream() method of the synthesizer, but I have no clue how to do so. Any help would be appreciated. Michael.
-
Hi, I'm writing an application that uses an System.Speech.Synthesis.SpeechSynthesizer to generate some speech. The class has a method to set the output to the default audio device or to another audiostream (System.IO.Stream). But how can I tell it to use just another audio device? I think I might have to get a Stream object of that other device to pass it to the SetOutputToAudioStream() method of the synthesizer, but I have no clue how to do so. Any help would be appreciated. Michael.
-
Thanks a lot, that should do it. I'll try it later.
-
Thanks a lot, that should do it. I'll try it later.
Ok, here's a new problem: Filler()(from the link above) is called, while the synthesizer is still filling the stream with data. As you can imagine, this results in a disaster. So I cannot make the stream thread-safe (because can't control the filling end) and even if i could, I would have gasps in my output because the buffer would be filled like this: (1 =data in cycle 1 2=data in cycle 2 0= no data) 11111111111111111100000000000000000 |stream is filled until here 22222222222222222220000000000000000 while it should look like this: 1111111111111111112222222222222222222 Any ideas? Edit: Ok, finally got it - i had to wrap the whole synthesizer-class to make the stream thread-safe, but finally, it works. Thanks @ all.
modified on Tuesday, June 24, 2008 2:46 PM