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 Quick Start

Platforms

  • Chrome & Chromium-based browsers
  • Edge
  • Firefox
  • Safari

Requirements

  • Picovoice Account and AccessKey
  • Node.js 16+
  • React 17.0+
  • npm

Picovoice Account & AccessKey

Signup or Login to Picovoice Console to get your AccessKey. Make sure to keep your AccessKey secret.

Quick Start

Setup

  1. Install Node.js.

  2. Install the npm packages:

  • @picovoice/cheetah-react
  • @picovoice/web-voice-processor
npm install @picovoice/cheetah-react @picovoice/web-voice-processor

Usage

Download a custom model from Picovoice Console or use the default model file. Place the model file in the project's public directory or generate a base64 representation of the file using the built-in script:

npx pvbase64 -i ${CHEETAH_PARAMS_PATH} -o ${OUTPUT_FILE_PATH}

Create a cheetahModel object with either of the methods above:

const CHEETAH_MODEL_BASE64 = /* Base64 representation of the `.pv` model file*/;
const cheetahModel = {
publicPath: "${MODEL_FILE_PATH}",
// or
base64: CHEETAH_MODEL_BASE64
}

Import and call the useCheetah Hook, and initialize Cheetah Streaming Speech-to-Text with your AccessKey and cheetahModel:

import React, { useEffect } from "react";
import { useCheetah } from "@picovoice/cheetah-react";
function VoiceWidget(props) {
const {
result,
isLoaded,
isListening,
error,
init,
start,
stop,
release,
} = useCheetah();
const cheetahModel = { publicPath: "${MODEL_FILE_PATH}" };
useEffect(() => {
init(
"${ACCESS_KEY}",
cheetahModel
);
}, []);
useEffect(() => {
if (result !== null) {
// ... use transcript result
}
}, [result]);
// ... render component
}

Cheetah Streaming Speech-to-Text React binding uses WebVoiceProcessor to record audio. To start recording and processing audio, call start:

await start();

Call stop to stop recording and processing audio:

await stop();

Allocated resources are automatically freed on unmount, but can also be done explicitly:

await release();

Non-English Languages

In order to use Cheetah with other languages, you need to use the corresponding model file (.pv) for the desired language. The model files for all supported languages are available on the Cheetah GitHub repository.

Demo

For the Cheetah Streaming Speech-to-Text React SDK, there is a React demo project available on the Cheetah Streaming Speech-to-Text GitHub repository.

Setup

Clone the Cheetah Streaming Speech-to-Text repository from GitHub:

git clone --recurse-submodules https://github.com/Picovoice/cheetah.git

Usage

  1. Install dependencies:
cd cheetah/demo/react
npm install
  1. Run the demo with the start script with a language code to start a local web server hosting the demo in the language of your choice (e.g. de -> German, es -> Spanish). To see a list of available languages, run start without a language code.
npm run start ${LANGUAGE}
  1. Open http://localhost:3000 to view it in the browser.

  2. Enter your access key and press on Init Cheetah. Once Cheetah Speech-to-Text has loaded, upload an audio file or record audio with a microphone to begin transcribing speech-to-text.

Resources

Package

  • @picovoice/cheetah-react on the npm registry

API

  • @picovoice/cheetah-react API Docs

GitHub

  • Cheetah Streaming Speech-to-Text React SDK on GitHub
  • Cheetah Streaming Speech-to-Text React Demo on GitHub

Benchmark

  • Real-time Transcription Benchmark

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Cheetah Speech-to-Text React Quick Start
  • Platforms
  • Requirements
  • Picovoice Account & AccessKey
  • Quick Start
  • Setup
  • Usage
  • Non-English Languages
  • Demo
  • Setup
  • Usage
  • Resources
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.