{"id":20279030,"url":"https://github.com/t-vk/termux-deepspeech","last_synced_at":"2025-10-08T02:50:09.237Z","repository":{"id":41132929,"uuid":"226366474","full_name":"T-vK/Termux-DeepSpeech","owner":"T-vK","description":"Open source offline speech recognition for Android using Mozilla's DeepSpeech in Termux","archived":false,"fork":false,"pushed_at":"2022-07-16T13:00:12.000Z","size":26,"stargazers_count":73,"open_issues_count":4,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T06:17:40.935Z","etag":null,"topics":["android","bash","deepspeech","mozilla","offline","open-source","speech-recognition","termux"],"latest_commit_sha":null,"homepage":null,"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/T-vK.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}},"created_at":"2019-12-06T16:16:20.000Z","updated_at":"2025-04-10T01:50:26.000Z","dependencies_parsed_at":"2022-07-16T18:16:48.959Z","dependency_job_id":null,"html_url":"https://github.com/T-vK/Termux-DeepSpeech","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/T-vK/Termux-DeepSpeech","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FTermux-DeepSpeech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FTermux-DeepSpeech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FTermux-DeepSpeech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FTermux-DeepSpeech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-vK","download_url":"https://codeload.github.com/T-vK/Termux-DeepSpeech/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-vK%2FTermux-DeepSpeech/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278881664,"owners_count":26062176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["android","bash","deepspeech","mozilla","offline","open-source","speech-recognition","termux"],"created_at":"2024-11-14T13:27:48.354Z","updated_at":"2025-10-08T02:50:09.195Z","avatar_url":"https://github.com/T-vK.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open source offline speech recognition for Android using Mozilla's DeepSpeech in Termux\n\n## Requirements\n- ~3GB of disk space during installation; afterwards only ~2GB\n- [Termux](https://f-droid.org/app/com.termux)\n- [Termux:API](https://f-droid.org/app/com.termux.api)\n\n## Installation\n\n- Install the following (open source) apps: Termux, Termux:API\n- Open Termux and run\n    `pkg i -y git \u0026\u0026 git clone https://github.com/T-vK/Termux-DeepSpeech.git \u0026\u0026 cd ./Termux-DeepSpeech \u0026\u0026 ./speech2text`\n\nThis will take a while beacuse it needs to download a pre-trained DeepSpeech model and a DeepSpeech release. It will probably also ask for microphone permissions (which are required for obvious reasons).\n\n## Usage\nIf the installation was successful, you should now be able to use command `speech2text`.\n`speech2text` will listen to your microphone for (by default) 2 seconds and then print the words that were recognized.\n\n## Advanced usage\nYou could create bash scripts like this:\n``` bash\n#!/data/data/com.termux/files/usr/bin/bash\n\nWORDS=\"$(speech2text)\"                            # This will listen to the microphone for (by default) 2 seoncds and the write what you said in the variable WORDS\n\necho \"Recognized: $WORDS\"                         # Show what you just said\n\nif [[ \"$WORDS\" =~ \"light\" ]]; then                # If what you said contained the word \"light\"\n    if [[ $WORDS =~ \"on\" ]]; then                 # If what you said contained the word \"on\"\n        termux-tts-speak \"Turning flashlight on\"  # Let a robot voice say \"Turning flashlight on\"\n        termux-torch on                           # Turn the flashlight on\n    elif [[ $WORDS =~ \"of\" ]]; then               # If what you said contained the word \"of\"\n        termux-tts-speak \"Turning flashlight off\" # Let a robot voice say \"Turning flashlight off\"\n        termux-torch off                          # Turn the flashlight off\n    fi\nelif [[ \"$WORDS\" =~ \"heating\" ]] || [[ \"$WORDS\" =~ \"temperature\" ]]; then   # If what you said contained the word \"heating\" or \"temerature\"\n    # Do whatever here...\n    echo \"Hello\"\nelse\n    termux-tts-speak \"You said: $WORDS\"           # Let a robot voice repeat what it thought you said...\nfi\n```\n\nIf you install the [Termux:Widget](https://f-droid.org/app/com.termux.widget) app and save the above script under \"$HOME/.shortcuts/tasks/\" and make it executable for example like this: `chmod +x \"$HOME/.shortcuts/tasks/speech-command\"` (speech-command is the name of the script).\nYou can then then create a widget that triggers the script. Or using the app [HomeBot](https://f-droid.org/app/com.abast.homebot) (open source) you can remap long-pressing the home button which usually triggers the Google voice assistent to run your speech-command script.\n\n\n## Warning\n\nThis is a very new script that has barely been tested. You might also have to install a TTS Engine ([Flite TTS Engine](https://f-droid.org/app/edu.cmu.cs.speech.tts.flite) is a good open source one) because I'm using text-to-speech commands a few times in the `Advanced usage` example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-vk%2Ftermux-deepspeech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-vk%2Ftermux-deepspeech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-vk%2Ftermux-deepspeech/lists"}