The following "C" API is exported from the LVSpeechPort dll. For C++ programmers, these functions are wrapped in class LVSpeechPort.
Port Management Functions
int LV_SRE_ClosePort(HPORT hport);
int LV_SRE_Decode(HPORT hport,int VoiceChannel,int grammarset,unsigned int flags);
int LV_SRE_GetVoiceChannelData(HPORT hport, int VoiceChannel, short** PCM, unsigned int Samples);
int LV_SRE_LoadVoiceChannel(HPORT hport,int VoiceChannel,void* M,int Length,SOUND_FORMAT Format,const char* SoundFileName);
HPORT LV_SRE_OpenPort(ExportLogMsg log,void *p,int verbosity);
void LV_SRE_RegisterAppLogMsg(ExportLogMsg Log,void* p,int NewMsgVerbosity);
const char* LV_SRE_ReturnErrorString(int ReturnCode);
int LV_SRE_SetProperty(HPORT hport, int property, int Value);
int LV_SRE_SetProperty(HPORT hport, int property, int valuetype, void *pvalue, int target, int ndx);
int LV_SRE_WaitForEngineToIdle(HPORT hport,int voicechannel,int ms);
int LV_SRE_WaitForDecode(HPORT hport, int voicechannel);
Streaming API Functions
int LV_SRE_StreamStart(HPORT hport);
int LV_SRE_StreamSendData(HPORT hport, void* SoundData, int SoundDataLength);
int LV_SRE_StreamGetStatus(HPORT hport);
int LV_SRE_StreamGetLength(HPORT hport);
int LV_SRE_StreamSetStateChangeCallBack(HPORT hport, LV_SRE_StreamStateChangeFn* fn, void* UserData);
void LV_SRE_StreamStateChangeFn(long NewState, unsigned long TotalBytes, unsigned long RecordedBytes, void* UserData);
int LV_SRE_StreamStop(HPORT hport);
int LV_SRE_StreamCancel(HPORT hport);
int LV_SRE_StreamSetParameter(HPORT hport, int StreamParameter, unsigned long StreamParameterValue);
int LV_SRE_StreamGetParameter(HPORT hport, int StreamParameter, unsigned long* StreamParameterValue);
int LV_SRE_StreamSetParameterToDefault(HPORT hport, int StreamParameter);
SRGS Grammar Functions
int LV_SRE_LoadGrammar(HPORT hport, const char* GrammarLabel, const char* GrammarLocation);
int LV_SRE_LoadGrammarIdx(HPORT hport, int GrammarIndex, const char* GrammarLocation);
int LV_SRE_LoadGlobalGrammar(const char* GrammarLabel, const char* GrammarLocation);
int LV_SRE_LoadGrammarFromBuffer(HPORT hport, const char* GrammarLabel, const char* GrammarContents);
int LV_SRE_LoadGrammarFromBufferIdx(HPORT hport, int GrammarIndex, const char* GrammarContents);
int LV_SRE_LoadGlobalGrammarFromBuffer(const char* GrammarLabel, const char* GrammarContents);
int LV_SRE_LoadGrammarFromObject(HPORT hport, const char* GrammarLabel, HGRAMMAR hgrammar);
int LV_SRE_LoadGrammarFromObjectIdx(HPORT hport, int GrammarIdx, HGRAMMAR hgrammar);
int LV_SRE_LoadGlobalGrammarFromObject(const char* GrammarLabel, HGRAMMAR hgrammar);
int LV_SRE_UnloadGrammar(HPORT hport, const char* GrammarLabel);
int LV_SRE_UnloadGrammarIdx(HPORT hport, int GrammarIndex);
int LV_SRE_UnloadGlobalGrammar(const char* GrammarLabel);
int LV_SRE_UnloadGrammars(HPORT hport);
int LV_SRE_UnloadGlobalGrammars(void);
int LV_SRE_IsGrammarLoaded(HPORT hport,const char* GrammarLabel);
int LV_SRE_IsGrammarLoadedIdx(HPORT hport, int GrammarIndex);
int LV_SRE_IsGlobalGrammarLoaded(const char* GrammarLabel);
int LV_SRE_ActivateGrammar(HPORT hport, const char* GrammarLabel);
int LV_SRE_ActivateGrammarIdx(HPORT hport, int GrammarIndex);
int LV_SRE_ActivateGlobalGrammar(HPORT hport, const char* GrammarLabel);
int LV_SRE_DeactivateGrammar(HPORT hport, const char* GrammarLabel);
int LV_SRE_DeactivateGrammarIdx(HPORT hport, int GrammarIndex);
int LV_SRE_DeactivateGrammars(HPORT hport);
SRGS Result Functions
int LV_SRE_GetNumberOfParses(HPORT hport, int VoiceChannel);
const char* LV_SRE_GetParseTreeString(HPORT hport, int VoiceChannel, int index);
H_PARSE_TREE LV_SRE_CreateParseTree(HPORT hport, int VoiceChannel, int Index);
int LV_SRE_GetNumberOfInterpretations(HPORT hport, int VoiceChannel);
const char* LV_SRE_GetInterpretationString(HPORT hport, int VoiceChannel, int index);
H_SI LV_SRE_CreateInterpretation(HPORT hport, int VoiceChannel, int index);
N-Best Result Functions
int LV_SRE_GetNumberOfNBestAlternatives(HPORT hport, int VoiceChannel);
int LV_SRE_SwitchToNBestAlternative(HPORT hport, int VoiceChannel, int index);
Concept-Phrase Grammar Functions (for backward compatibility)
int LV_SRE_AddPhrase(HPORT hport,int GrammarSet, const char* Concept, const char* Phrase);
int LV_SRE_LoadStandardGrammar(HPORT hport,int grammarset,int defaultgrammar);
int LV_SRE_ResetGrammar(HPORT hport,int GrammarSet);
const char* LV_SRE_GetConcept(HPORT hport,int VoiceChannel, int Index);
int LV_SRE_GetConceptScore(HPORT hport,int VoiceChannel, int Index);
int LV_SRE_GetNumberOfConceptsReturned(HPORT hport,int VoiceChannel);
int LV_SRE_GetPhonemesDecoded(HPORT hport, int VoiceChannel, int Index);
int LV_SRE_GetPhraseDecoded(HPORT hport, int VoiceChannel, int Index);
int LV_SRE_GetRawTextDecoded(HPORT hport, int VoiceChannel, int Index);
int LV_SRE_RemoveConcept(HPORT hport,int GrammarSet, const char* Concept);
Complete Help Topic List | Speech Engine Product Information