Ⅰ. 插件描述
Speech to text and text to speech via google speech apiⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/speech'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/speech'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/speech'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Speech
Ⅳ. 文档说明
Speech.vim - Speech to text and text to speech via google speech api.
Copyright (C) <2011> Onur Aslan <onur@onur.im>
Speech to text:
<Leader>r for record your voice and press again to convert to text and
append after cursor.
Text to speech:
<Leader>s to get speech of your current line.
Requiments: In order to run this script, you need ffmpeg (with flac
encode support), wget and mplayer. This also works under UNIX like
systems.
This script uses ALSA to record your voice. If you have trouble when
you recording your voice, try to change SpechHwId variable. It comes
with hw:0,0 default. You can test your hw id with:
ffmpeg -f alsa -ar 16000 -ac 2 -i hw:0,0 -acodec flac -ab 96k out.flac
'arecord -l' will give you list of audio devices.
You can change language with SpeechLang variable.
LICENSE:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/;.