Skip to main content

Introduction

Quilbert: A Python AI Voice Assistant with State Machine Design

Quilbert is a GPT powered AI voice assistant built using Python. This project utilizes a state machine design pattern to efficiently handle user input, process it, and provide relevant responses. With Quilbert, you can easily access information, ask questions, and receive helpful responses using only your voice.

To get started with Quilbert, follow these steps:

$ pip install Quilbert
$ quilbert --debug

Once running, Quilbert will begin listening for the wakeword "porcupine". When you say "porcupine", Quilbert will become active and start listening for your questions or commands.

Please note some common issues you might encounter:

  • OpenAI API not set: Configure your OpenAI API key by running export OPENAI_API_KEY=<your key>.
  • Picovoice access key not set: Set up your Picovoice access key using export PICOVOICE_ACCESS_KEY=<your key>.
  • Pyaudio import fails because portaudio is not installed: Install portaudio using brew install portaudio on mac.

Architecture Overview

Quilbert's architecture is based on a state machine with three primary states: sleeping, listening, and processing. The state diagram for Quilbert's architecture can be visualized using Mermaid:

stateDiagram
sleeping --> listening
listening --> processing
processing --> listening
processing --> sleeping

By using this state machine design, Quilbert efficiently handles user interactions, providing a seamless and responsive voice assistant experience.

Sleeping state

In the sleeping state, Quilbert processes audio chunks, listens for the wakeword, and discards the audio data. The transitions are as follows:

  • Sleeping to listening: Triggered when the wake word is detected.

Listening state

When in the listening state, Quilbert processes audio chunks, listens for voice activity, and stores the chunks in a buffer. The possible transitions are:

  • Listening to sleeping: Triggered when no processing occurs after two minutes of listening.
  • Listening to processing: Triggered when voice activity is detected for 0.25 seconds, followed by one second of inactivity.

Processing state

In the processing state, Quilbert takes the following actions:

  1. Converts the buffered audio to text.
  2. Fetches a response from the AI model.
  3. Plays the response using text-to-speech synthesis.

The transitions from processing state are:

  • Processing to sleeping: Triggered when the user says "stop" or another stop phrase.
  • Processing to listening: Triggered immediately after processing is complete.

Metadata

Release files for quilbert 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quilbert 0.0.1
File Size Uploaded Provenance Actions
quilbert-0.0.1.tar.gz 6.2 kB Without provenance Details for quilbert-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quilbert 0.0.1
File Interpreter ABI Platform Actions
quilbert-0.0.1-py3-none-any.whl Python 3 none any Details for quilbert-0.0.1-py3-none-any.whl

Total release size: 12.2 kB

Release files / quilbert-0.0.1.tar.gz

Download URL quilbert-0.0.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
641c5fb9a438b8ea5b10eebd9f955d041cb62b4f12b29d6ef3dee6a83721c6d8
BLAKE2b-256 checksum
How to use checksums
7b2d70cba364a960018fff935e2e9f61c1a97d5302f7a4102ece212633a0ad92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release files / quilbert-0.0.1-py3-none-any.whl

Download URL quilbert-0.0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4150395c2f1b43055e2453d4f932b10932bd5de306baa851bfc62e63589f0095
BLAKE2b-256 checksum
How to use checksums
d4c7d2350e27d2896214f7d34ce6ff73d556ac1111c85e10bfa9fc86c2d106cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Security for quilbert 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page