免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1067 | 回复: 0
打印 上一主题 下一主题

Festival 编译笔记 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-27 18:42 |只看该作者 |倒序浏览
Festival编译笔记
ubuntu+gcc
festival
编译festival
1.编译原材料
http://festvox.org/packed/festival/1.96/
festival-1.96-beta.tar.gz
speech_tools-1.2.96-beta.tar.gz
2.编译festival
a.把两个包解压到同一级目录中 因为festival编译时需要speech_tools
b.分别 ./configure ...   make
使用festival开发tts
1.例子
#include
#include
int main(int argc, char **argv) {
    EST_Wave wave;
    int heap_size = 210000; // default scheme heap size
    int load_init_files = 1; // we want the festival init files loaded
    festival_initialize(load_init_files, heap_size);
    // Say simple file
    festival_say_file("/etc/motd");
    festival_eval_command("(voice_ked_diphone)");
    //festival_eval_command("voice_default");
    // Say some text;
    festival_say_text("pan hui ni hao ");
    // Convert to a waveform
    //festival_text_to_wave("hello world", wave);
    //wave.save("/tmp/wave.wav", "riff");
    // festival_say_file puts the system in async mode so we better
    // wait for the spooler to reach the last waveform before exiting
    // This isn't necessary if only festival_say_text is being used (and
    // your own wave playing stuff)
    festival_wait_for_spooler();
    return 0;
}
这是manual上的例子 很简单 实现 TTS  并且可以保存成wav(网站上的demo一般都是提供wav文件下载)
2.头文件
-I/home/huipan/study/speech_tools/include -I/home/huipan/study/festival-1.96~beta
如此 把编译的目录都能包含进来.
单纯的使用festival-dev 头文件不够
3.link
-lFestival -lesd -lncurses -leststring -lestbase -lestools
-lesd -lncurses 调这两个费了不少时间
只是一则备忘
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1073/showart_1341817.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP