Git Product home page Git Product logo

speech-to-text.nvim's Introduction

speech-to-text.nvim

Neovim plugin offer speech to text capability using the Python speech_recognition library.

You can select your favorite engine for speech-to-text: OpenAI whisper, Google, Vosk API etc.. (or any supported speech_recognition engine).

This is basically a tin wrapper around speech_recognition. So, you really want to check out its documentation. Should work OOB with whisper function.

Uses keyboard, which requires admin on Linux. Luckily, only used for detection of <ESC> so without root access you may only lose the escape key functionality.

Installation

Using vim-plug:

Plug 'eyalk11/speech-to-text.nvim'

or with Vundle:

Plugin 'eyalk11/speech-to-text.nvim'
PluginInstall

Before running UpdateRemotePlugins, check the Python provider of your VIM installation:

:CheckHealth

To install Python dependencies:

!pip install -r ~/.vim/plugged/speech-to-text.nvim/requirements.txt
:UpdateRemotePlugins

Those are minimal requirements. The speech_recognition library may have more dependencies depending on the platform and/or desired functionality.

Alternative

It may be possible to install in one line (untested):

Plug 'eyalk11/speech-to-text.nvim', {'do': ':!python -m pip install -r ./requirements.txt \| :UpdateRemotePlugins'}

Usage

Installing the plugin adds the following functionality to VIM:

GetVoice(): returns text by speech

:Voice: replaces the selected range with text (by speech). Gets the same parameters as the ConfigureVoice commmand.

You can cancel both voice commands by pressing esc.

:ConfigureVoice [enginename] [paramsdic] - which configures engine parameters (can also be done by yaml config). The enginename and params would be used for the next Voice/GetVoice call.

Mappings

Mappings are not added by default. Suggested mappings:

nmap <c-L> :Voice<CR>
imap <C-L> <C-R>=GetVoice()<CR>

Credits

https://vi.stackexchange.com/users/23502/vivian-de-smedt for helping out with replacing text.

speech-to-text.nvim's People

Contributors

eyalk11 avatar mdvthu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.