Feeds waveform samples into the transcribing engine. The samples should be 16-bit, mono, and at 16Khz or 8Khz sample rate.
#include "ltasr.h"
L_LTASR_API L_INT L_ASRRecognizer_AcceptWaveformData(recognizer, data, endPointDetected)
The speech recognizer handle.
Pointer to a structure represents the audio data from the live source.
When L_TRUE
, it means silence or safe stopping point has been detected. This means subsequent audio samples feed will not cause the former text to be modified or updated.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
At endPointDetected = L_TRUE
, you can safely call L_ASRRecognizer_GetResult() to acquire whatever text was transcribed up to this point. Calling L_ASRRecognizer_GetResult() will free up the memory as if restarting the process all over again.
When endPointDetected = L_FALSE
, you may call L_ASRRecognizer_GetPartialResult() to peek into the temporary results the engine has.
x64.