You hear that? I'm just guessing that ISpVoice structure.    Refer to

Save as

CLSID_SpVoice GUID <096749377h, 03391h, 011D2h, <09Eh, 0E3h, 000h, 0C0h, 04Fh, 079h, 073h, 096h>>
IID_ISpVoice  GUID <06C44DF74h, 072B9h, 04992h, <0A1h, 0ECh, 0EFh, 099h, 06Eh, 004h, 022h, 0D4h>>

ISpNotifySource  STRUCT
SetNotifySink         DWORD  ?
SetNotifyWindowMessage DWORD  ?
SetNotifyCallbackFunction DWORD  ?
SetNotifyCallbackInterface DWORD  ?
SetNotifyWin32Event DWORD  ?
WaitForNotifyEvent DWORD  ?
GetNotifyEventHandle DWORD  ?

ISpNotifySource  ENDS

ISpEventSource  STRUCT
SpNotifySource ISpNotifySource  <>
SetInterest DWORD  ?
GetEvents DWORD  ?
GetInfo DWORD  ?
ISpEventSource  ENDS

ISpVoiceVtbl        STRUCT
; IUnknown methods
QueryInterface         DWORD  ?
AddRef         DWORD  ?
Release         DWORD  ?
; IDispatch methods
;GetTypeInfoCount DWORD  ?
;GetTypeInfo DWORD  ?
;GetIDsOfNames DWORD  ?
;_Invoke DWORD  ?
; SpVoice methods
SpEventSource         ISpEventSource  <> 
SetOutput         DWORD  ?
GetOutputObjectToken DWORD  ?
GetOutputStream         DWORD  ?
_Pause                 DWORD  ?
Resume                 DWORD  ?
SetVoice         DWORD  ?
GetVoice         DWORD  ?
Speak                 DWORD  ?
SpeakStream         DWORD  ?
GetStatus         DWORD  ?
Skip                 DWORD  ?
SetPriority         DWORD  ?
GetPriority         DWORD  ?
SetAlertBoundary DWORD  ?
GetAlertBoundary DWORD  ?
SetRate                 DWORD  ?
GetRate                 DWORD  ?
SetVolume         DWORD  ?
GetVolume         DWORD  ?
WaitUntilDone         DWORD  ?
SetSyncSpeakTimeout DWORD  ?
GetSyncSpeakTimeout DWORD  ?
SpeakCompleteEvent DWORD  ?
IsUISupported         DWORD  ?
DisplayUI         DWORD  ?
ISpVoiceVtbl ENDS

  lpVtbl         DWORD  ?

Posted on 2010-10-03 03:36:05 by G-Spider
;SpVoice Simple example  By G-Spider 2010
;ml  /c /coff Speeker.asm 
;link /subsystem:console Speeker.obj
.model flat,stdcall
option casemap:none

  includelib kernel32.lib
  includelib user32.lib
  includelib ole32.lib
TEXT    dw 'G','o','l','d','e','n',' ','S','p','i' ,'d','e','r',0
lpSpVoiceCOM    dd ?
include    ;<=====The above file
; ---------------------------------------------------------------------------
  invoke CoInitialize,0
  invoke CoCreateInstance,offset CLSID_SpVoice, 0,CLSCTX_INPROC_SERVER, offset IID_ISpVoice,offset lpSpVoiceCOM
  .if eax == 0   

      push 100  ;USHORT Volume0~100
      mov eax,lpSpVoiceCOM
      push eax  ;<===Note!
      mov eax,
      call .ISpVoiceVtbl.SetVolume
      ;lpSpVoiceCOM->Speak(L"Golden Spider", 0, 0)//; c++
      ;lpSpVoiceCOM->lpVtbl->Speak(lpSpVoiceCOM,L"I LOVE YOU!", 0, 0)//; pure c
      push 0
      push 0
      push offset TEXT
      mov eax,lpSpVoiceCOM
      push eax 
      mov eax,.ISpVoice.lpVtbl  ;equ  mov eax,   
      call .ISpVoiceVtbl.Speak  ;call DWORD PTR

      mov eax,lpSpVoiceCOM
      push eax
      mov eax,
      call .ISpVoiceVtbl.SpEventSource.SpNotifySource.SetNotifyWin32Event
      ;.if eax==0  ;//Test
          ;invoke MessageBox,0,0,0,0  ;///Success!!!Good Job!!
      ;// release ISpVoice COM interfaces
      mov eax,lpSpVoiceCOM
      push eax
      mov eax,
      call .ISpVoiceVtbl.Release
      mov  lpSpVoiceCOM,0
  ;///    CoUninitialize();
invoke CoUninitialize
end start
Posted on 2010-10-03 03:45:02 by G-Spider
Nice job.

Thanks for the code.

The voice is the same as used by some software that old Sound Blasters came with.


Posted on 2010-10-03 07:12:15 by skywalker