none
SAPI for TTS - voice pausing? RRS feed

  • Question

  • Apologies if this is OT, I've tried to find a Speech API-specific forum but there doesn't seem to be one.

    I'm using the SAPI 5.1 SpVoice object to create in-memory WAV files which are then transmitted through a third party card to someone on the end of a phone line. It's all working nicely except that whenever the SAPI SpVoice object is creating a memory file the whole application pauses. This is particularly bad in that a number of people could be calling the system at the same time and all of them will suddenly have their voice pause for no obvious reason.

    Can any explain why the creation of in-memory WAV file with SpVoice would have this effect on my app? Can SAPI not handle doing two things at once? Each call has its own SpVoice object assigned so they're not sharing any resources.
    Monday, April 6, 2009 10:33 AM

Answers

  • I tried that and it didn't help.

    I found the problem, though. In order to pass a pointer to the in-memory WAV file into the (C++) API for the third party card I had to pin it in memory. I was then freeing it immediately and the next call came along and overwrote it. Cue very strange behaviour as the two threads competed for overlappings bits of memory.

    Thanks for the suggestion, Viral.
    • Marked as answer by liurong luo Wednesday, April 8, 2009 3:42 AM
    Monday, April 6, 2009 1:07 PM

All replies

  • Can you not push Creating Wav file in Memory to a seperate thread?? In that case, your main thread will not get blocked??

    Thanks,
    Viral.
    Monday, April 6, 2009 11:09 AM
  • I tried that and it didn't help.

    I found the problem, though. In order to pass a pointer to the in-memory WAV file into the (C++) API for the third party card I had to pin it in memory. I was then freeing it immediately and the next call came along and overwrote it. Cue very strange behaviour as the two threads competed for overlappings bits of memory.

    Thanks for the suggestion, Viral.
    • Marked as answer by liurong luo Wednesday, April 8, 2009 3:42 AM
    Monday, April 6, 2009 1:07 PM