locked
How to set-free a device after assigning SpObjectToken as recognizer input. RRS feed

  • Question

  • Hi Folks,

    Sorry if this is the wrong forum for the following question, but I found this one as the most appropriate.
    ------------------------------------------------------------------------------------------------------------------------------------------------
    I referred following sample ,

    . . .  http://msdn.microsoft.com/en-us/library/ms722060%28VS.85%29.aspx  . . .

    I am writing c# code, and using the SpObjectToken to assign a device as input to a SpInProcRecognizer.

    I found that If I set the "SpObjectToken" of a non-default windows capture device as an input to SpInInProcRecognizer, then the audio utilities show other devices as unavailable.

    Now, in my code, even after the recognizer (i.e. the SpInProcRecognizer) object becomes null (I suppose taht the SpObjectToken is now free), the other devices still remain unavailable.

    It is only after I kill the application that the other devices become available.

    So, my question is -
    I can set a device as input to the recognizer by assigning the SpObjectToken as input to the SpInProcRecognizer-- this much is OK.
    But now, how to set free this token, after I get my recognition done ?


    Thanks in advance,
    Mark
    Thursday, March 18, 2010 10:21 AM