Small python script to transcribe speech
- Written with Python 3.9.1
- Compatible with all Linux distributions
-
Clone this git-repository:
git clone https://github.com/DevEmperor/Fastr.git
-
Make sure Python3 is installed:
python3 --version
If you get something like
Python 3.*.*
you have Python3 installed.If you don't have Python3 installed, you can find it in your packet-manager.
-
Install Python3-Pandas and Python3-PyAudio with your packet-manager from your terminal. On Debian-based systems this would be:
sudo apt-get install python3-pandas python3-pyaudio
On other systems this can easily be done by using either the systems packet-manager or using pip:
pip3 install pandas pyaudio
-
Install the "SpeechRecognition"-package using pip:
pip3 install SpeechRecognition
After going into the "fastr"-directory, simply type
python3 fastr.py
You'll get asked whether you want to choose your microphone manually. If you want to use your default input device, just hit ENTER (this will use the default answer which is in this case "NO"). Otherwise you can select the microphone of your choice by typing the number of the input device.
If you want to transcribe in another language than English, you now need to specify the language code. A list of all languages that the recognition engine understands, can be found here.
If you don't want Fastr to copy the result immediately to your clipboard, type "no" now. Otherwise just hit ENTER.
Now press any key to start the recording. Fastr will record everything you say until he cannot understand any speech for more than 2 seconds.
After Fastr printed the recognized text, you can simply hit ENTER again, to restart the recording/recognition. If you want the program to stop, type "no".
I programmed Fastr to submit answers faster in online classes. Therefore Fastr is especially optimized for speed and through the interactive use very simple but still really effective. Of course, Fastr can also be used for other purposes, such as quickly dictating WhatsApp messages in an Android emulator.
Fastr is under the terms of the Apapche 2.0 license, following all clarifications stated in the license file