hi,
i am using Microsoft Speech SDK 5.1,
(WindowsXP, VC++ IDE)
I have wrote program which Speaks as per Given Text, but i m getting errors.
My code is
#include <stdio.h>
#include <conio.h>
#include <sapi.h>
#include <objbase.h>
int main()
{
HRESULT hr;
ISpVoice *pVoice = NULL;
if (FAILED(CoInitialize(NULL)))
printf("Error to intiliaze COM");
else
printf("ISpVoice Initialized\n\n");
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_ALL, &IID_ISpVoice, (void **)&pVoice);
if(SUCCEEDED(hr))
{
hr = pVoice->Speak("Hello world", SPF_DEFAULT, NULL);
if ( pVoice != NULL )
pVoice->Release();
pVoice = NULL;
}
CoUninitialize();
getch();
return 0;
}
Errors are :
1)
error C2039: 'Speak' : is not a member of 'ISpVoice'
c:\program files\microsoft speech sdk 5.1\include\sapi.h(6992) : see declaration of 'ISpVoice'
2) error C2039: 'Release' : is not a member of 'ISpVoice'
c:\program files\microsoft speech sdk 5.1\include\sapi.h(6992) : see declaration of 'ISpVoice'
i am new in Multimedia area. i want to know that is it possible to generate Wave file using C code. can anybody guide me, or provide me link from where i can get better idea to generate wave file using C