Skip to content

MLSpeech/HyperSpotter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyperSpotter

Authors:
Yael Segal-Feldman (segal.yael@campus.technion.ac.il)
Joseph Keshet (jkeshet@technion.ac.il)

Overview

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.

Requirements

  • Python 3.10 or higher
  • PyTorch and associated dependencies (see requirements.txt)

Installation

  1. Clone the repository:

    git clone https://github.com/YaelSegal/HyperSpotter
    cd HyperSpotter
  2. Install the required dependencies:

    pip install -r requirements.txt

Usage

The repository includes an inference.py script for performing keyword spotting on audio files. The script accepts the following command-line parameters:

Required Parameters

  • csv_filename: Path to a CSV file containing an "audio_path" column with paths to audio files for keyword detection
  • out_filename: Output file path for saving prediction results
  • exp_type: Model architecture type. Options: whisper_hyper, conformer_hyper
  • initmodel: Path to the pre-trained model checkpoint file
  • keywords: 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

Optional Parameters

Additional parameters for performance tuning:

  • batch_size: Controls the batch size for audio processing
  • num_workers: Number of worker processes for data loading

Example Usage

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 cpu

Pre-trained Models

Pre-trained model weights are available for download:

Citation

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}
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%