Pioborgelt commited on
Commit
d3eb2fd
·
verified ·
1 Parent(s): 8377ce8

Shorten model card, point to GitHub

Browse files
Files changed (1) hide show
  1. README.md +7 -91
README.md CHANGED
@@ -8,105 +8,21 @@ pipeline_tag: audio-classification
8
  tags:
9
  - wake-word
10
  - keyword-spotting
11
- - hotword
12
  - zero-shot
13
  - home-assistant
14
  - wyoming
15
- - speech
16
  ---
17
 
18
  ![hark](assets/social-preview.png)
19
 
20
- # Hark: zero-shot wake word weights (v0.3.0-alpha)
21
 
22
- Weights for [Hark](https://github.com/pioborgelt/hark), a wake word engine where you **type the
23
- phrase as text** (English or German) instead of recording samples or training a model per word.
24
- The code, the Home Assistant app and the Docker image download these files automatically; you only
25
- need this page if you want to fetch or inspect them yourself.
26
 
27
- > Early alpha, built in my free time. Expect rough edges, missed wake words and the odd false
28
- > trigger. Reports with your phrase, language and microphone help a lot:
29
- > [open an issue](https://github.com/pioborgelt/hark/issues/new).
30
 
31
- ## Files
32
 
33
- | File | Stage | Parameters | SHA256 |
34
- | --- | --- | ---: | --- |
35
- | `hark-stage1-r221-h384.pt` | 1: causal phoneme model, runs continuously | 2,274,104 | `c095fc5431e07a939eb482d18125e446a917864a8398edc15200bff316ebe0de` |
36
- | `hark-stage2-r222-v384.pt` | 2: bidirectional verifier, runs only on candidates | 5,506,050 | `bbdb7928802bd04cfc0b399bfea6433dbf8ee1cf48cb59c6edf272deabcc3743` |
37
-
38
- Both are plain PyTorch state dicts that load with `torch.load(..., weights_only=True)`; no pickled
39
- code. Hark refuses files whose SHA256 does not match the values pinned in its source.
40
-
41
- ## How it works
42
-
43
- 1. Your phrase is turned into IPA phonemes with eSpeak (German and English, with common
44
- pronunciation variants).
45
- 2. **Stage 1** (causal Conv-GRU, 64 log-mel bands, 16 kHz) predicts phoneme probabilities for every
46
- 20 ms frame and proposes candidates for the phrase.
47
- 3. **Stage 2** looks at about 0.3 s of audio after a candidate and scores it with a bidirectional
48
- phoneme cross-attention model. Only accepted candidates are reported as a wake word.
49
-
50
- Both models were trained from random initialisation; no external pretrained weights are used.
51
-
52
- ## Use
53
-
54
- - **Home Assistant:** install the Hark app or run the Docker image, see the
55
- [README](https://github.com/pioborgelt/hark#install-home-assistant--python) and the
56
- [FAQ](https://github.com/pioborgelt/hark/blob/main/docs/FAQ.md).
57
- - **Python:**
58
-
59
- ```python
60
- from hark.streaming import HarkEngine
61
-
62
- engine = HarkEngine() # downloads and verifies these files
63
- stream = engine.create_stream([engine.enroll("Hallo Kühlschrank", language="de")])
64
- for hit in stream.push(audio_float32_16khz):
65
- print("Triggered:", hit["phrase"])
66
- ```
67
-
68
- ## Evaluation
69
-
70
- Benchmarks for the v0.3 line (Picovoice wake word benchmark, German/English "Okay PAI" bench) are
71
- in the [GitHub README](https://github.com/pioborgelt/hark#does-it-actually-work-benchmarks) and
72
- [docs/BENCHMARKS.md](https://github.com/pioborgelt/hark/blob/main/docs/BENCHMARKS.md).
73
-
74
- End-to-end checks with exactly these two files, through a real Home Assistant voice pipeline
75
- (HA 2026.11, Wyoming, balanced sensitivity), using recordings of real speakers from the Picovoice
76
- benchmark:
77
-
78
- | Phrase | Detected | False triggers on other speech in the run |
79
- | --- | ---: | ---: |
80
- | `Jarvis:en` | 8 / 8 | 0 |
81
- | `Computer:en` | 6 / 8 | 0 |
82
-
83
- These are small smoke tests, not a benchmark. German was checked with synthetic voices only.
84
-
85
- ## Limitations
86
-
87
- - German and English only; other languages and scripts are rejected.
88
- - Runs on the Home Assistant / server CPU with PyTorch, not on microcontrollers (ESP32).
89
- - The wake word is confirmed about 0.3 s after it ends; pause briefly before your command.
90
- - Short phrases that occur in normal speech (e.g. "Okay Haus") can trigger on everyday sentences;
91
- prefer 3–4 distinctive syllables or `strict` sensitivity.
92
- - Performance on Raspberry Pi has not been measured yet.
93
-
94
- ## Training data
95
-
96
- Trained on open speech and noise corpora plus synthetic speech: Multilingual LibriSpeech (MLS),
97
- LibriSpeech, VoxPopuli, Mozilla Common Voice, MUSAN, and synthetic utterances generated with Piper
98
- TTS voices.
99
-
100
- Attribution for the corpora licensed under CC BY 4.0:
101
-
102
- - *Multilingual LibriSpeech*: Pratap et al., "MLS: A Large-Scale Multilingual Dataset for Speech
103
- Research", Interspeech 2020. CC BY 4.0.
104
- - *LibriSpeech*: Panayotov et al., "Librispeech: an ASR corpus based on public domain audio books",
105
- ICASSP 2015. CC BY 4.0.
106
- - *MUSAN*: Snyder, Chen, Povey, "MUSAN: A Music, Speech, and Noise Corpus", arXiv:1510.08484, 2015.
107
- CC BY 4.0.
108
-
109
- ## License
110
-
111
- The weights are released under **CC BY-NC 4.0**: free for personal use, Home Assistant setups,
112
- tinkering and research; no commercial use. The Hark source code is MIT-licensed separately.
 
8
  tags:
9
  - wake-word
10
  - keyword-spotting
 
11
  - zero-shot
12
  - home-assistant
13
  - wyoming
 
14
  ---
15
 
16
  ![hark](assets/social-preview.png)
17
 
18
+ # Hark weights
19
 
20
+ Model weights for **[Hark](https://github.com/pioborgelt/hark)**, a zero-shot wake word engine
21
+ for English and German: type a phrase, done.
 
 
22
 
23
+ You don't need to download anything here. Hark, its Home Assistant app and the Docker image
24
+ fetch and verify these files automatically.
 
25
 
26
+ **Install, docs, benchmarks, issues: [github.com/pioborgelt/hark](https://github.com/pioborgelt/hark)**
27
 
28
+ License: **CC BY-NC 4.0** (non-commercial). The code is MIT, see GitHub.