Skip to content

Commit

Permalink
Add KWS example.
Browse files Browse the repository at this point in the history
  • Loading branch information
KPatr1ck committed Apr 19, 2022
1 parent fe7c4e5 commit f7a9d70
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
24 changes: 5 additions & 19 deletions examples/hey_snips/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# MDTC Keyword Spotting with HeySnips Dataset

## Dataset
## Metrics

Before running scripts, you **MUST** follow this instruction to download the dataset: https://github.com/sonos/keyword-spotting-research-datasets
We mesure FRRs with fixing false alarms in one hour:

After you download and decompress the dataset archive, you should **REPLACE** the value of `data_dir` in `conf/*.yaml` to complete dataset config.

## Get Started

In this section, we will train the [MDTC](https://arxiv.org/pdf/2102.13552.pdf) model and evaluate on "Hey Snips" dataset.

```sh
CUDA_VISIBLE_DEVICES=0,1 ./run.sh conf/mdtc.yaml
```

This script contains training and scoring steps. You can just set the `CUDA_VISIBLE_DEVICES` environment var to run on single gpu or multi-gpus.

The vars `stage` and `stop_stage` in `./run.sh` controls the running steps:
- stage 1: Training from scratch.
- stage 2: Evaluating model on test dataset and computing detection error tradeoff(DET) of all trigger thresholds.
- stage 3: Plotting the DET cruve for visualizaiton.
|Model|False Alarm| False Reject Rate|
|--|--|--|
|MDTC| 1| 0.003559 |
8 changes: 0 additions & 8 deletions examples/hey_snips/RESULTS.md

This file was deleted.

22 changes: 22 additions & 0 deletions examples/hey_snips/kws0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MDTC Keyword Spotting with HeySnips Dataset

## Dataset

Before running scripts, you **MUST** follow this instruction to download the dataset: https://github.com/sonos/keyword-spotting-research-datasets

After you download and decompress the dataset archive, you should **REPLACE** the value of `data_dir` in `conf/*.yaml` to complete dataset config.

## Get Started

In this section, we will train the [MDTC](https://arxiv.org/pdf/2102.13552.pdf) model and evaluate on "Hey Snips" dataset.

```sh
CUDA_VISIBLE_DEVICES=0,1 ./run.sh conf/mdtc.yaml
```

This script contains training and scoring steps. You can just set the `CUDA_VISIBLE_DEVICES` environment var to run on single gpu or multi-gpus.

The vars `stage` and `stop_stage` in `./run.sh` controls the running steps:
- stage 1: Training from scratch.
- stage 2: Evaluating model on test dataset and computing detection error tradeoff(DET) of all trigger thresholds.
- stage 3: Plotting the DET cruve for visualizaiton.

0 comments on commit f7a9d70

Please sign in to comment.