Shutting Down The Speech Port

When the speech port is no longer needed it should be closed. Closing unnecessary speech ports frees up licenses, and releases all of the speech port's resources.

C Code

  1. HPORT hport;
  2. /* After the port has been opened and recognitions are complete, close it: */

C++ Code

  1. LVSpeechPort Port;
  2. // After the port has been opened and recognitions are complete, close it:
  3. Port.DestroyClient ( );

While closing the port may seem trivial, as soon as you start streaming audio to the port from a separate thread, the trivial can be problematic. Remember to completely disengage your stream from the port before you close it.

© 2012 LumenVox LLC. All rights reserved.