Groups > Microsoft > Microsoft Speech Tech SDK > Re: Tricky SAPI problem




Tricky SAPI problem

Tricky SAPI problem
Mon, 10 Mar 2008 01:05:01 -070
Hi,
I'm writing an app which generates a .wav file from some text.
I need to sync some pictures with this text and present it to the user as a 
slide show.
'Sync' is a relative term here, I need the pictures to appear some what 
close to the words when they are spoken.
Is there some way (a SAPI api) which will tell me where (duration in 
seconds) a particular word would occur in the generated audio file.
Any ideas?
Post Reply
Re: Tricky SAPI problem
Wed, 19 Mar 2008 08:06:02 -070
You can use the SPEI_WORD_BOUNDARY event. When you remove that event from 
the event queue, the SPEVENT structure contains the audio offset 
(ullAudioStreamOffset). From that, and information about the audio format 
you're using, you can determine the absolute position in time.

-- 
Rob Chambers [MSFT]
http://blogs.msdn.com/robch/default.aspx
Windows Speech Recognition - We're Listening...

This posting is provided "AS IS" with no warranties, and confers no
rights. 
Post Reply
about | contact