Safely destroys a speech port, releasing control of the acquired license and other associated resources back to the server.
Function
- int LV_SRE_DestroyClient(HPORT hport)
Parameters
hport
The port's handle.
Return Values
LV_SUCCESS
The port has been successfully destroyed.
LV_INVALID_HPORT
The input hport is not a valid one.
LV_EXCEPTION
An exception occurred while processing the request.
Remarks
Each open port requires one license. For this reason, you should close every port as soon as it is no longer needed.
C code
void main()
{
char *grammar_label = "MyGram";
char *grammar_file_path = "builtin:grammar/digits";
char *audio_file_path = "1234.ulaw";
InitializePort();
LoadGrammar(grammar_label, grammar_file_path);
Audio_Stream(audio_file_path);
// Load and use other assets appropriate to the function of the program.
// Here, DestroyClient is the last thing called before the program terminates.
LV_SRE_DestroyClient(hport);
}
See Also