https://github.com/wolandark/vim-espeak
text to speech for vim using espeak
https://github.com/wolandark/vim-espeak
espeak neovim neovim-plugin text-to-speech tts vim vim-plugin visually-challenged visually-impaired
Last synced: 5 months ago
JSON representation
text to speech for vim using espeak
- Host: GitHub
- URL: https://github.com/wolandark/vim-espeak
- Owner: wolandark
- Created: 2024-07-21T22:41:06.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T05:53:08.000Z (almost 2 years ago)
- Last Synced: 2025-08-02T01:43:15.117Z (11 months ago)
- Topics: espeak, neovim, neovim-plugin, text-to-speech, tts, vim, vim-plugin, visually-challenged, visually-impaired
- Language: Vim Script
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vim espeak
A simple wrapper over the espeak text-to-speech system.
Espeak sounds robotic, for a more natural sounding tts, use [vim-piper](https://github.com/wolandark/vim-piper)
## Introduction
Vim espeak is a Vim plugin that integrates the espeak text-to-speech system into Vim. It allows you to easily convert text within Vim to speech using espeak.
## Dependency
This plugin depends on the following:
- espeak
- Vim or Neovim
# Getting espeak
```
pacman -S espeak espeak-ng
apt install espeak espeak-ng
etc ...
```
# Installation
## Using vim-plug
Add the following to your `~/.vimrc` or `~/.config/nvim/init.vim`:
```vim
Plug 'wolandark/vim-espeak'
```
Then run `:PlugInstall` in Vim.
# Configuration
You can configure the following variable in your ~/.vimrc.
```vim
let g:espeak = 'espeak command to use'
```
default is:
```
let g:espeak = 'espeak -v en'
```
# Functions
The plugin provides the following functions:
- PassVisualSelection(): Utility function to get the visual selection.
- SpeakWord(): Speak the word under the cursor.
- SpeakCurrentLine(): Speak the current line.
- SpeakCurrentParagraph(): Speak the current paragraph.
- SpeakVisualSelection(): Speak the visual selection.
- SpeakCurrentFile(): Speak the current file.
# Mappings
The following mappings are defined by default:
- nnoremap tw :call SpeakWord()
- nnoremap tc :call SpeakCurrentLine()
- nnoremap tp :call SpeakCurrentParagraph()
- nnoremap tf :call SpeakCurrentFile()
- vnoremap tv :call SpeakVisualSelection()
# License
Same as Vim.
# Enjoy!