AI/TLDR

Porcupine

On-device wake-word detection, from microcontrollers to the browser

Audio, Music & VoiceOpen core
Language
Python
License
Apache-2.0
$pip3 install pvporcupine

Overview

Porcupine is a wake word engine from Picovoice for building always-listening, voice-enabled applications. It solves one narrowly scoped problem well: detecting one or a few static trigger phrases — the "Hey Siri" moment — so your application knows when to start paying attention. The models are trained on real-world audio and the engine is described as compact and computationally efficient, which is what makes it viable on an IoT device rather than only on a workstation.

Its defining property is that detection happens entirely on-device. Nothing is streamed to a server to decide whether the trigger phrase was spoken, which matters both for privacy and for latency. The engine is also scalable in an unusual sense: it can listen for multiple wake words at once with no added runtime footprint, so a device can respond to several distinct commands without running several detectors.

Porcupine is deliberately not a general speech-recognition system. Picovoice points you at its own Rhino Speech-to-Intent engine when you need to understand complex, naturally spoken commands within a domain, and at the broader Picovoice platform when you want an Alexa-style end-to-end voice experience. The repository code is Apache-2.0, but the SDKs authenticate with an AccessKey obtained from Picovoice Console, which is also where you train custom wake word models.

What it does

  • Runs fully on-device — no audio leaves the machine for the wake-word decision
  • Cross-platform by design: Arm Cortex-M, STM32 and Arduino, Raspberry Pi, Android and iOS, the major browsers, and Linux, macOS and Windows
  • SDKs for Python, .NET, Java, C, Node.js, Flutter, React Native and the web, published to the usual package registries
  • Detects multiple always-listening commands at once with no added runtime footprint
  • Ships a set of default keyword models, listable at runtime, plus custom wake words trained self-service in Picovoice Console
  • Nine supported languages including English, Mandarin, French, German, Italian, Japanese, Korean, Portuguese and Spanish

Getting started

Every SDK follows the same shape: install the package for your platform, supply an AccessKey from Picovoice Console, then create an engine instance for the keywords you want to listen for. The Python SDK is the shortest path to a first run.

Install the Python SDK

The Python binding is published to PyPI as `pvporcupine`.

bashbash
pip3 install pvporcupine

Create an engine instance

The SDK exposes a factory method. The AccessKey comes from Picovoice Console; `keywords` is shorthand for the default keyword files shipped with the library.

pythonpython
import pvporcupine

# AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
access_key = "${ACCESS_KEY}"

handle = pvporcupine.create(access_key=access_key, keywords=['picovoice', 'bumblebee'])

See which default keywords are available

The library exposes the list of bundled keyword files at runtime, so you do not have to guess the spelling of a built-in trigger phrase.

pythonpython
import pvporcupine

print(pvporcupine.KEYWORDS)

Try a demo, then pick your platform

A runnable demo package is published separately, and the repository carries per-platform demos and SDK instructions for .NET, Java, Flutter, React Native, Android, iOS, web, Node.js, C and microcontrollers. For a non-default trigger phrase, train a custom keyword in Picovoice Console and pass its file path instead of the `keywords` shorthand.

bashbash
sudo pip3 install pvporcupinedemo

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Add a hands-free trigger phrase to a mobile or desktop app so it starts listening without a tap
  • Run always-listening voice activation on a Raspberry Pi or a Cortex-M microcontroller where a cloud round trip is not an option
  • Give a browser-based assistant a wake word without streaming continuous microphone audio to a server
  • Listen for several distinct spoken commands on one device without paying for several detectors

How Porcupine compares

Porcupine alongside other open-source audio, music & voice tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Whisper★ 109kOpenAI's speech recognition model that transcribes and translates audio across many languages.
GPT-SoVITS★ 61.9kAn open-source WebUI that clones a voice from a short audio sample and turns text into speech, with zero-shot and few-shot fine-tuning.
Voicebox★ 54.9kLocal-first voice studio that clones a voice from a short sample, generates speech across seven TTS engines and 23 languages, handles system-wide dictation, and speaks for agents over MCP.
VibeVoice★ 54.4kMicrosoft's text-to-speech model for generating long, expressive multi-speaker audio like podcasts.
whisper.cpp★ 53.7kA dependency-free C/C++ port of Whisper built on ggml, running speech recognition on CPU, Metal, CUDA, Vulkan and NPUs from phones to servers.
Coqui TTS★ 46kA library of text-to-speech models including the multilingual XTTS voice-cloning model.
ChatTTS★ 39.9kChatTTS is an open-source text-to-speech model tuned for dialogue, with multi-speaker support and fine-grained control over laughter, pauses, and prosody.
Porcupine★ 4.9kOn-device wake-word detection, from microcontrollers to the browser