Ikazuchi语言处理程序
ikazuchi.plugins.speech的Python项目详细描述
ikazuchi.plugins.speech 是ikazuchi要提供的插件 文本到语音功能。
由于Ikazuchi是CUI工具,因此它打算与其他工具一起使用。
有关详细信息,请参见项目documentation。
功能
- 为给定文本或翻译文本提供文本到语音功能
设置
通过简易安装
创造环境:
$ easy_install ikazuchi.plugins.speech
通过构建
创造环境:
$ hg clone https://bitbucket.org/t2y/ikazuchi.plugins.speech $ cd ikazuchi.plugins.speech $ python bootstrap.py -d $ bin/buildout
用法
使用ikazuchi命令说出给定文本:
$ ikazuchi speech -s "hello world" use command: /usr/bin/afplay sentence: hello world translate_tts(Google):
使用ikazuchi命令说出翻译文本:
$ ikazuchi speech -s "hello world" -p use command: /usr/bin/afplay sentence: hello world translate(Google): [translated text] translate_tts(Google):
显示可用的插件:
$ ikazuchi -h usage: ikazuchi [-h] {rstfile,speech,normal} ... positional arguments: {rstfile,speech,normal} available plugins. 'normal' means ikazuchi's standard feature so it can be abbreviated optional arguments: -h, --help show this help message and exit
显示语音插件帮助:
$ ikazuchi speech -h usage: ikazuchi speech [-h] [-a API] [-e ENCODING] [-f LANG] [-q] [-t LANG] [-c COMMAND] [-p] [-r READING TARGET FILE] [-s SENTENCE [SENTENCE ...]] [--version] optional arguments: -h, --help show this help message and exit -a API, --api API APIs are ['google', 'microsoft'] -e ENCODING, --encoding ENCODING input/output encoding -f LANG, --from LANG original language -q, --quiet not to show original sentence to stdout -t LANG, --to LANG target language to translate -c COMMAND, --command COMMAND use any command to speak(play audio file) -p, --post speak post-translated target sentences -r READING TARGET FILE, --read READING TARGET FILE read aloud target file -s SENTENCE [SENTENCE ...], --sentences SENTENCE [SENTENCE ...] target sentences --version show program's version number and exit
要求
- python 2.6或更高版本
- Ikazuchi 0.5.2或更高版本
- Pyglet 1.1.4或更高版本
- 设置工具或发行版
许可证
apache许可证2.0
历史记录
0.1.2(2011-06-15)
- 修复与使用“-s”选项编码相关的严重错误
0.1.1(2011-06-11)
- 修复与默认api名称相关的小错误
0.1.0(2011-06-06)
- 首次发布
待办事项
- 需要在不同平台上进行测试