class LVSpeechPort

An LVSpeechPort Object represents one Speech Recognition Port and processes its sound data into text; all port instances can process their data in parallel.  If the client application is multi-threaded, every thread that needs to process audio data should have its own LVSpeechPort.

Each port has multiple voice channels and grammar sets.

Each voice channel holds raw audio data.  Before processing any data, the client application must call LoadVoiceChannel to load the channel.  The channel keeps its own copy of this sound data, so the client application can free its copy after the call to LoadVoiceChannel.  The voice channel will store the data until the client application loads new data into the channel.  This allows the client application to decode the same sound data against different grammars without reloading the data.  

The Decode method processes a voice channel against a grammar set, returning the concepts from the grammar set recognized in the channel’s audio data.  Multiple voice channels are provided as a convenience, but only one voice channel can decode concurrently per port.

Use <LVSpeechPort.h>

Constructor/Destructors

 

 

 

LVSpeechPort

Constructs an LVSpeechPort object.

~LVSpeechPort

Closes the speech port object and releases its resources.

 

 

Functions

 

OpenPort

Opens the speech port and initializes the Speech Engine.

ClosePort

Closes the port, and releases its resources.

Decode

Processes the voice channel audio data against the active grammar.

ReturnErrorString

Returns a description of an error code.

SetProperty

Sets various properties on the port.

SetPropertyEx

Sets various properties on various scopes.

SetClientPropertyEx

Sets various properties on client process level. (static)

WaitForDecode

Blocks the client application until the decode is finished.

WaitForEngineToIdle

Blocks the client application until the port is idle (not decoding).

 

 

AddPhrase

Adds a phrase to a new or existing concept.

GetConcept

Returns one concept found in the last call to Decode.

GetConceptScore

Returns the confidence score of a concept found in the last call to Decode.

GetNumberOfConceptsReturned

Returns the number of concepts found in the last call to Decode.

GetPhonemesDecoded

Returns the actual phonemes found in the last call to Decode.

GetPhraseDecoded

Returns the decoded phrase (with BNF formatting) found in the last call to Decode.

GetRawTextDecoded

Returns the decoded raw text (without BNF formatting) found in the last call to Decode.

GetVoiceChannelData

Returns the (original) preprocessed audio data for the voice channel.

LoadStandardGrammar

Loads a standard, pre-defined grammar to easily recognize and format numbers, monetary figures or digits.

LoadVoiceChannel

Loads the audio data into the specified voice channel prior to a call to Decode (which decodes the audio data).

RemoveConcept

Removes a concept and all of its phrases.

ResetGrammar

Removes all concepts from a grammar.

 

 

StreamStart

Sets up a new stream.

StreamSendData

Send data buffer of sound data to stream.

StreamGetStatus

Returns status of stream.

StreamGetLength

Returns length of sound data in stream buffer.

StreamSetStateChangeCallBack

Set up a call back to receive state change notification of a stream.

StreamStop

Stops stream and loads sound channel with streamed data.

StreamCancel

Stops stream, sound data is discarded.

StreamSetParameter

Sets a new value for a stream property.

StreamGetParameter

Gets the current value of a stream property.

StreamSetParameterToDefault

Sets a stream property to its default value.

 

 

LoadGrammar functions

Loads and compiles an SRGS grammar

UnloadGrammar functions

Unloads a grammar from the speech port.

IsGrammarLoaded

Checks if a grammar has already been compiled and loaded into port.

ActivateGrammar functions

Activates an SRGS grammar for decoding

DeactivateGrammar functions

Removes a grammar from the active grammar set.

 

 

GetNumberOfParses

Returns the number of parses generated by the decode, according to the active grammars.

GetParseTree

Returns a Parse Tree result.

GetParseTreeString

Returns a string representation of the parse tree.

GetNumberOfInterpretations

Returns the number of interpretations generated by the decode + semantic interpretation process.

GetInterpretation

Returns an interpretation result.

GetInterpretationString

Returns an XML snippet representation of the interpretation result.

 

 

GetNumberOfNBestAlternatives

Returns number of n-best alternatives found by the engine.

SwitchToNBestAlternative

Set the n-best alternative that is viewable.

 

 

Constants

 

Error Codes

Error codes returned by methods.

Properties

Property settings for the port.

Sound Formats

Sound data format constants.

Standard Grammars

Build-in grammar constants.

 

 


Complete Help Topic List | Speech Engine Product Information