This package provides a powerful and user-friendly transient menu for configuring and interacting with the Whisper API within Emacs.
Name | Version |
---|---|
Emacs | 28.1 |
whisper | 0.3.0 |
transient | 0.6.0 |
First ensure that you have installed whisper package.
(use-package whisper-menu
:straight (whisper-menu
:repo "KarimAziev/whisper-menu"
:type git
:host github)
:commands (whisper-menu))
Download the source code and put it wherever you like, e.g. into ~/.emacs.d/whisper-menu/
git clone https://github.com/KarimAziev/whisper-menu.git ~/.emacs.d/whisper-menu/
Add the downloaded directory to the load path:
(add-to-list 'load-path "~/.emacs.d/whisper-menu/")
(require 'whisper-menu)
The cornerstone of Whisper Menu is its transient command whisper-menu
, which grants quick access to a variety of settings and actions related to the Whisper API.
To invoke the Whisper Menu, execute:
M-x whisper-menu
Or use the keybinding you’ve configured during the installation.
All settings can be temporarily adjusted or permanently saved for future sessions. Settings can be saved using the whisper-menu-save-variables
command (in the menu it is bound to s
) or by executing a corresponding suffix command with a prefix argument.
The command whisper-menu-save-variables
saves the values of modified variables
as defined in the whisper-menu-saveable-variables
customizable variable.
- Number of Threads: Adjust how many threads the Whisper API should utilize.
- Language Settings: Choose the default language for transcription. Languages can be dynamically added or removed from the set of choices.
- Translation Toggle: Enable or disable automatic translation.
- Model Settings: Select the Whisper model size according to your needs.
- Additional Settings: Insert text at the point of invocation and toggle whether the cursor should return to the start position after executing a command.
- Saving Configurations: After tweaking settings to your preference, you can save the modified variables for persistent use.
- Audio Transcription/Translation: Directly transcribe or translate audio from within Emacs.
Whisper Menu introduces several custom variables to tailor the tool to your preferences:
whisper-menu-align-column
: Adjusts the column alignment for menu entries for better readability.whisper-menu-language-choices
: Manages the available language options for menu translations, with an easy mechanism to add or remove languages. This variable can also be configured interactively by the commandswhisper-menu-add-language-choice
andwhisper-menu-remove-language-choice
.whisper-menu-saveable-variables
: Defines which Whisper-related variables are eligible for saving, ensuring your setup persists across sessions.whisper-menu-language-completing-read-threshold
: Sets a threshold for when to switch from cycling languages to prompting the user with a completion list.