A command-line tool that records audio, transcribes it using OpenAI's Whisper, and optionally reformats the text using OpenAI's GPT models.
gem install voice_memoThis gem requires the following external dependencies:
- sox (for audio recording)
- ruby-openai (Ruby gem for OpenAI API access)
- OpenAI API key (for tone formatting)
# Install sox
brew install sox
# The ruby-openai gem will be installed automatically as a dependency
# Set your OpenAI API key
export OPENAI_API_KEY='your-api-key'# Basic usage - record and transcribe
voice
# Apply a tone to the transcription
voice --tone business_casual
voice --tone formal
voice --tone email
voice --tone slack
voice --tone direct_message
voice --tone social_media
voice --tone article
# You can also use custom tone instructions
voice --tone "write this as a haiku"
voice --tone "format this as a bullet-point list of action items"The tool will open your default editor (set by the EDITOR environment variable) to allow you to make final edits to the transcription before copying it to the clipboard. If EDITOR is not set, it will default to nano.
You can set your preferred editor with:
export EDITOR=vim # or any editor you preferYou can customize the core prompt by editing the file at ~/.voice-default-prompt.
Voice memos are saved to ~/voicememos/ with timestamps in the filename.
Temporary files and logs are stored in ~/voicememos/tmp/ and ~/voicememos/logs/ respectively.
The gem is available as open source under the terms of the MIT License.