mavor 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mavor-0.1.0/LICENSE +201 -0
- mavor-0.1.0/PKG-INFO +378 -0
- mavor-0.1.0/README.md +356 -0
- mavor-0.1.0/pyproject.toml +38 -0
- mavor-0.1.0/setup.cfg +4 -0
- mavor-0.1.0/src/mavor/__init__.py +1 -0
- mavor-0.1.0/src/mavor/cli.py +103 -0
- mavor-0.1.0/src/mavor.egg-info/PKG-INFO +378 -0
- mavor-0.1.0/src/mavor.egg-info/SOURCES.txt +12 -0
- mavor-0.1.0/src/mavor.egg-info/dependency_links.txt +1 -0
- mavor-0.1.0/src/mavor.egg-info/entry_points.txt +2 -0
- mavor-0.1.0/src/mavor.egg-info/scm_file_list.json +7 -0
- mavor-0.1.0/src/mavor.egg-info/scm_version.json +8 -0
- mavor-0.1.0/src/mavor.egg-info/top_level.txt +1 -0
mavor-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Matthew Schulkind
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
mavor-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mavor
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Low-latency voice dictation — hotkey to talk, text typed into the focused window
|
|
5
|
+
Author: Matt Schulkind
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/mschulkind-oss/mavor
|
|
8
|
+
Project-URL: Repository, https://github.com/mschulkind-oss/mavor
|
|
9
|
+
Project-URL: Issues, https://github.com/mschulkind-oss/mavor/issues
|
|
10
|
+
Keywords: dictation,speech-to-text,voice,wayland,whisper,cli
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
17
|
+
Classifier: Topic :: Utilities
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# mavor — low-latency voice dictation
|
|
24
|
+
|
|
25
|
+
Tap a hotkey, talk, tap again. The transcribed text is typed into whatever
|
|
26
|
+
window has focus and copied to the clipboard. A small "● Recording" pill
|
|
27
|
+
appears at the top of the screen — clear of Waybar — while you speak, with
|
|
28
|
+
a live audio waveform meter, and flips to an amber indicator while whisper.cpp or
|
|
29
|
+
Sherpa-ONNX runs.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
$mod + ` ──▶ ● Recording ▂▃▅▆ (HUD overlay with live audio meter)
|
|
33
|
+
talking talking talking
|
|
34
|
+
$mod + ` ──▶ ⟳ Transcribing… (in-process CGO / whisper.cpp)
|
|
35
|
+
──▶ wtype + wl-copy (text lands in focused app)
|
|
36
|
+
overlay closes
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
CLI subcommands:
|
|
40
|
+
|
|
41
|
+
- `mavor daemon` — long-lived process. Owns the overlay, audio capture,
|
|
42
|
+
the speech-to-text (STT) engine, PipeWire audio ducking, and a Unix-socket
|
|
43
|
+
IPC server.
|
|
44
|
+
- `mavor start` / `mavor stop` — push-to-talk keybind controls (hold to speak).
|
|
45
|
+
- `mavor toggle` — toggle mode control (press once to start, press again to stop).
|
|
46
|
+
- `mavor doctor` — self-diagnostic health check for Wayland, audio, and tools.
|
|
47
|
+
- `mavor config init` — scaffold `~/.config/mavor/config.toml` with documented defaults.
|
|
48
|
+
- `mavor service install` — install and enable systemd user service (`mavor.service`).
|
|
49
|
+
|
|
50
|
+
> [!NOTE]
|
|
51
|
+
> **Where it runs today:** Linux, on a Wayland compositor implementing
|
|
52
|
+
> `wlr-layer-shell` (the overlay) and `virtual-keyboard-v1` (typing, via
|
|
53
|
+
> `wtype`) — sway, Hyprland, river, Wayfire, niri, labwc. Not GNOME, which
|
|
54
|
+
> implements neither.
|
|
55
|
+
>
|
|
56
|
+
> This is the first backend, not the design. Capture, transcription, overlay
|
|
57
|
+
> and text output are four independent interfaces (§[Project layout](#project-layout)),
|
|
58
|
+
> and only the overlay and the output emitter are Wayland-specific. Other
|
|
59
|
+
> compositors and platforms are a matter of writing those two, not of
|
|
60
|
+
> rearchitecting.
|
|
61
|
+
|
|
62
|
+
## Why this exists
|
|
63
|
+
|
|
64
|
+
Dictation on Linux tends to arrive as an appliance: one vendor's model, one
|
|
65
|
+
opinionated UI, a tray icon, and a service that wants to own your microphone.
|
|
66
|
+
Meanwhile the interesting work is happening in the models — whisper.cpp,
|
|
67
|
+
Parakeet, Zipformer, Moonshine, SenseVoice, Paraformer, a new one every few
|
|
68
|
+
months, each with its own build, its own model layout, and its own idea of what
|
|
69
|
+
an API is.
|
|
70
|
+
|
|
71
|
+
`mavor` is the boring layer under that. Three goals, in order:
|
|
72
|
+
|
|
73
|
+
**One interface in front of every model.** A single `Transcriber` contract with
|
|
74
|
+
an out-of-process `whisper-cli`, a warm HTTP or Unix-socket server, and
|
|
75
|
+
in-process sherpa-onnx behind it, so switching engines is a line in a config
|
|
76
|
+
file rather than a different program. `mavor models list` shows the whole
|
|
77
|
+
catalog — size, languages, whether it streams — and `mavor models pull` puts it
|
|
78
|
+
where the engine will find it. Trying a new model should cost a minute, not an
|
|
79
|
+
afternoon.
|
|
80
|
+
|
|
81
|
+
**Minimal and unintrusive.** No tray icon, no window, no background service
|
|
82
|
+
listening for a wake word, no telemetry. A daemon that idles until you press a
|
|
83
|
+
key, a floating pill that appears while you speak and disappears when you stop,
|
|
84
|
+
and text in the window you were already typing in. It holds the microphone only
|
|
85
|
+
between `start` and `stop`, and the one piece of UI it draws is deliberately
|
|
86
|
+
the smallest thing that still tells you it is listening.
|
|
87
|
+
|
|
88
|
+
**A good citizen of a Wayland tiling session.** Built for compositors rather
|
|
89
|
+
than in spite of them: a `wlr-layer-shell` overlay that floats clear of your
|
|
90
|
+
bar instead of stealing focus or spawning a window your tiler has to place,
|
|
91
|
+
`wtype` for input so text lands in the focused surface through the compositor's
|
|
92
|
+
own protocols, and PipeWire ducking so whatever you were listening to gets out
|
|
93
|
+
of the way while you talk. It is driven entirely by keybinds and a Unix socket,
|
|
94
|
+
which is what makes it scriptable rather than clickable.
|
|
95
|
+
|
|
96
|
+
## Install
|
|
97
|
+
|
|
98
|
+
### Go
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
go install github.com/mschulkind-oss/mavor/cmd/mavor@latest
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Release binary
|
|
105
|
+
|
|
106
|
+
Each tagged release publishes a `linux/amd64` tarball and a `checksums.txt`
|
|
107
|
+
on the [releases page](https://github.com/mschulkind-oss/mavor/releases).
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
tar -xzf mavor_v0.1.0_linux_amd64.tar.gz
|
|
111
|
+
install -m 0755 mavor ~/.local/bin/mavor
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### From source
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
git clone https://github.com/mschulkind-oss/mavor
|
|
118
|
+
cd mavor
|
|
119
|
+
mise install # gets the right toolchain
|
|
120
|
+
just install # builds and copies binary to ~/.local/bin/mavor
|
|
121
|
+
|
|
122
|
+
# Or deploy binary + install systemd user service in one step:
|
|
123
|
+
just deploy
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Quick Start & Verification
|
|
127
|
+
|
|
128
|
+
Run the built-in diagnostic tool to verify your Wayland and audio environment:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
mavor doctor
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Initialize your configuration file:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
mavor config init
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Compositor integration
|
|
141
|
+
|
|
142
|
+
### Push-to-Talk Mode (Recommended)
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
# ~/.config/sway/config
|
|
146
|
+
exec mavor daemon
|
|
147
|
+
bindsym $mod+grave exec mavor start
|
|
148
|
+
bindsym --release $mod+grave exec mavor stop
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Toggle Mode
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
# ~/.config/sway/config
|
|
155
|
+
exec mavor daemon
|
|
156
|
+
bindsym $mod+grave exec mavor toggle
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The overlay is a `wlr-layer-shell` surface on the `top` layer and does **not** request
|
|
160
|
+
an exclusive zone, which means two things: it floats over your content without
|
|
161
|
+
resizing windows, and the compositor places it *inside* the space other bars
|
|
162
|
+
have reserved. `top_margin` is therefore a gap below Waybar, not an offset from
|
|
163
|
+
the screen edge — a bar of any height, or no bar at all, works without
|
|
164
|
+
configuring anything.
|
|
165
|
+
|
|
166
|
+
## Systemd User Service
|
|
167
|
+
|
|
168
|
+
Alternatively, run the daemon as a systemd user unit that starts automatically with your graphical session:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
mavor service install --start
|
|
172
|
+
mavor service status
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Configuration
|
|
176
|
+
|
|
177
|
+
`$XDG_CONFIG_HOME/mavor/config.toml` (defaults to `~/.config/mavor/config.toml`).
|
|
178
|
+
All paths support `~` and `$ENVIRONMENT_VARIABLES`. Run `mavor config show` to inspect.
|
|
179
|
+
|
|
180
|
+
```toml
|
|
181
|
+
top_margin = 8 # px between screen top and overlay
|
|
182
|
+
engine = "cli" # "cli" (whisper.cpp) or "sherpa" (CGO ONNX)
|
|
183
|
+
model = "base.en" # whisper ggml model name
|
|
184
|
+
model_dir = "~/.cache/mavor/models" # where downloaded models live
|
|
185
|
+
duck_audio = true # duck music/browser audio while recording
|
|
186
|
+
duck_volume = "0%" # level while recording ("0%" mutes; raise to merely lower)
|
|
187
|
+
duck_streams = ["spotify", "firefox"] # target specific media apps
|
|
188
|
+
socket = "$XDG_RUNTIME_DIR/mavor.sock" # daemon IPC socket
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Models
|
|
192
|
+
|
|
193
|
+
Models are downloaded explicitly, never at runtime — the daemon fails at
|
|
194
|
+
startup with a `mavor models pull` hint rather than stalling a dictation on a
|
|
195
|
+
multi-gigabyte fetch.
|
|
196
|
+
|
|
197
|
+
`mavor models list` shows everything available, with what is already in the
|
|
198
|
+
cache marked:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
NAME ENGINE SIZE LANGUAGES STREAM STATUS ALIASES
|
|
202
|
+
tiny.en whisper 74.1 MB en no – whisper-tiny.en
|
|
203
|
+
base.en whisper 141.1 MB en no ✓ 141.1 MB ★ whisper-base.en
|
|
204
|
+
large-v3-turbo whisper 1.51 GB multi (99) no – whisper-large-v3-turbo
|
|
205
|
+
parakeet sherpa 429.4 MB en yes – parakeet-tdt
|
|
206
|
+
sensevoice-small sherpa 999.3 MB zh, en, ja, ko, yue no – sensevoice
|
|
207
|
+
zipformer-streaming sherpa 296.0 MB en yes – zipformer
|
|
208
|
+
|
|
209
|
+
★ active ✓ downloaded – not downloaded
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- **STREAM** marks models that decode incrementally as you speak. Whisper is
|
|
213
|
+
encoder-decoder over 30-second windows, so it always transcribes after you
|
|
214
|
+
stop; the streaming sherpa transducers do not.
|
|
215
|
+
- **SIZE** is the download. The sherpa archives expand to roughly twice that
|
|
216
|
+
on disk.
|
|
217
|
+
- **ALIASES** are alternate names accepted by `mavor models pull` and by
|
|
218
|
+
`model` / `sherpa_model` in `config.toml`.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
mavor models list # the catalog above
|
|
222
|
+
mavor models list --installed # only what is downloaded
|
|
223
|
+
mavor models list --verbose # a block per model, with the detail below
|
|
224
|
+
mavor models pull base.en # production default
|
|
225
|
+
mavor models pull tiny.en # smallest; what the test suite uses
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`--verbose` adds the properties that do not fit a column:
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
parakeet
|
|
232
|
+
NeMo FastConformer transducer, 80ms chunk — decodes while you speak
|
|
233
|
+
engine sherpa (in-process sherpa-onnx, CGO)
|
|
234
|
+
download 429.4 MB
|
|
235
|
+
languages en
|
|
236
|
+
streaming yes — decodes incrementally while you speak
|
|
237
|
+
speed fast (relative tier, not measured)
|
|
238
|
+
vocabulary hotwords via sherpa_hotwords_file
|
|
239
|
+
gpu none in practice — the bundled ONNX Runtime is a CPU-only build
|
|
240
|
+
aliases parakeet-tdt
|
|
241
|
+
status ✓ downloaded (850.7 MB)
|
|
242
|
+
source https://github.com/k2-fsa/sherpa-onnx/releases/...
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
- **speed** is a relative tier across the catalog, estimated from architecture
|
|
246
|
+
and parameter count. Where a real benchmark exists it is labelled `measured`
|
|
247
|
+
and carries the real-time factor from [`docs/reports/`](docs/reports/).
|
|
248
|
+
- **vocabulary** is what biasing the model can take. sherpa-onnx implements it
|
|
249
|
+
by boosting paths during transducer beam search, so only the transducers can
|
|
250
|
+
use a `sherpa_hotwords_file`; the CTC and encoder-decoder models cannot.
|
|
251
|
+
Whisper models take none today — mavor does not pass an initial prompt.
|
|
252
|
+
- **gpu** depends on the build you are running, not on the model. Run
|
|
253
|
+
`mavor doctor`, which reports what your whisper.cpp and ONNX Runtime can
|
|
254
|
+
actually use rather than what the config asks for.
|
|
255
|
+
|
|
256
|
+
Whisper models are fetched from the whisper.cpp GGML repository and land in
|
|
257
|
+
`model_dir` as `ggml-<name>.bin`. Sherpa models come from the sherpa-onnx
|
|
258
|
+
release assets and unpack into `model_dir/sherpa/<name>/`.
|
|
259
|
+
|
|
260
|
+
## Development
|
|
261
|
+
|
|
262
|
+
`just --list` for the full set. The interesting ones:
|
|
263
|
+
|
|
264
|
+
| target | what it runs |
|
|
265
|
+
|-----------------|---------------------------------------------------------------|
|
|
266
|
+
| `just check` | format + vet + unit tests (fast dev gate) |
|
|
267
|
+
| `just check-ci` | read-only CI / pre-commit verification |
|
|
268
|
+
| `just test` | unit tests only — fast, no Wayland required |
|
|
269
|
+
| `just test-int` | integration tests: spawns headless sway + waybar + daemon |
|
|
270
|
+
| `just test-e2e` | e2e: real whisper transcription with the `tiny.en` model |
|
|
271
|
+
| `just storybook`| runs UI storybook test and produces HTML screenshot report |
|
|
272
|
+
| `just install` | builds and installs binary to `~/.local/bin/mavor` |
|
|
273
|
+
| `just deploy` | installs binary and sets up systemd user service |
|
|
274
|
+
| `just doctor` | runs environment health check (`mavor doctor`) |
|
|
275
|
+
| `just build` | compiles binary at `bin/mavor` |
|
|
276
|
+
| `just dev` | runs the daemon against your live Wayland session, verbose |
|
|
277
|
+
|
|
278
|
+
### Test layout
|
|
279
|
+
|
|
280
|
+
- **Unit tests** (`go test ./...`): pure Go, mocked Recorder/Transcriber/
|
|
281
|
+
Overlay/Output. Fast, run under `-race`.
|
|
282
|
+
- **Integration tests** (`go test -tags=integration ./test/integration/...`):
|
|
283
|
+
spin up a real headless wlroots sway, optionally waybar, the real daemon
|
|
284
|
+
binary, a host PipeWire null-sink, and assert against grim screenshots
|
|
285
|
+
and `wl-paste` output.
|
|
286
|
+
- **End-to-end test** (`go test -tags=e2e ./...`): real whisper-cli plus
|
|
287
|
+
a downloaded model.
|
|
288
|
+
|
|
289
|
+
The integration test rig lives in `test/integration/harness.go`. Each
|
|
290
|
+
test gets its own `XDG_RUNTIME_DIR`, dbus session, headless sway, and
|
|
291
|
+
optionally waybar + null-sink. Cleanup happens in `t.Cleanup`.
|
|
292
|
+
|
|
293
|
+
### Project layout
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
cmd/mavor/ # CLI entrypoint & subcommands (daemon, doctor, config, service, models)
|
|
297
|
+
internal/state/ # Idle ⇄ Recording ⇄ Transcribing FSM
|
|
298
|
+
internal/audio/ # Recorder interface + parec impl + VAD + PipeWire ducking
|
|
299
|
+
internal/speech/ # Pluggable STT engines (whisper-cli, sherpa-onnx CGO, HTTP server)
|
|
300
|
+
internal/overlay/ # Layer-shell HUD: paint.go renders, overlay_wl.go presents
|
|
301
|
+
internal/wayland/ # Minimal hand-written Wayland client (wire protocol, layer-shell, shm)
|
|
302
|
+
internal/ipc/ # JSON-over-Unix-socket protocol
|
|
303
|
+
internal/output/ # wtype + wl-copy dispatch
|
|
304
|
+
internal/config/ # XDG_CONFIG_HOME/mavor/config.toml loader with ~/$VAR expansion
|
|
305
|
+
internal/daemon/ # wires everything; main.go is a thin caller
|
|
306
|
+
test/integration/ # headless sway + audio-stack test harness
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Build tags
|
|
310
|
+
|
|
311
|
+
The default build is pure Go. `CGO_ENABLED=0` works, cross-compilation works,
|
|
312
|
+
and no system development headers are needed to build it.
|
|
313
|
+
|
|
314
|
+
- `sherpa`: link the in-process sherpa-onnx recognizers. This is the only
|
|
315
|
+
variant that needs cgo, and therefore the only one that cannot be
|
|
316
|
+
cross-compiled.
|
|
317
|
+
- `integration`: build the headless-sway test harness.
|
|
318
|
+
- `e2e`: opt in to tests that exercise real whisper-cli + a downloaded model.
|
|
319
|
+
|
|
320
|
+
## Built on
|
|
321
|
+
|
|
322
|
+
`mavor` is a thin daemon around other people's hard work. In rough order of how
|
|
323
|
+
much of the heavy lifting they do:
|
|
324
|
+
|
|
325
|
+
**Speech recognition**
|
|
326
|
+
|
|
327
|
+
- [whisper.cpp](https://github.com/ggml-org/whisper.cpp) — the `whisper-cli`
|
|
328
|
+
and `whisper-server` binaries behind the `cli` and `server` engines, and the
|
|
329
|
+
GGML model format the catalog pulls.
|
|
330
|
+
- [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx) and its Go bindings,
|
|
331
|
+
[sherpa-onnx-go](https://github.com/k2-fsa/sherpa-onnx-go) — the in-process
|
|
332
|
+
`sherpa` engine, including the streaming transducers.
|
|
333
|
+
([ONNX Runtime](https://github.com/microsoft/onnxruntime) rides along inside
|
|
334
|
+
the platform modules; a `sherpa`-tagged build links roughly 90 MB of it.)
|
|
335
|
+
- [OpenAI Whisper](https://github.com/openai/whisper),
|
|
336
|
+
[NVIDIA NeMo](https://github.com/NVIDIA/NeMo) (Parakeet),
|
|
337
|
+
[k2-fsa/icefall](https://github.com/k2-fsa/icefall) (Zipformer),
|
|
338
|
+
[Useful Sensors](https://github.com/usefulsensors/moonshine) (Moonshine) and
|
|
339
|
+
[FunASR](https://github.com/modelscope/FunASR) (SenseVoice, Paraformer) — the
|
|
340
|
+
model families the catalog carries.
|
|
341
|
+
|
|
342
|
+
**Desktop integration**
|
|
343
|
+
|
|
344
|
+
- [wlroots](https://gitlab.freedesktop.org/wlroots/wlroots) and the
|
|
345
|
+
[wlr-layer-shell](https://github.com/swaywm/wlr-protocols) protocol — what
|
|
346
|
+
lets the overlay be an anchored surface rather than a window your tiler has
|
|
347
|
+
to place. mavor speaks the protocol directly rather than through a library.
|
|
348
|
+
- [golang.org/x/image](https://pkg.go.dev/golang.org/x/image) — the rasterizer
|
|
349
|
+
the pill is drawn with, and the Go font it is typeset in. Embedding the font
|
|
350
|
+
is what makes the overlay render identically on every machine.
|
|
351
|
+
- [wtype](https://github.com/atx/wtype) — synthetic keystrokes over
|
|
352
|
+
`virtual-keyboard-unstable-v1`.
|
|
353
|
+
- [wl-clipboard](https://github.com/bugaevc/wl-clipboard) — `wl-copy` and
|
|
354
|
+
`wl-paste`.
|
|
355
|
+
- [PipeWire](https://pipewire.org/) and
|
|
356
|
+
[PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/) utilities
|
|
357
|
+
— `parec` for capture and `pactl` for ducking.
|
|
358
|
+
- [sway](https://swaywm.org/) and [wlroots](https://gitlab.freedesktop.org/wlroots/wlroots)
|
|
359
|
+
— the compositor this is built for, and the headless one the integration
|
|
360
|
+
tests run against.
|
|
361
|
+
|
|
362
|
+
**Go modules**
|
|
363
|
+
|
|
364
|
+
| Module | License |
|
|
365
|
+
|---|---|
|
|
366
|
+
| [`golang.org/x/image`](https://pkg.go.dev/golang.org/x/image) | BSD-3-Clause |
|
|
367
|
+
| [`golang.org/x/sys`](https://pkg.go.dev/golang.org/x/sys) | BSD-3-Clause |
|
|
368
|
+
| [`github.com/k2-fsa/sherpa-onnx-go`](https://github.com/k2-fsa/sherpa-onnx-go) | Apache-2.0 |
|
|
369
|
+
| [`github.com/k2-fsa/sherpa-onnx-go-linux`](https://github.com/k2-fsa/sherpa-onnx-go-linux) | Apache-2.0 |
|
|
370
|
+
| [`github.com/pelletier/go-toml/v2`](https://github.com/pelletier/go-toml) | MIT |
|
|
371
|
+
| [`golang.org/x/text`](https://pkg.go.dev/golang.org/x/text) | BSD-3-Clause |
|
|
372
|
+
|
|
373
|
+
**Testing**
|
|
374
|
+
|
|
375
|
+
- [grim](https://sr.ht/~emersion/grim) for the screenshots the integration
|
|
376
|
+
suite and the UI storybook assert against, and
|
|
377
|
+
[Waybar](https://github.com/Alexays/Waybar) as the bar the overlay has to
|
|
378
|
+
stay clear of.
|