Since im feeling generous, here is some COM stuff that might amuse you.

I finally did a *full* hand translation of the SAPI.IDL, and SAPI.H files into one assembly version for COM use. It is used for developing talking software, or text - to - speech. This souce shows how simple it is to get going.

The File SAPI.COM is an assembly include file. Im using the .com extension since its COM definitions. Dont think its binary, cause its not (this is the hand translated file). This file also has all the COM definitions to get the VOICE RECOGNITION working for you. But im tire and havent coded up an example yet.

The program *should* work on Win2000 (since it default installs with SPEECH components), but last i checked XP and others dont. You can download the installer / SDK from microsoft (its free). (( I developed and tested it on Win98SE )).

Or, if people are having a hard time, i can zip up the modules and post them at Geocities.... let me know.

Anywho, back to the point. Its soo simple to use, look at the source:
start:

; Format all Variables
xor eax, eax
mov pIVoice, eax


; First Convert the Text to Wide Charater String, store it into buffer
invoke MultiByteToWideChar, NULL, NULL, addr Data1, -1, addr Buffer, 200

invoke CoInitialize, NULL
invoke CoCreateInstance, ADDR CLSID_SpVoice, NULL, CLSCTX_SERVER,\
addr ISpVoice, addr pIVoice

.if( pIVoice )
; Speek Text converted Dynamically
ole32 pIVoice, ISpVoice_Speak, offset Buffer, SPF_DEFAULT, offset OutStream
; Speek Static UNICODE compiled into the file
ole32 pIVoice, ISpVoice_Speak, offset Data2, SPF_DEFAULT, offset OutStream
ole32 pIVoice, ISpVoice_Release
.endif
invoke CoUninitialize

call ExitProcess
end start

Buffer and Data2 are the text to be spoken by the CPU. All intefaces etc are defined in SAPI.COM...

Have fun with it, i am.. :grin:
:alright:
NaN
Posted on 2002-12-01 03:26:34 by NaN
You can get the SAPI install from here: Microsoft SAPI Download (824 kb)

As well, you should select a Text-To-Speech Engine (1 Mb) from the same page, with your specific language requirements.

The rest of the stuf on the page is optional... I dont have finished MS Agent COM files so dont bother with MS Agent stuff, unless you are going to download the full SDK to play with ;)

Anywho, im outa here...
:alright:
NaN
Posted on 2002-12-01 03:44:16 by NaN
The program *should* work on Win2000
It does. :)
Posted on 2002-12-01 04:40:28 by Maverick