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.
Release files for OkHound 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| OkHound-0.2.1.tar.gz | 5.4 MB | Details |
Release files / OkHound-0.2.1.tar.gz
| Download URL | OkHound-0.2.1.tar.gz |
|---|---|
| Size | 5.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1faaf3c193c0c7a48a6e6aeee7c7be17a90f311ba1d4c522fcb2bb38a92b38a3
|
|
BLAKE2b-256 checksum How to use checksums |
19e1219636f21ca1ed8c33680dc29e67d8e7f5d2bacb5f2f90002b4f7f709891
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|