Browse
 
Tools
Rss Categories

Shutting Down The Speech Port

Reference Number: AA-00661 Views: 11272 0 Rating/ Voters

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:

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.