sapi, tts problem?
From: kanel (wuairen_at_msn.com)
Date: 02/28/05
- Next message: Rams: "Startup RNDIS."
- Previous message: liawsw: "RE: Audio corruption"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 28 Feb 2005 17:51:08 +0800
Hi all:
I have asked for times, but no answers.
I want to 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.
Does the tts engine is needed or just not config well?
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: Rams: "Startup RNDIS."
- Previous message: liawsw: "RE: Audio corruption"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|