mirror of
https://github.com/dscripka/openWakeWord.git
synced 2026-08-27 18:17:20 -04:00
fixed path issue and updated readme [skip ci]
This commit is contained in:
parent
4eaebb16e1
commit
9f19d307d8
2 changed files with 5 additions and 2 deletions
|
|
@ -28,6 +28,9 @@ pip install PyAudioWPatch scipy
|
|||
|
||||
2) Run the script: `python capture_activations.py --threshold 0.5 --output_dir <my_dir> --model <my_model>`
|
||||
|
||||
Where `--output_dir` is the desired location to save the activation clips, and `--model` is the model name or full path of the model to use.
|
||||
If `--model` is not provided, all of the default models will be loaded.
|
||||
|
||||
Note that if you have more than one microphone connected to your system, you may need to adjust the PyAudio configuration in the script to select the appropriate input device.
|
||||
|
||||
## Benchmark Efficiency
|
||||
|
|
|
|||
|
|
@ -145,10 +145,10 @@ if __name__ == "__main__":
|
|||
|
||||
print(f'Detected activation from \"{mdl}\" model at time {detect_time}!')
|
||||
|
||||
# Capture total of 5 seconds, with the mic_ associated with the
|
||||
# Capture total of 5 seconds, with the microphone audio associated with the
|
||||
# activation around the ~4 second point
|
||||
audio_context = np.array(list(owwModel.preprocessor.raw_data_buffer)[-16000*5:]).astype(np.int16)
|
||||
fname = detect_time + f"_{mdl}.wav"
|
||||
scipy.io.wavfile.write(os.path.join(os.path.abspath(args.output_dir), fname), 16000, audio_context)
|
||||
|
||||
playBeep('audio/activation.wav', audio)
|
||||
playBeep(os.path.join(os.path.dirname(__file__), 'audio', 'activation.wav'), audio)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue