'Ok Hound' phrase spotter
Project description
OkHound module
A python wrapper for the "Ok Hound" phrase spotter.
Install
-
Install the header files for the Python C API, python-dev / python-devel;
-
Run
pip install okhound
Example script
import okhound
import pyaudio
CHUNKSIZE = 1024
audio = pyaudio.PyAudio()
stream = audio.open(format=pyaudio.paInt16, channels=1, rate=16000, input=True, frames_per_buffer=CHUNKSIZE)
okhound.setThreshold(0.4)
while True:
try:
audio = stream.read(CHUNKSIZE)
except IOError:
print("Skipped frame")
continue
phraseSpotted = okhound.processSamples(audio)
if phraseSpotted: break
print("'Ok Hound' spotted! Sensitivity: {0}".format(okhound.getThreshold()))
Run example script
-
Install PortAudio development tools, portaudio19-dev / libportaudio-devel;
-
Install pyaudio module,
pip install pyaudio
; -
Run example_pyaudio.py script,
python example_pyaudio.py
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
OkHound-0.2.tar.gz
(5.4 MB
view details)
File details
Details for the file OkHound-0.2.tar.gz
.
File metadata
- Download URL: OkHound-0.2.tar.gz
- Upload date:
- Size: 5.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cda84ade5083c7ee281899bbf9ec288963e58a09c4218d4a3336334f3ad6746 |
|
MD5 | d41afc4a98f2d7d49801e080b46fbe73 |
|
BLAKE2b-256 | 82d3d78e17f9e67daed6e67659d80d10830b6a52cf844a48550226c1b6bbbd72 |