diff --git a/data/activate.wav b/data/activate.wav new file mode 100644 index 0000000..be1a3f2 Binary files /dev/null and b/data/activate.wav differ diff --git a/precise/record.py b/precise/record.py index 2d5097b..749a114 100755 --- a/precise/record.py +++ b/precise/record.py @@ -2,9 +2,11 @@ # Copyright (c) 2017 Mycroft AI Inc. import sys + sys.path += ['.', 'runner'] # noqa from argparse import ArgumentParser +from psutil import Popen from precise_runner import PreciseRunner from threading import Event @@ -17,7 +19,10 @@ def main(): def on_prediction(prob): print('!' if prob > 0.5 else '.', end='', flush=True) - PreciseRunner('./precise/stream.py', args.model, on_prediction=on_prediction).start() + def on_activation(): + Popen(['aplay', 'data/activate.wav']) + + PreciseRunner('./precise/stream.py', args.model, on_prediction=on_prediction, on_activation=on_activation).start() Event().wait() # Wait forever if __name__ == '__main__': diff --git a/test b/test deleted file mode 100644 index e69de29..0000000