Class for the Cheetah Speech-to-Text engine.
accessKeystring : AccessKey obtained from Picovoice Console .
optionsCheetahOptions: Optional configuration arguments:
modelPathstring : Path to the file containing model parameters (
libraryPathstring : Path to the Cheetah dynamic library (
endpointDurationnumber : Duration of endpoint in seconds. A speech endpoint is detected when there is a chunk of audio (with a duration specified herein) after an utterance without any speech in it. Set duration to 0 to disable this. Default is 1 second.
enableAutomaticPunctuationboolean : Whether to enable automatic punctuation. Default is false.
Cheetah: An instance of Cheetah platform.
Releases resources acquired by
Getter for number of audio samples per frame.
number: Number of audio samples per frame.
Getter for audio sample rate accepted by Cheetah.
number: Audio sample rate accepted by Cheetah.
Getter for version.
Processes a frame of the incoming audio stream with the speech-to-text engine. The number of samples per frame can be attained by calling
.frameLength. The incoming audio needs to have a sample rate equal to
.sampleRate and be 16-bit linearly-encoded. Cheetah operates on single-channel audio.
pcmArray<number> : A frame of audio samples.
[string, boolean]: Transcription of any newly-transcribed speech (if none is available then an empty string is returned) and a flag indicating if an endpoint has been detected.
Marks the end of the audio stream, flushes internal state of the object, and returns any remaining transcribed text.
string: Any remaining transcribed text. If none is available then an empty string is returned.
Exceptions thrown if an error occurs within
Cheetah Speech-to-Text engine.