speech sdk problem, help ?
From: kanel (wuairen_at_msn.com)
Date: 02/26/05
- Next message: Steve Maillet \(eMVP\): "Re: Problem with KITL?"
- Previous message: Greg White: "Re: RomImage"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 26 Feb 2005 10:48:25 +0800
Hi all:
I want use the speech sdk in wince.net 42 .
I add the speech component and mfc ,sdk ,atl to in cepb.
Then build the speech sample in the
WINCE420\PUBLIC\SPEECH\SDK\SAMPLES\CPP\SPEAK
The code listed below,the the programm run well and its printing indicate
the ISpVoice
created, but it cannot listen any voice. It donnt speak the string at all.
Anyone can help me? Thanks advance.
#include "stdafx.h"
#include "atlbase.h"
#include <sphelper.h>
int main(int argc, TCHAR* argv[])
{
HRESULT hr=S_FALSE;
WCHAR wcBuff[MAX_PATH];
int i;
printf("Now we running the speak!\n");
wcscpy( wcBuff, L"This is a simple sample sentence." );
if( SUCCEEDED( hr = CoInitializeEx( NULL, COINIT_MULTITHREADED ) ) )
{
printf("Succeed init COM lib \n");
//--- Create the voice
CComPtr<ISpVoice> cpVoice;
hr = cpVoice.CoCreateInstance(CLSID_SpVoice);
if( SUCCEEDED( hr ) )
{
printf("Succeed create ISpVoice \n");
hr = cpVoice->Speak(wcBuff, 0, NULL);
}
if (cpVoice)
{
printf("Succeed create ISpVoice \n");
cpVoice.Release();
}
CoUninitialize();
}
if (FAILED(hr))
{
printf("Failed \n");
return 1;
}
return 0;
}
- Next message: Steve Maillet \(eMVP\): "Re: Problem with KITL?"
- Previous message: Greg White: "Re: RomImage"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|