查看“TextToSpeech”的源代码
来自Ubuntu中文
←
TextToSpeech
跳到导航
跳到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
This page is a default template for documentation on the wiki. To create a new guide on the wiki, read the page WikiGuide. == Introduction == You can take advantage of Text-To-Speech in Ubuntu by using a program called Festival. Because by default it doesn't work with ESD (the sound mixer that comes by default with Dapper), a little of manual tweaking is needed. This is not meant to be a guide on how to use Festival (for that, read the Festival user docs), but simply how to get it working on Ubuntu with ESD. (If you don't use Festival with ESD, you will have to disable ESD in the "Sounds" preferences dialog. But in that case, your other multimedia apps won't be able to play audio at the same time.) == 介绍 == 在Ubuntu中你可以使用一个名为Festival的程序实现文字语音转换(Text-To-Speech)。由于在默认状态下这个程序不支持ESD(Dapper自带的默认混音器),所以一些小的手动调制是必需的。 本文并非使用Festival的指导(若需指导,请阅读Festival用户文档),仅说明如何让他在装有ESD的Ubuntu下运行。(如果你不想通过EDS使用Festival,你须将“声音”选项中的ESD禁用。但是一旦如此,你的其它多媒体应用都将无法同时发声。) == Installation == Install Festival (and related files) $ sudo apt-get install festival (Additional voices are available in the Ubuntu respositories. Type "festival" in synaptic for a list of packages.) Install esdplay, which is part of the esound-clients package: $ sudo apt-get install esound-clients == 安装 == 安装Festival(和相关文件) $ sudo apt-get install festival (Ubuntu发行版中还有补充声音文件。在新立得软件包管理器中输入"festival"可找到它们的安装包列表。) 安装esdplay,它是esound-clients包的一部分 $ sudo apt-get install esound-clients == Configuration == You need to configure festival so that it sends its output through ESD. Otherwise, you'll get the following error when you try to run Festival: "can't open /dev/dsp". Edit the /etc/festival.scm: $ sudo gedit /etc/festival.scm Add the following lines at the end of the file: (Parameter.set 'Audio_Command "esdplay $FILE") (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Required_Format 'snd) == 设置 == 你需要对Festival进行设置才能使其通过ESD输出音频,否则当你试图运行Festival时你将收到以下错误信息: "can't open /dev/dsp". 编辑/etc/festival.scm $ sudo gedit /etc/festival.scm 在文件末尾添加下面这行: (Parameter.set 'Audio_Command "esdplay $FILE") (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Required_Format 'snd) == Testing == Test your setup by typing: $ festival you'll be presented with a > prompt. Type: > (SayText "Hello") The computer should say "hello". To listen to a text file type: > (ttt FILENAME nil) FILENAME must be in quote marks. == 测试 == 输入以下命令测试你的安装: $ festival 你会看到 > prompt. Type: > (SayText "Hello") 电脑会说:“Hello” 要听文本文件则输入 > (ttt 文件名 nil) 文件名一定要有引号括起。 ---- * 翻译人员:Yew * 校对人员: * 适用版本:Dapper * 文章状态:等待校对
返回
TextToSpeech
。
导航菜单
页面操作
页面
讨论
阅读
查看源代码
历史
页面操作
页面
讨论
更多
工具
个人工具
登录
导航
首页
最近更改
随机页面
页面分类
帮助
搜索
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息