Skip to content

Conversation

yonatan-mitmit
Copy link

feat: Add Porcupine hotword detection support

Add integration with the Porcupine hotword detection engine as an alternative to Snowboy. This change:

  • Adds a new porcupine_wait_for_hot_word method that handles detection using the Picovoice Porcupine engine
  • Extends the listen and _listen methods to accept a porcupine_configuration parameter
  • Adds support for resampling audio to match Porcupine's required sample rate
  • Implements frame buffering and processing using Porcupine's API
  • Adds proper cleanup of Porcupine resources using try/finally

The configuration accepts parameters like access_key, library_path, model_path, keyword_paths,
keywords, and sensitivities, matching Porcupine's Python API requirements.

This provides users with a modern alternative to Snowboy for offline hotword detection,
as Snowboy is no longer actively maintained.

Dependencies:

  • Requires the pvporcupine package to be installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant