v0.3.0
A command-line interface tool that records audio and converting it into text via the OpenAI Whisper API
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Deno Whisper CLI
Deno Whisper CLI is a command-line interface tool that records audio using
sox, converts it into text via the OpenAI Whisper API, and copies the
resulting text to your clipboard for further use. This utility leverages local
tools such as sox for audio recording and pbcopy for transferring text to
the clipboard. An environment key is required to facilitate the translation
process. Currently, support for this tool has only been tested on the latest
versions of MacOS. While there’s potential for future extensions to Windows,
there are no immediate plans for such support.
Installation
You’ll need deno and sox locally:
brew install deno
brew install soxThen, make sure you have an OPENAI_API_KEY environment variable:
export OPENAI_API_KEY=your_openai_api_keyThen you can install via deno.land:
deno install \
--name your_custom_executable_name
--allow-env=OPENAI_API_KEY \
--allow-run=sox,pbcopy \
--allow-read=./temp.mp3 \
--allow-write=./temp.mp3 \
--allow-net=api.openai.com \
https://deno.land/x/whisper_cli/cli.tsFrom there, run:
your_custom_executable_nameUsage
> deno run cli.ts --helpFuture ideas
- add quiet option to configure the logger to not prompt as much
- detect stdout and route prompt text stderr
- accept an option to write content to a file (instead of requiring stdout)
- use a configurable temp directory and file name for the audio file
- enable/disable cleanup of the audio file
- colorize and organize output