Skip to main content

OkHound module

A python wrapper for the "Ok Hound" phrase spotter.

Install

  1. Install the header files for the Python C API, python-dev / python-devel;

  2. 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

  1. Install PortAudio development tools, portaudio19-dev / libportaudio-devel;

  2. Install pyaudio module, pip install pyaudio;

  3. 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)

Source distribution for OkHound 0.2.1
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

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2

1 release file

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