Skip to main content

Voice Engine

Build Status

The library is used to create voice interface applications. It includes building blocks such as KWS (keyword spotting), DOA (Direction Of Arrival). There are also elements to measure RMS (dBFS or dB(A)).

Requirements

  • pyaudio
  • numpy
  • snowboy

Installation

Install pyaudio, numpy and snowboy, use virtualenv a virtual python environment.

sudo apt install python-pyaudio python-numpy python-virtualenv
sudo apt-get install swig python-dev libatlas-base-dev build-essential make
git clone --depth 1 https://github.com/Kitt-AI/snowboy.git
cd snowboy
virtualenv --system-site-packages env
source env/bin/activate
python setup.py build
python setup.py bdist_wheel
pip install dist/snowboy*.whl
cd ..
git clone https://github.com/voice-engine/voice-engine.git
cd voice-engine
python setup.py bdist_wheel
pip install dist/*.whl

Get started

To record audio and search keyword "snowboy", see also kws_snowboy.py

import time
from voice_engine.kws import KWS
from voice_engine.source import Source

src = Source()
kws = KWS()
src.link(kws)

def on_detected(keyword):
    print('found {}'.format(keyword))
kws.on_detected = on_detected

kws.start()
src.start()
while True:
    try:
        time.sleep(1)
    except KeyboardInterrupt:
        break
kws.stop()
src.stop()

Building blocks

The library uses gstreamer-like elements which can be linked together as an audio pipeline. One element can connect to more than one other elements.

The topology can be:

Source --> ChannelPicker --> KWS          Source --> ChannelPicker --> KWS --> Alexa
  |                          /\
  V                        /   \
 DOA                   Alexa   Google Asissitant 

Release files for voice_engine 0.1.3

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

Source distribution (sdist)

Source distribution for voice_engine 0.1.3
File Size Uploaded
voice-engine-0.1.3.tar.gz 443.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for voice_engine 0.1.3
File Interpreter ABI Platform
voice_engine-0.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 462.1 kB

Release files / voice-engine-0.1.3.tar.gz

Download URL voice-engine-0.1.3.tar.gz
Size 443.4 kB
Tags Source
SHA-256 checksum
How to use checksums
01cf84e21457452b7ab9df40b377333cc74d144d5069165cbfed2c77f75eab3f
BLAKE2b-256 checksum
How to use checksums
b52b2299457faefa003f8fe19f5e9339f47f92453cd2f5811893d6bd40e13557
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / voice_engine-0.1.3-py2.py3-none-any.whl

Download URL voice_engine-0.1.3-py2.py3-none-any.whl
Size 18.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
aed60895b793aa898114f58168bcae7055ceaad8eae44ae00e085488fef75ab7
BLAKE2b-256 checksum
How to use checksums
0a204588f8cc40000a2bab3c51edf5efe705c766a008617304b1a87dbd8c165d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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