Re: TTS Application in 5.0
From: Erwin Zwart (Erwin.zwart_at_-NOSPAM-ptsDOTnl)
Date: 11/05/04
- Next message: Martin: "Re: No Connection with Cisco PCM-352"
- Previous message: dan: "Re: How to build nk.bin for 16 bits Flash?"
- Next in thread: Erwin Zwart: "Re: TTS Application in 5.0"
- Maybe reply: Erwin Zwart: "Re: TTS Application in 5.0"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 09:40:23 +0100
avkumar,
Function speak fails... with what? what error code is returned?
Because you say you don't see the HKLM\SOFTWARE\Microsoft\Speech\Voices
registry key,
i think that you did not install / include an TTS engine? There is no
standard engine included in platform builder.
Hope this helps,
Erwin
"avkumar" <a_vijayakumar_2000@yahoo.com> wrote in message
news:3a7cbf0c.0411042330.dcfb836@posting.google.com...
> Dear Greats,
>
> I am developing a Windows CE TTS application. I have created a
> Emulator image and running my application.
>
> The code is given below.
> --------------------------------------------------------------------------------
> // TODO: Place code here.
> HRESULT hr = CoInitializeEx(NULL,COINIT_MULTITHREADED);
> if(hr != S_OK)
> {
> printf("\n Initialization of COM library is failed \n");
> return 0;
> }
> // Create one IspVoice COM Object
> CComPtr<ISpVoice> m_Ispvoice;
> hr = m_Ispvoice.CoCreateInstance(CLSID_SpVoice);
> if(hr != S_OK)
> {
> printf("\n Creation of ISpVoice COM object failed, Quit\n");
> CoUninitialize( );
> return 0;
> }
> char *strConsoleInput;
> strConsoleInput = new char[255];
> for(;;)
> {
> strConsoleInput[0] = '\0';
> strConsoleInput = gets(strConsoleInput);
> wchar_t *strVoiceOut;
> strVoiceOut = new WCHAR[255];
> swprintf(strVoiceOut,L"%hs",strConsoleInput);
> ULONG longptr;
> hr = m_Ispvoice->Speak(strVoiceOut,0, &longptr);
> switch(hr)
> {
> case E_INVALIDARG:
> printf("\n One or more arguments are invalid. \n");
> break;
> case E_POINTER:
> printf("\n Invalid pointer. . \n");
> break;
> case E_OUTOFMEMORY:
> printf("\n Exceeded available memory. . \n");
> break;
> /* case SPERR_INVALID_FLAGS:
> printf("\n Invalid flags specified for this operation . \n");
> break;
> case SPERR_DEVICE_BUSY:
> printf("\n Timeout occurred on synchronous call. . \n");
> break;
> */
> case S_OK:
> printf("\n Passed . \n");
> break;
> default:
> printf("\n Default fail. \n");
> break;
> }
> delete strVoiceOut;
> if(strConsoleInput[0] == 'Q')
> break;
> }
> delete strConsoleInput;
> printf("\n Initialization of COM library is completed properly \n");
> CoUninitialize();
> --------------------------------------------------------------------------------
>
> Function speak fails. And i noticed that the registry key
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices is empty their is
> no voices listed in this key.
>
> Can any help me to solve this problem. The same program is working in
> Windows XP with SAPI.
>
> Thanks in advance.
> avkumar
- Next message: Martin: "Re: No Connection with Cisco PCM-352"
- Previous message: dan: "Re: How to build nk.bin for 16 bits Flash?"
- Next in thread: Erwin Zwart: "Re: TTS Application in 5.0"
- Maybe reply: Erwin Zwart: "Re: TTS Application in 5.0"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|