locked
WMReader open and IStream read methods - to open and read audio wav and pass the stream to speech recognizer RRS feed

  • Question


  • Hi Friends,

    I need to read an audio file in a stream object and pass it to the speech recognizer for speech recognition. I found these IWMReader and IStream Windows media format SDK interfaces but I am not understanding how actually I can use it for my purpose. Can anyone suggest how can I use IWMReader open method and IStream read methods to open and read an audio file output to a stream and pass it to speech recognizer ?

    Any code samples are appreciated.

    Thanks,


    • Edited by Megha Dave Wednesday, August 29, 2012 2:29 PM
    Wednesday, August 29, 2012 2:29 PM

All replies

  • IWMReader will call your IWMReaderCallback::OnSample method with an INSSBuffer pointer that holds the media data.  You would then feed the data from the INSSBuffer to whatever speech recognition API you are using.  I cannot really provide more details because I do not know what speech recognition API you are using or what format it expects data in.

    If you only care about running on Windows 7 or later, you can use the more modern IMFSourceReader.  The same concept applies -- obtain IMFSample instances from the source reader and feed the data to the speech recognizer.

    Wednesday, September 5, 2012 9:11 PM