Re: Python how to get the raw audio data from SAPI?
I could be wrong on this, but I think there is a SAPI event, EndStream, which reports the length of the raw audio data that was written to the stream.
That said, if I reset the stream to 0 every time I speak, I would be able to read the correct amount of data from the stream and avoide unnecessary memory allocation.
I don't know how to handle events though, in my genpy cache there is a file _ISpeechVoiceEvents.py, which seems to allow me to set handlers for voice events. I don't know which object to create to do that though.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector