Skip to main content

A lightweight, fast, and AI-powered custom wake word detection system.

Project description

VoxPulse - Custom Wake Word Detection Framework

VoxPulse is a lightweight, offline, and 100% private DIY custom wake-word detection library for Python. Instead of relying on pre-trained corporate wake words like "Alexa" or "Hey Siri", VoxPulse empowers developers to train their own voice assistants with any custom name, in any language!


Why VoxPulse? (Pros & Cons)

Pros (The Good Stuff)

  • 100% Privacy: Everything runs locally on your machine. No internet required, no voice data is sent to the cloud.
  • Auto-Data Pipeline: You just provide raw .wav recordings. VoxPulse automatically handles background noise mixing, time-stretching, pitch-shifting, and Mel-Spectrogram feature extraction.
  • CPU & Battery Efficient: Features RMS Silence Gating. The AI model goes to sleep when the room is silent (CPU usage drops to ~0%) and only triggers the neural network when someone speaks.
  • Lightweight: Uses a custom 2D Convolutional Neural Network (CNN) compiled into TensorFlow Lite (.tflite), making it blazing fast even on low-end hardware.

Cons (The Limitations)

  • DIY Approach: Since it's a custom framework, there is no pre-trained model. You must spend 5 minutes recording your own voice and room noise to use it.
  • Environment Sensitive: The accuracy heavily depends on the quality of the background noise (negative dataset) you provide during training.

How to Use VoxPulse (Quick Start Guide)

Step 1: Install the Library

Install VoxPulse directly via pip:

pip install voxpulse

Step 2: Prepare Your Dataset

Create a folder named dataset in your project directory with two sub-folders:

  • dataset/positive/ - Record and save 10-15 short .wav files of you saying your custom wake word (e.g., "Hey Friday"). Keep them around 1 to 1.5 seconds long.
  • dataset/negative/ - Record a single 5-10 minute .wav file of your normal room background noise (fan sounds, typing, distant talking) and place it here.

Step 3: Train Your Custom Model

Create a python script (e.g., train.py) and run the auto-pipeline:

from voxpulse.model import VoxPulseTrainer

# This single command will automatically augment data, extract features, and train the CNN!
trainer = VoxPulseTrainer(dataset_dir="dataset")
trainer.train_and_export(epochs=20, export_name="my_custom_model.tflite")

Step 4: Run the Inference Engine

Once your .tflite model is generated, you can use it to trigger any Python function in real-time. Create run.py:

from voxpulse.inference import VoxPulseEngine

def trigger_my_action():
    print("Custom Wake Word Detected! Executing action...")
    # Add your automation code here (e.g., open Spotify, turn on lights)

# Load your newly trained model
engine = VoxPulseEngine(model_path="my_custom_model.tflite", threshold=0.70)

# Start listening in the background
engine.start_listening(on_detect_callback=trigger_my_action)

Under the Hood (Architecture)

VoxPulse abstracts away the complexity of audio machine learning. When you call the training function, it executes the following pipeline automatically:

graph TD
    A[Raw Audio: dataset/positive] -->|Step 1: Auto-Augmentation| B[Pitch Shift & Time Stretch]
    D[Background Noise: dataset/negative] -->|Mix Noise| B
    B -->|Step 2: Mel-Spectrogram| C[Feature Matrices]
    C -->|Step 3: CNN Training| E[Keras Sequential Model]
    E -->|Step 4: Compilation| F[Lightweight TFLite Model]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voxpulse-1.0.3.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voxpulse-1.0.3-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file voxpulse-1.0.3.tar.gz.

File metadata

  • Download URL: voxpulse-1.0.3.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for voxpulse-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b27f1e95cc564a35797e6d157acb5d67057e42899c6d3e03e4c7280c979fecc2
MD5 129a12753b3a95cbe43ce4ac74f5419b
BLAKE2b-256 a4b57f8d04ea4c6440e184e8765a4b53a9e66e97f5bf1436b8cea3822b35800f

See more details on using hashes here.

File details

Details for the file voxpulse-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: voxpulse-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for voxpulse-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a4bb526d4a1b1b126ab5229e9f5b7396591efddfe652398233fd7c32f22678dc
MD5 7968c169bb1977dcea99a501db9d09bd
BLAKE2b-256 e1a4b1f30819c8f7f0057a2fa64601231551db3589efe418e818b02f79c07297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page