diff options
| -rw-r--r-- | Cargo.lock | 94 | ||||
| -rw-r--r-- | Cargo.toml | 3 | ||||
| -rw-r--r-- | README.md | 38 | ||||
| -rw-r--r-- | build.rs | 8 | ||||
| -rw-r--r-- | icon/app.rc | 1 | ||||
| -rw-r--r-- | icon/icon.ico | bin | 0 -> 270622 bytes | |||
| -rw-r--r-- | icon/icon.png | bin | 0 -> 393937 bytes |
7 files changed, 133 insertions, 11 deletions
@@ -678,10 +678,11 @@ version = "0.1.0" dependencies = [ "clap", "cpal", + "embed-resource", "pinyin", "serde", "tokio", - "toml", + "toml 0.8.23", "tracing-subscriber", "vtx-engine", ] @@ -693,6 +694,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] +name = "embed-resource" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31a88c8d26de40ed18fe748c547845aa39de1db3afd958f8cb91579f3644bcb" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.1.2+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] name = "encoding_rs" version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2337,6 +2352,15 @@ dependencies = [ ] [[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + +[[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2519,7 +2543,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.23", "version-compare", ] @@ -2688,12 +2712,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_edit 0.22.27", ] [[package]] +name = "toml" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.3", +] + +[[package]] name = "toml_datetime" version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2719,7 +2758,7 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", "winnow 0.7.15", @@ -2753,6 +2792,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] +name = "toml_writer" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" + +[[package]] name = "tower" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2964,6 +3009,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] name = "vtx-engine" version = "0.3.1" source = "git+https://github.com/Weicao-CatilGrass/vtx-engine?rev=35b954ad50ec6211e6a25ca4777d1685311f696e#35b954ad50ec6211e6a25ca4777d1685311f696e" @@ -2988,7 +3053,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "toml", + "toml 0.8.23", "tracing", "uuid", "windows 0.58.0", @@ -3334,6 +3399,15 @@ dependencies = [ [[package]] name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" @@ -3490,6 +3564,16 @@ dependencies = [ ] [[package]] +name = "winreg" +version = "0.55.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" +dependencies = [ + "cfg-if", + "windows-sys 0.59.0", +] + +[[package]] name = "wit-bindgen" version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -21,6 +21,9 @@ cpal = "0.18.1" git = "https://github.com/Weicao-CatilGrass/vtx-engine" rev = "35b954ad50ec6211e6a25ca4777d1685311f696e" +[target.'cfg(windows)'.build-dependencies] +embed-resource = "3.0.9" + [profile.dev] opt-level = 0 debug = true @@ -1,15 +1,41 @@ -## Dumb Voice Protocol +<div align="center"> +<img src="https://github.com/catilgrass/dumb-voice-protocol/blob/master/icon/icon.ico" width="30%" /> +</div> -# Intro +<h1 align="center"> + Dumb Voice Protocol +</h1> -This is a CLI program that reads your microphone device and outputs information to stdout / ipc. +## Introduction -# Usage +A "dumb" voice input terminal based on [vtx-engine](https://github.com/keathmilligan/vtx-engine) and [Whisper](https://github.com/openai/whisper) — reads from microphone, transcribes to text, sends it to your game or tool. + +Supports multiple output methods: stdout / stderr / TCP / UDP / UDP broadcast / IPC, suitable for various scenarios. + +## Usage + +1. Go to [Releases](https://github.com/catilgrass/dumb-voice-protocol/releases) and download the latest version +2. Unzip, edit `dmvop.toml` to configure +3. Double-click `dmvop.exe` and start speaking + +## Usage (CLI) + +1. Go to [Releases](https://github.com/catilgrass/dumb-voice-protocol/releases) and download +2. Open a terminal, run `dmvop -h` to see options +3. Speak into the microphone + +Common examples: ``` -dmvop --help +dmvop # Load dmvop.toml from current directory +dmvop --device="My Mic" -O=stdout # Voice → terminal +dmvop --device="My Mic" -O=tcp -O=stdout # Voice → game + terminal +dmvop --device="My Mic" -O=udp-broadcast # Voice → LAN broadcast + +dmvop --list-devices # List microphone devices +dmvop --download-model=small # Download whisper model ``` -# License +## License Under WTFPL diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..d11594e --- /dev/null +++ b/build.rs @@ -0,0 +1,8 @@ +fn main() { + #[cfg(windows)] + { + embed_resource::compile("icon/app.rc", embed_resource::NONE) + .manifest_optional() + .expect("Failed to embed app icon"); + } +} diff --git a/icon/app.rc b/icon/app.rc new file mode 100644 index 0000000..a1ec328 --- /dev/null +++ b/icon/app.rc @@ -0,0 +1 @@ +1 ICON "icon.ico" diff --git a/icon/icon.ico b/icon/icon.ico Binary files differnew file mode 100644 index 0000000..08441ad --- /dev/null +++ b/icon/icon.ico diff --git a/icon/icon.png b/icon/icon.png Binary files differnew file mode 100644 index 0000000..64102e8 --- /dev/null +++ b/icon/icon.png |
