for sample code please have a look at Andreas' FAQ and some other
samples (e.g. the VB IVR sample) Andreas already posted.
Today I'd like to present you the probably most comprehensive list
of audio playback options with TAPI, I think there should be a method
that will fit your requirements:
I don't remember details but I remember that this didn't work for
DirectX worked for playback but we had problems with recording.
Although DirectX only works well if the devices are using have
DirectX drivers. I don't know any TSP that comes with a DirectX
audio driver, so with DirectX you are always using an emulated
audio driver and therefore this doesn't help much. Advantage is
that it can be used with VB.
3. Wave API
The wave API is the API of choice for most setups, it has the lowest
footprint. Drawback is that it requires audio files of the format
the device supports and it only works with devices that offer a
The wave API can't be used with VB efficiently (due to callback
functions), you might get it to work but I wouldn't recommend
it as long as you aren't using C++.
DirectShow is the way we are currently using with our application.
It requires more resources than the Wave API approach but the
big advantage is that you can playback files of any audio format.
(Additionally this method can be used to handle TSP's without
wave driver like the H.323 TSP when combined with method 6.)
Though, this approach is a bit more complex and it might take some
time for you to get a stable solution. Please understand that I can
give you tips on implementing but I cannot post our source code.
5. Media Streaming Terminal
You can use the media streaming terminal to feed audio data into a TAPI3
terminal (or vice versa). Advantage is that you can handle calls with the
H.323 TSP which doesn't offer a wave driver.
On the other hand you cannot use this approach with pure VB.
6. Pluggable Terminal
This is probably the most complex approach but it has some advantages:
You can use DirectShow and get all advantages of 4. but you can also
handle H.323 calls (and all other TSP's with MSP but no wave driver).
Additionally you could record and play video streams as well. (we will use
this approach in our nextgen releases)
7. TAPI3.1 File Terminal
Is probably the easiest approach when you are using VB, but TAPI3.1 requires
WindowsXP and doesn't run on Win2k.
8. SAPI SDK5
The Speech Application SDK includes some components that you can use to
playback and record audio files. It can be used with VB.
9. Media Streaming Terminal + SAPI Stream
There is another method to use a SAPI file stream in combination with the
media streaming terminal. Some C++ code is required, though.
10. Use 3rd party playback component
There are a number of 3rd party components out there, you might try
Additionally you could check out our application TERAVoice Server 2004.
Probably it can already do what you want. (Behaviour besides standard
features can be controlled by simple VBScripts, a free version is available)
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot de