{"id":28577116,"url":"https://github.com/richiejp/voxinput","last_synced_at":"2026-03-03T23:32:41.250Z","repository":{"id":292234241,"uuid":"980128926","full_name":"richiejp/VoxInput","owner":"richiejp","description":"🎤 A voice assistant that let's you control any Linux desktop and transcribe any audio.","archived":false,"fork":false,"pushed_at":"2026-02-27T17:16:58.000Z","size":964,"stargazers_count":86,"open_issues_count":3,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-02-27T18:51:16.671Z","etag":null,"topics":["assistant","audio","golang","linux","localai","swaywm","transcription","voice-assistant"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richiejp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-05-08T15:56:55.000Z","updated_at":"2026-02-25T14:20:56.000Z","dependencies_parsed_at":"2025-07-08T02:43:01.544Z","dependency_job_id":"1a5bc3cf-d7bf-4760-a965-762086d2bd40","html_url":"https://github.com/richiejp/VoxInput","commit_stats":null,"previous_names":["richiejp/voxinput"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/richiejp/VoxInput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richiejp%2FVoxInput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richiejp%2FVoxInput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richiejp%2FVoxInput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richiejp%2FVoxInput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richiejp","download_url":"https://codeload.github.com/richiejp/VoxInput/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richiejp%2FVoxInput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30065823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant","audio","golang","linux","localai","swaywm","transcription","voice-assistant"],"created_at":"2025-06-11T00:09:26.224Z","updated_at":"2026-03-03T23:32:40.297Z","avatar_url":"https://github.com/richiejp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VoxInput\n\nTranscribe input from your microphone and turn it into key presses on a virtual keyboard. This allows you to use speech-to-text on any application or window system in Linux. In fact you can use it on the system console.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/bc1de2af-e07b-4460-a522-b140a041a3db\" alt=\"VoxInput Robot Mascot\" width=\"400\"\u003e\n\u003c/p\u003e\n\nVoxInput is meant to be used with [LocalAI](https://localai.io), but it will function with any OpenAI compatible API that provides the transcription endpoint or realtime API.\n\n## Features\n\n- **Speech-to-Text Daemon**: Runs as a background process to listen for signals to start or stop recording audio.\n- **Audio Capture and Playback**: Records audio from the microphone and plays it back for verification.\n- **Transcription**: Converts recorded audio into text using a local or remote transcription service.\n- **Text Automation**: Simulates typing the transcribed text into an application using [`dotool`](https://git.sr.ht/~geb/dotool).\n- **Voice Activity Detection**: In realtime mode VoxInput uses VAD to detect speech segments and automatically transcribe them.\n\n## Requirements\n\n- `dotool` (for simulating keyboard input)\n- `OPENAI_API_KEY` or `VOXINPUT_API_KEY`: Your OpenAI API key for Whisper transcription. If you have a local instance with no key, then just leave it unset.\n- `OPENAI_BASE_URL` or `VOXINPUT_BASE_URL`: The base URL of the OpenAI compatible API server: defaults to `http://localhost:8080/v1`\n- `OPENAI_WS_BASE_URL` or `VOXINPUT_WS_BASE_URL`: The base URL of the realtime websocket API: defaults to `ws://localhost:8080/v1/realtime`\n- OpenAI Realtime API support - VoxInput's realtime mode with VAD requires a [websocket endpoint that support's OpenAI's realtime API in transcription only mode](https://github.com/mudler/LocalAI/pull/5392). You can disable realtime mode with `--no-realtime`.\n\nNote that the VoxInput env vars take precedence over the OpenAI ones.\n\nUnless you don't mind running VoxInput as root, then you also need to ensure the following is setup for `dotool`\n\n- Your user is in the `input` user group\n- You have the following udev rule\n\n```\nKERNEL==\"uinput\", GROUP=\"input\", MODE=\"0620\", OPTIONS+=\"static_node=uinput\"\n```\n\nThis can be set in your NixOS config as follows\n```nix\nservices.udev.extraRules = ''\nKERNEL==\"uinput\", GROUP=\"input\", MODE=\"0620\", OPTIONS+=\"static_node=uinput\"\n'';\n```\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/VoxInput.git\n   cd VoxInput\n   ```\n\n2. Build the project:\n   ```bash\n   go build -o voxinput\n   ```\n\n3. Ensure `dotool` is installed on your system and it can make key presses.\n\n4. It makes sense to bind the `record` and `write` commands to keys using your window manager. For instance in my Sway config I have the following\n\n```\nbindsym $mod+Shift+t exec voxinput record\nbindsym $mod+t exec voxinput write\n```\n\nAlternatively you can use the Nix flake.\n\n## Usage\n\nThe `LANG` and `VOXINPUT_LANG` environment variables are used to tell the transcription service which language to use.\nFor multi-lingual use set `VOXINPUT_LANG` to an empty string.\n\n### Commands\n\n- **`listen`**: Starts the speech-to-text daemon.\n  ```bash\n  ./voxinput listen\n  ```\n\n- **`record`**: Sends a signal to the daemon to start recording audio then exits. In realtime mode this will start transcription.\n  ```bash\n  ./voxinput record\n  ```\n\n- **`write`** or **`stop`**: Sends a signal to the daemon to stop recording. When not in realtime mode this triggers transcription.\n  ```bash\n  ./voxinput write\n  ```\n\n- **`help`**: Displays help information.\n  ```bash\n  ./voxinput help\n  ```\n\n### Example Realtime Workflow\n\n1. Start the daemon in a terminal window:\n   ```bash\n   OPENAI_BASE_URL=http://ai.local:8081/v1 OPENAI_WS_BASE_URL=ws://ai.local:8081/v1/realtime ./voxinput listen\n   ```\n\n2. Select a text box you want to speak into and use a global shortcut to run the following\n   ```bash\n   ./voxinput record\n   ```\n\n3. Begin speaking, when you pause for a second or two your speach will be transcribed and typed into the active application.\n\n4. Send a signal to stop recording\n   ```bash\n   ./voxinput stop\n   ```\n\n### Example Workflow\n\n1. Start the daemon in a terminal window:\n   ```bash\n   OPENAI_BASE_URL=http://ai.local:8081/v1 ./voxinput listen --no-realtime\n   ```\n\n2. Select a text box you want to speak into and use a global shortcut to run the following\n   ```bash\n   ./voxinput record\n   ```\n\n3. After speaking, send a signal to stop recording and transcribe:\n   ```bash\n   ./voxinput write\n   ```\n\n4. The transcribed text will be typed into the active application.\n\n## TODO\n\n- [x] Put playback behind a debug switch\n- [x] Create a release\n- [x] Realtime Transcription\n- [ ] GUI and system tray\n- [x] Voice detection and activation (partial, see below)\n- [ ] Code words to start and stop transcription\n- [ ] Allow user to describe a button they want to press (requires submitting screen shot and transcription to LocalAGI)\n\n## Signals\n\n- `SIGUSR1`: Start recording audio.\n- `SIGUSR2`: Stop recording and transcribe audio.\n- `SIGTERM`: Stop the daemon.\n\n## Limitations\n\n- Uses the default audio input, make sure you have the device you want to use set as the default on your system.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [malgo](https://github.com/gen2brain/malgo) for audio handling.\n- [go-openai](https://github.com/sashabaranov/go-openai) for OpenAI API integration.\n- [numen](https://git.sr.ht/~geb/numen) and dotool, I did consider modifying numen to use LocalAI, but decided to go with a new tool for now.\n\n---\n\nFeel free to contribute or report issues! 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichiejp%2Fvoxinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichiejp%2Fvoxinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichiejp%2Fvoxinput/lists"}