Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice Cheetah
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice Orca
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrainWeSpeaker
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeRustUnityWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustUnityWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiRustWebWindows
AndroidC.NETiOSNode.jsPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Cheetah Speech-to-Text
React Native API

API Reference for the React Native Cheetah SDK (npm)


Cheetah

class Cheetah { }

Class for the Cheetah Speech-to-Text engine.


Cheetah.create()

public static async create(
accessKey: string,
modelPath: string,
options: CheetahOptions = {}
): Promise<Cheetah>

Cheetah constructor.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • modelPath string : Path to the file containing model parameters (.pv). Can be relative to the assets/resource folder or an absolute path to the file on device.
  • options CheetahOptions: Optional configuration arguments:
    • endpointDuration number : 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.
    • enableAutomaticPunctuation boolean : Whether to enable automatic punctuation.

Returns

  • Promise<Cheetah>: An instance of Cheetah platform.

Cheetah.delete()

async delete()

Releases resources acquired by Cheetah.


Cheetah.frameLength

get frameLength()

Getter for number of audio samples per frame.

Returns

  • number: Number of audio samples per frame.

Cheetah.sampleRate

get sampleRate()

Getter for audio sample rate accepted by Cheetah.

Returns

  • number: Audio sample rate accepted by Cheetah.

Cheetah.version

get version()

Getter for version.

Returns

  • string: Current Cheetah version.

Cheetah.process()

async process(frame: number[]): Promise<CheetahTranscript>

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.

Parameters

  • frame number[] : A frame of audio samples.

Returns

  • Promise<CheetahTranscript>: A CheetahTranscript object that contains any newly-transcribed speech (if none is available then an empty string is returned) and a flag indicating if an endpoint has been detected.

Cheetah.flush()

async flush(): Promise<CheetahTrancript>

Marks the end of the audio stream, flushes internal state of the object, and returns any remaining transcribed text.

Returns

  • Promise<CheetahTranscript>: Any remaining transcribed text in a CheetahTranscript object. If none is available then an empty string is returned.

CheetahError

class CheetahError extends Error { }

Exception thrown if an error occurs within Cheetah Speech-to-Text engine.

Exceptions:

class CheetahActivationError extends CheetahError { }
class CheetahActivationLimitError extends CheetahError { }
class CheetahActivationRefusedError extends CheetahError { }
class CheetahActivationThrottledError extends CheetahError { }
class CheetahIOError extends CheetahError { }
class CheetahInvalidArgumentError extends CheetahError { }
class CheetahInvalidStateError extends CheetahError { }
class CheetahKeyError extends CheetahError { }
class CheetahMemoryError extends CheetahError { }
class CheetahRuntimeError extends CheetahError { }
class CheetahStopIterationError extends CheetahError { }

CheetahOptions

type CheetahOptions = {
endpointDurationSec?: number
enableAutomaticPunctuation?: boolean;
}

Cheetah options type.

  • endpointDurationSec number : 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 to 0 to disable endpoint detection.
  • enableAutomaticPunctuation boolean : Flag to enable automatic punctuation insertion.

CheetahTranscript

type CheetahTranscript = {
transcript: string;
isEndpoint: boolean;
}

Cheetah options type.

  • transcript string : Any newly-transcribed speech. If none is available then an empty string is returned.
  • isEndpoint boolean : Flag indicating if an endpoint has been detected.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Cheetah Speech-to-Text React Native API
  • Cheetah
  • create()
  • delete()
  • frameLength
  • sampleRate
  • version
  • process()
  • flush()
  • CheetahError
  • CheetahOptions
  • CheetahTranscript
Voice AI
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Orca Text-to-Speech
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Falcon Speaker Diarization
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Local LLM
  • picoLLM Inference
  • picoLLM Compression
  • picoLLM GYM
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
  • Playground
Sales & Services
  • Consulting
  • Foundation Plan
  • Enterprise Plan
  • Enterprise Support
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • X
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2025 Picovoice Inc.