Dictation app for the terminal and Neovim
Project description
DrDictaphone
Dictation app for the terminal and Neovim, using Whisper for transcription and ChatGPT for post-processing.
Installation
You can use the installation script:
curl https://raw.githubusercontent.com/olekli/DrDictaphone/main/script/install.sh | sh
Or create a virtual environment and do:
pip install drdictaphone
python -m drdictaphone.cli install ~/DrDictaphone
Place OpenAI API key in ~/DrDictaphone/config/openai_api_key
.
Running
To start the standalone app, do ./drdictaphone
.
To start only the server, do ./drdictaphone server
.
Shutdown a running server by doing ./drdictaphone shutdown
.
Neovim Plugin
If you are not already using Python plugins in Neovim,
you need to create a virtual environment for Neovim to use.
Tell Neovim about it by adding to your init.vim
:
let g:python3_host_prog = '~/.neovim-venv/bin/python'
(Or wherever your venv is located.)
Inside this virtual environment, install the Neovim plugin:
pip install drdictaphone-neovim-plugin
Now you need to add the plugin to your Neovim config directory:
ln -s ~/.neovim-venv/lib/python3.11/site-packages/drdictaphone_neovim/DrDictaphone.py ~/.config/nvim/rplugin/python3/.
(Your paths may vary.)
Then start the server. Do :UpdateRemotePlugins
once in Neovim, restart. Use DrDictaphoneSetProfile
, DrDictaphoneToggle
vim commands.
Controlling Standalone App:
s
: select profilep
: start / stop and transcribe recordingd
: stop and discard recordingq
: exit
Profiles
Profiles consist of:
topic
for transcribing and post-processing, a list of stringslanguage
to use for the transcriber, a stringoutput
directory, a stringoutput_command
to pipe output toenable_vad
whether or not to enable VAD, a bool, defaults tofalse
Output will be written to a timestamped file in the output directory.
VAD will filter recordings for parts with voice before processing them.
Post-Processor
The Post-Processor specs consist of:
instructions
for the post-processor, either a filename to load from or a list of stringsgpt_model
to use for post-processing, either a filename to load from or an objectoptions
to use for post-processing, either a filename to load from or an objecttools
to use for the post-processor, either a filename to load from or an object
The context for the post-processor is built from the profile and the post-processor specs. Settings in the profile take precedence over settings in the specs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for drdictaphone_neovim-0.9.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af2d9b7db90c05521a51a606c3abc28e397488af09c5ab5a495b574a4832a11f |
|
MD5 | 8a7e80804be1d5c43f77e5bb50b6ca39 |
|
BLAKE2b-256 | aa60a19158151059941ed1b55a2d3cec6ed3e9857c2cb4be7d99d2715f9e3446 |
Hashes for drdictaphone_neovim-0.9.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ac4ef0b54a8236dc6bc6845e4f0932d93d97ea4c8c96115d2c9793f7e755afc |
|
MD5 | 822f6c38cc40b5fa322ea735c1b42dbf |
|
BLAKE2b-256 | 81b53ff34d9759d01f22cc92887b8375911f555d8995de3cb2debf5e0098efd5 |