speech sdk problem, help ?

From: kanel (wuairen_at_msn.com)
Date: 02/26/05


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;
}



Relevant Pages

  • sapi, tts problem?
    ... I want to use the speech sdk in wince.net 42. ... I add the speech component and mfc,sdk,atl to in cepb. ... int main ...
    (microsoft.public.windowsce.platbuilder)
  • Re: regarding speech sdk
    ... > is there support for telephony in speech sdk itself. ... Like everything else where speech is concerned, ... desktop applications has a sample called Simple Telephony in its SDK. ... that it does have support for building telephony applications that scale. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: regarding speech sdk
    ... the Speech SDK also included 2 VB samples. ... key here is the use of the STCustomStream object which uses TAPI3 ... The SASDK - as Will mentioned - is just an SDK for Speech Server, ... > is there support for telephony in speech sdk itself. ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Need help in finding some means of being able to program with speech recognition
    ... the breakup of the Speech SDK is a bit confusing at the moment. ... > I've been looking it's the server after reading your post. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Need help in finding some means of being able to program with speech recognition
    ... the breakup of the Speech SDK is a bit confusing at the moment. ... > I've been looking it's the server after reading your post. ...
    (microsoft.public.dotnet.languages.vb)