improvement currently with giant language fashions (LLMs). Plenty of the main target is on the question-answering you are able to do with each pure text-based fashions, or vision-language fashions (VLMs), the place you can too enter photographs.
Nonetheless, there’s one other dimension that has advanced a ton over the previous few years: Audio. Fashions that may each transcribe (speech -> textual content), speech synthesis (textual content -> speech), and likewise speech-to-speech, the place you’ve a complete dialog with a language mannequin, with audio going each out and in.
On this article, I’ll focus on how I’m using the event throughout the audio mannequin area to my benefit, turning into an much more environment friendly programmer.

Motivation
My main motivation for writing this text is that I’m frequently in search of methods to develop into a extra environment friendly programmer. After utilizing the ChatGPT cellular app for some time, I found their transcription choice (the microphone icon to the proper within the person enter area). I used the transcription and rapidly realized how a lot better this transcription is in comparison with others I’ve used earlier than, similar to Apple’s built-in iPhone transcription.
OpenAI’s transcription virtually at all times captures all of my phrases, with only a few errors. Even when I exploit much less frequent phrases, for instance, acronyms associated to laptop science, it’s nonetheless in a position to choose up what I’m saying.

This transcription was solely accessible within the ChatGPT app. Nonetheless, I do know that OpenAI has an API endpoint for his or her Whisper mannequin, which is (presumably) the identical mannequin they’re utilizing to transcribe textual content within the app. I thus needed to set this mannequin up on my Mac to be accessible by way of a shortcut.
(I do know there are apps similar to Macwhisper accessible, however I needed to develop a very free answer, aside from the prices of the API calls themselves)
Conditions
- Alfred (I might be utilizing Alfred on the Mac to set off some scripts. Nonetheless, alternate options to this additionally exist. On the whole, you want a solution to set off scripts in your Mac / PC from a hotkey.
Execs
The primary benefit of utilizing this transcription is that you would be able to enter phrases into your laptop extra rapidly. Once I sort as rapidly as I can on my laptop, I’m not even in a position to attain 100 phrases per minute, and if I’m to sort at that velocity, I actually need to focus. Nonetheless, the typical speaking velocity is at a minimum of 110, according to this article.
This implies you could be a lot simpler if you’ll be able to converse your phrases with transcription, as a substitute of typing them out on the keyboard.
I feel that is particularly related after the rise of huge language fashions similar to ChatGPT. You spend extra time prompting the language fashions, for instance, asking inquiries to ChatGPT, or prompting the cursor to implement a function, or fixing a bug. Thus, using the English language is way more prevalent now than earlier than, in comparison with using programming languages similar to Python instantly.
Notice: After all, you’ll nonetheless be writing quite a lot of code, however from expertise, I spend much more time prompting the cursor, for instance, with intensive English prompts, during which case, utilizing this transcription saves me quite a lot of time.
Cons
There can, nevertheless, be some downsides to utilizing the transcription as nicely. One of many principal ones is that quite a lot of occasions, you don’t want to talk out loud when programming. You could be sitting within the airport (as I’m when writing this text), and even in your workplace. Once you’re in these eventualities, you most likely don’t wish to disturb these round you by talking out loud. Nonetheless, in case you are sitting in a house workplace, that is naturally not an issue.
One other destructive aspect is that smaller prompts may not be that a lot sooner. Think about this: should you simply wish to write a immediate of a single sentence, it’s going to, in lots of eventualities, be sooner simply to sort the immediate out by hand. That is due to the delay in beginning, stopping, and transcribing audio into textual content. Sending the API name takes just a little little bit of time, and the shorter the immediate you’ve, the bigger fraction of the time you must spend ready for the response.
Easy methods to implement
You’ll be able to see the code I used in this article on my GitHub. Nonetheless, you additionally want so as to add hotkeys to run the scripts.
First, you must:
- Clone the GitHub repository:
git clone https://github.com/EivindKjosbakken/whisper-shortcut.git
- Create a digital setting known as .venv and set up the required packages:
python3 -m venv .venv
supply .venv/bin/activate
pip set up -r necessities.txt
- Get an OpenAI API Key. You are able to do that by:
- Going to the OpenAI API Overview, logging in/making a profile
- Go to your profile, and API Keys
- Create a brand new key. Bear in mind to repeat the important thing, as you won’t be able to see it once more
The scripts from the GitHub repository work by:
- start_recording.sh — begins recording your voice. The primary time you utilize this, it’s going to ask you for permission to make use of the microphone
- stop_recording.sh — sends a cease sign to the script to cease recording. Then sends the recorded audio to OpenAI for transcription. Moreover, it provides the transcribed textual content to your clipboard and pastes the textual content in case you have a textual content area in your PC chosen
All the repository is obtainable with an MIT license.
Alfred
You’ll find the Alfred workflow on the GitHub repository right here: Transcribe.alfredworkflow.
That is how I arrange the Alfred workflow:

You’ll be able to merely obtain it and add it to your Alfred.
Additionally, keep in mind to have a terminal window open everytime you wish to run this script, as you activate the Python script from the terminal. I needed to do it this fashion as a result of if the script was activated instantly from Alfred, I obtained permission points. The primary time you run the script, you need to be prompted to offer your terminal entry to the microphone, which you need to approve.
Price
An essential consideration when utilizing APIs similar to OpenAI Whisper is the price of the API utilization. I’d think about the price of utilizing OpenAI’s Whisper mannequin reasonably excessive. As at all times, the associated fee is totally depending on how a lot you utilize the mannequin. I’d say I exploit the mannequin as much as 25 occasions a day, as much as 150 phrases, and the associated fee is lower than 1 greenback per day.
This implies, nevertheless, that should you use the mannequin rather a lot, you may see prices as much as 30 {dollars} per 30 days, which is certainly a considerable value. Nonetheless, I feel it’s essential to be aware of the time financial savings you’ve from the mannequin. If every mannequin utilization saves you 30 seconds, and you utilize it 20 occasions per day, you’ve simply saved ten minutes of your day. Personally, I’m keen to pay one greenback to avoid wasting ten minutes of my day, performing a process (writing on my keyboard), that doesn’t actually grant me another profit. If any, utilizing your keyboard might contribute to the next threat of accidents similar to carpal tunnel syndrome. Utilizing the mannequin is thus positively value it for me.
Conclusion
On this article, I began off discussing the immense advances inside language fashions in the previous few years. This has helped us create highly effective chatbots, saving us huge quantities of time. Nonetheless, with the advances of language fashions, we now have additionally seen advances in voice fashions. Transcription utilizing OpenAI Whisper is now close to excellent (from private expertise), which makes it a robust device you should use to enter phrases in your laptop extra successfully. I mentioned the professionals and cons of utilizing OpenAI Whisper in your PC, and I additionally went step-by-step by way of how one can implement it by yourself laptop.