Authors:
Yael Segal-Feldman (segal.yael@campus.technion.ac.il)
Joseph Keshet (jkeshet@technion.ac.il)
This repository provides a PyTorch implementation of the paper "Keyword Spotting with Hyper-Matched Filters for Small Footprint Devices" (arXiv:2508.04857). The implementation offers efficient keyword spotting capabilities designed for resource-constrained environments.
- Python 3.10 or higher
- PyTorch and associated dependencies (see
requirements.txt)
-
Clone the repository:
git clone https://github.com/YaelSegal/HyperSpotter cd HyperSpotter -
Install the required dependencies:
pip install -r requirements.txt
The repository includes an inference.py script for performing keyword spotting on audio files. The script accepts the following command-line parameters:
csv_filename: Path to a CSV file containing an "audio_path" column with paths to audio files for keyword detectionout_filename: Output file path for saving prediction resultsexp_type: Model architecture type. Options:whisper_hyper,conformer_hyperinitmodel: Path to the pre-trained model checkpoint filekeywords: Keyword specification. Accepts either:- Comma-separated list of keywords
- Path to a text file containing one keyword per line
device: Computation device. Options:cpu,gpu
Additional parameters for performance tuning:
batch_size: Controls the batch size for audio processingnum_workers: Number of worker processes for data loading
python inference.py \
--csv_filename input_audio_list.csv \
--out_filename predictions.txt \
--exp_type whisper_hyper \
--initmodel path/to/model.pth \
--keywords "hello,world,keyword" \
--device cpuPre-trained model weights are available for download:
If you use this code in your research, please cite our paper:
@article{segal2025keyword,
title={Keyword Spotting with Hyper-Matched Filters for Small Footprint Devices},
author={Segal-Feldman, Yael and Bradlow, Ann R. and Goldrick, Matthew and Keshet, Joseph},
journal={arXiv preprint arXiv:2508.04857},
year={2025}
}