Skip to content

Examples

Neumair Günther edited this page Jan 14, 2019 · 1 revision

streaming_example.py

This simple demo captures audio from a microphone and runs a single model. The default model listens for the wake word Sheila and outputs a ding upon detection. You can change the model by setting the --graph and --labels parameters.

multi_streaming_example.py

This demo takes one or more models as input. You can define commands containing multiple models and keywords.

mDetector.add_command("marvin,on",light_on) mDetector.add_command("marvin,stop",stop)

sonoff_switch.py

This is an example of how multi-detection can be used. It implements two commands: <marvin,on> and <marvin,off> The commands are used to switch a Sonoff smart socket which has been flashed with the Tasmota firmware.

network_client.py and network_server.py

Sometimes you may want to run multiple big models but your hardware is just not powerful enough. This example shows how to stream audio features from a lightweight capturing device to a powerful machine. This uses only 3kbit/s of bandwidth.

speaker_verification.py

WARNING: Not usable yet. This example is still in development and is meant to verify speakers when a command is detected.