{"id":4480,"date":"2022-01-21T09:17:24","date_gmt":"2022-01-21T03:47:24","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/?p=4480"},"modified":"2022-06-16T15:21:33","modified_gmt":"2022-06-16T09:51:33","slug":"nerd-dictation-a-fantastic-open-source-speech-to-text-software-for-linux","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2022\/01\/nerd-dictation-a-fantastic-open-source-speech-to-text-software-for-linux\/","title":{"rendered":"nerd-dictation: A fantastic Open Source speech to text software for Linux"},"content":{"rendered":"<p>After a long time of searching I finally found a speech to text software for Linux that actually works well enough that I can use it for dictating without having to jump through too many hoops to configure and use. The software is called <a href=\"https:\/\/github.com\/ideasman42\/nerd-dictation\">nerd-dictation<\/a> and is an open source software. It is fairly easy to setup as compared to the other voice-to-text systems that are available but still not at a stage where a non-tech savvy person would be able to install it easily. (There is effort ongoing to fix that)<\/p>\n<p>The steps to install are fairly simple and documented below for reference:<\/p>\n<ul>\n<li>pip3 install vosk<\/li>\n<li>git clone https:\/\/github.com\/ideasman42\/nerd-dictation.git<\/li>\n<li>cd nerd-dictation<\/li>\n<li>wget https:\/\/alphacephei.com\/kaldi\/models\/vosk-model-small-en-us-0.15.zip<\/li>\n<li>unzip vosk-model-small-en-us-0.15.zip<\/li>\n<li>mv vosk-model-small-en-us-0.15 model<\/li>\n<\/ul>\n<p>nerd-dictation  allows you to dictate text into any software or editor which is open so I can dictate into a word document or a blog post or even the command prompt. Previously I have used tried using software like otter.ai which actually works quite well but doesn&#8217;t allow you to edit the text as you&#8217;re typing, so you basically dictate the whole thing and the system gives you the transcription after you are done. So, you have to go back and edit\/correct the transcript which can be a pain for long dictations. This software works more like Microsoft dictate which is built into Word. Unfortunately my word install on Linux using Crossover doesn&#8217;t allow me to use the built in dictate function and I have no desire to boot into windows just so that I can dictate a document. <\/p>\n<p>This downloads the software in the current directory. I set it up on \/usr\/local but it is up to you where you want it. In addition, I would recommend that you install one of the larger dictionaries\/models which makes the voice recognition a lot more accurate. However, do keep in mind that the larger models use up a lot more memory so you need to ensure  that your computer has enough memory to support the larger models. The smaller ones can run on systems as small as a raspberry pi, so depending on your system configuration you can choose. The models are available <a href=\"https:\/\/alphacephei.com\/vosk\/models\">here<\/a>.<\/p>\n<p>The software does have some quirks, like when you are talking and you pause it will take it as a start of a new sentence and for some reason it doesn&#8217;t put a space after the last word. So unless you&#8217;re careful you need to go back and add spaces to all the sentences that you have dictated, which can get annoying. (I started manually pressing space everytime I paused to add the space). Another issue is that it doesn&#8217;t automatically capitalize the words when you dictate such as those at the beginning of the sentence or the word &#8216;I&#8217;. This requires you to go back and edit, but that being said it still works a lot better than the other software that I have used so far on Linux. For Windows system Dragon Voice Dictation works quite well but is expensive. I tested it out by typing out this post using it and for the most part it does work it worked quite well. <\/p>\n<p>Running the software again requires you to run commands on the commandline, but I configured shortcut keys to start and stop the dictation which makes it very convenient to use. Instructions on how to configure custom shortcut keys are available <a href='https:\/\/www.technipages.com\/linux-mint-how-to-create-new-custom-keyboard-shortcuts'>here<\/a>. If you don&#8217;t want to do that, then you can start the transcription by issuing the following command (assuming the software is installed in \/usr\/local\/nerd-dictation):<\/p>\n<pre class='code'>\/usr\/local\/nerd-dictation\/nerd-dictation begin --vosk-model-dir=\/usr\/local\/nerd-dictation\/model  --continuous<\/pre>\n<p>This starts the software and tells it that we are going to dictate for a long time. More details on the options available are available on the project site. To stop the software you should run the following command:<\/p>\n<pre class='code'>\/usr\/local\/nerd-dictation\/nerd-dictation end<\/pre>\n<p>I suggest you try this if you are looking for a speech-to-text software for Linux. Well this is all for now. Will post more later.<\/p>\n<p>Thanks to <a href='https:\/\/news.ycombinator.com\/item?id=29972579'>Hacker News: Nerd-dictation, hackable speech to text on Linux <\/a> for the link. <\/p>\n<p>&#8211; Suramya<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a long time of searching I finally found a speech to text software for Linux that actually works well enough that I can use it for dictating without having to jump through too many hoops to configure and use. The software is called nerd-dictation and is an open source software. It is fairly easy [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"atmosphere_disabled":false,"atmosphere_custom_text":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[18,9,13,4,2],"tags":[],"class_list":["post-4480","post","type-post","status-publish","format-standard","hentry","category-computer-software","category-computer-hintstips","category-linuxunix-related","category-my-thoughts","category-techie-stuff"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=4480"}],"version-history":[{"count":2,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4480\/revisions"}],"predecessor-version":[{"id":4482,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4480\/revisions\/4482"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=4480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=4480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=4480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}