3

I'm trying to use System.Speech.Synthesis to play text that is then output over a tapi modem.

SetOutputToDefaultAudioDevice() is easy enough to figure out, but I don't want the sound to come out of the speakers.

I think i need to use SetOutputToAudioStream, but I'm not sure how to use it and I can't find any examples ...

I tried changing the default device in the control panel, but that didn't work either :(

Insight anyone?

Thanks

TonyP
  • 31
  • 1
  • 2
  • 1
    Does the modem have a .NET api? If it does, check to see how it exposes its input. If it's a stream, you should be able to take the stream and pass it into the SetOutputToAudioStream method, and have your output sent to the device that way. – fire.eagle Jul 08 '10 at 01:05
  • What fire.eagle said - it's hard to tell you what you need since you haven't described what the modem side looks like. SetOutputToAudioStream is pretty easy to use. – Eric Brown Jul 14 '10 at 17:28

2 Answers2

0

Have you looked at the answers here? It has a brief example.

Also - if your modem supports TAPI, you should review the samples in the Windows SDK, in particular, the Simple Telephony sample in %windowssdkdir%\Samples\winui\speech\simpletelephony. This is written in C++, but it demonstrates how to get the audio device ID for the modem and to set the device ID for SAPI's audio stream.

Community
  • 1
  • 1
Eric Brown
  • 13,774
  • 7
  • 30
  • 71
-2

You can change output of text to speech in control panel->speech recognition->text to speech->advanced. Then select "Use this audio output device" and select audio device to output text to speech.

Dexit
  • 1