GotSpeech.NET

The online community for Microsoft Speech Server developers
Welcome to GotSpeech.NET Sign in | Join | Help
in Search
Gold Systems

Delay with ISpVoice::SetOutput in Windows 2003 server (SAPI 5.1)

Last post 01-16-2009, 8:11 AM by rod. 1 replies.
Sort Posts: Previous Next
  •  11-06-2007, 4:37 AM 4097

    Delay with ISpVoice::SetOutput in Windows 2003 server (SAPI 5.1)

    Hi,

    I've tried adding this to the microsoft "speech_tech.sdk" newsgroup but as responses are pretty slow there I thought I'd try here. I wasn;t sure which section to add it into so went for the general area.


    We are having a speed problem when setting the output of an ISpVoice to an output stream created in Global space.
    The basic shell of the code is shown below.  We create a Stream In Global space, Associate it with a COM stream and then set the output of our (already created voice) to this stream.  When we use the ISpVoice::SetOutput method there is a delay of up to 6 seconds.  We presume this is the IStream being dynamically allocated but can't see why it would take so long.

    This happens on Windows Server 2003 SP1 but when run on Windows XP SP2 there is only a minimal delay (100ms).

    I doesn't matter which TTS engine we are using.

    Is there a reason why the Windows Server 2003 machine is taking so long and is there an solution to this problem.

    Any help with this would be much appreciated.

    Kevin


    ----- Code Example -----
    CComPtr<ISpStream> m_spStream;
     IStream* pStream;

    // Create an SpStream
    hr = m_spStream.CoCreateInstance( CLSID_SpStream );

    // Create IStream in global memory, should dynamically allocate itself when
    the time comes
    if(SUCCEEDED(hr))
    {
        hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
         if (FAILED(hr)) {  ...   }
    }

    // Set the base stream
    if(SUCCEEDED(hr))
    {
         hr = m_spStream->SetBaseStream(pStream, Fmt.FormatId(), Fmt.WaveFormatExPtr());
         if (FAILED(hr)) {  ...   }
    }

    // Set output to stream
    if(SUCCEEDED(hr))
    {
         hr = m_cpVoice->SetOutput(m_spStream, FALSE);
         if (FAILED(hr)) {  ...   }
      }
    ----- Code Example End -----

  •  01-16-2009, 8:11 AM 7822 in reply to 4097

    Re: Delay with ISpVoice::SetOutput in Windows 2003 server (SAPI 5.1)

    Hi Kevin,

    I know it has been a while since your post but did you ever get a solution to this? I am experiencing the exact same delay with SetOutput().

    Thanks,

    --Rod.

View as RSS news feed in XML