{"id":50493454,"url":"https://github.com/franchesoni/s2t","last_synced_at":"2026-06-18T22:00:47.940Z","repository":{"id":221895404,"uuid":"755703260","full_name":"franchesoni/s2t","owner":"franchesoni","description":":speaking_head: :keyboard: Speech-to-text on key for Linux ","archived":false,"fork":false,"pushed_at":"2024-03-23T10:12:35.000Z","size":11,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-23T12:10:11.039Z","etag":null,"topics":["linux","onkey","openai","speech","speech-recognition","speech-to-text","speechrecognition","utilities","whisper"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franchesoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-02-10T20:57:42.000Z","updated_at":"2024-02-22T14:15:09.000Z","dependencies_parsed_at":"2024-02-10T22:25:04.570Z","dependency_job_id":"8fc3663d-0c5a-41c2-9fd6-83dc29da1e18","html_url":"https://github.com/franchesoni/s2t","commit_stats":null,"previous_names":["franchesoni/s2t"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/franchesoni/s2t","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franchesoni%2Fs2t","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franchesoni%2Fs2t/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franchesoni%2Fs2t/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franchesoni%2Fs2t/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franchesoni","download_url":"https://codeload.github.com/franchesoni/s2t/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franchesoni%2Fs2t/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34508867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["linux","onkey","openai","speech","speech-recognition","speech-to-text","speechrecognition","utilities","whisper"],"created_at":"2026-06-02T05:00:36.702Z","updated_at":"2026-06-18T22:00:47.928Z","avatar_url":"https://github.com/franchesoni.png","language":"Shell","funding_links":[],"categories":["By Platform"],"sub_categories":["Linux"],"readme":"# 🗣️ ⌨️ Linux Speech-to-Text with Whisper\nThis project enables speech-to-text functionality on Linux using OpenAI's Whisper. It allows users to record audio with a press of a key (F9 by default), transcribe the audio to text using Whisper, and automatically paste the transcribed text where the cursor is located. This functionality is particularly useful for quickly converting speech into text without navigating through multiple applications.\n\n## Prerequisites\nBefore you start, ensure you have the following installed on your Linux system:\n\n**`ffmpeg`** for audio recording.\n**`xclip`** for clipboard management.\n**`xdotool`** for automated paste.\n**`whisper`** for audio transcription.\nA Python virtual environment with Whisper installed (`$HOME/env_sandbox` in this guide, if yours is different, modify `stop_and_process_recording.sh` with yours).\nYou can install `ffmpeg` `xdotool` and `xclip` using your distribution's package manager. For Whisper, follow the installation instructions provided by OpenAI.\n\n## Setup\n### 1. Clone the Repository\nClone this repository to your local machine's home:\n\n```\ncd\ngit clone https://github.com/franchesoni/s2t.git\ncd linux-speech-to-text\n```\n### 2. Configure Keybindings\n**Disable Key Repeat for F9**: Add **`xset -r 75`** to your **`~/.profile`** to disable key repeat for F9. Log out and log back in for the change to take effect.\n\n**Set Up `xbindkeys`**: Install **`xbindkeys`** and create a **`.xbindkeysrc`** in your home directory with the following content:\n\n```\n\"/home/user/s2t/start_recording.sh\"\n    m:0x0 + c:75\n\n\"/home/user/s2t/stop_and_process_recording.sh\"\n    Release + m:0x0 + c:75\n```\nReplace **`/home/user/s2t/`** with the actual path to the cloned repository (your home!).\n\n### 3. Scripts Configuration\n**Modify the Scripts**: Ensure **`start_recording.sh`** and **`stop_and_process_recording.sh`** are executable. If necessary, modify the scripts to match your system configuration, such as the path to your Python virtual environment.\n```\nchmod +x start_recording.sh stop_and_process_recording.sh\n```\n\n### 4. Downloading the model\nOpen two consoles and `cd` to the project. Run `./start_recording.sh` in one and say something. Run `stop_and_process_recording.sh` on the second. You should see that the model is being downloaded and that after it is, you have the transcript pasted where you had the cursor (it's also available using ctrl+v). \n\n### 5. Using the Speech-to-Text Functionality\n**Start Recording**: Press and hold F9 to start recording your speech.\n**Stop Recording and Transcribe**: Release F9 to stop recording. The audio will be transcribed to text using Whisper, and the text will be automatically pasted from the clipboard to where your cursor is located.\n\n## Troubleshooting\nIf the transcription does not work, ensure Whisper is correctly installed in your virtual environment and that the scripts point to the correct path of the virtual environment.\nMake sure `ffmpeg` and `xclip` are correctly installed and accessible from your PATH.\n\n## Contributions\nContributions are welcome! If you have improvements or bug fixes, please open a pull request or issue.\n\n## Credit\nhttps://chat.openai.com/share/db168b73-7dfe-4467-a450-35791e48403b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranchesoni%2Fs2t","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranchesoni%2Fs2t","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranchesoni%2Fs2t/lists"}