'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.1.tar.gz
(5.4 MB
view details)
File details
Details for the file OkHound-0.2.1.tar.gz
.
File metadata
- Download URL: OkHound-0.2.1.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 | 1faaf3c193c0c7a48a6e6aeee7c7be17a90f311ba1d4c522fcb2bb38a92b38a3 |
|
MD5 | 8b7ed3e7b2b7ebbfb401b7f9bda502ec |
|
BLAKE2b-256 | 19e1219636f21ca1ed8c33680dc29e67d8e7f5d2bacb5f2f90002b4f7f709891 |