├── .gitattributes ├── README.md ├── glide.lock ├── glide.yaml ├── main.go ├── server └── server.go ├── speed_test.go ├── vendor └── github.com │ ├── garyburd │ └── redigo │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── internal │ │ ├── commandinfo.go │ │ ├── commandinfo_test.go │ │ └── redistest │ │ │ └── testdb.go │ │ ├── redis │ │ ├── conn.go │ │ ├── conn_test.go │ │ ├── doc.go │ │ ├── log.go │ │ ├── pool.go │ │ ├── pool_test.go │ │ ├── pubsub.go │ │ ├── pubsub_test.go │ │ ├── redis.go │ │ ├── reply.go │ │ ├── reply_test.go │ │ ├── scan.go │ │ ├── scan_test.go │ │ ├── script.go │ │ ├── script_test.go │ │ ├── test_test.go │ │ └── zpop_example_test.go │ │ └── redisx │ │ ├── connmux.go │ │ ├── connmux_test.go │ │ └── doc.go │ └── imroc │ └── log │ ├── LICENSE │ ├── README.md │ └── log.go └── xf ├── README.md ├── doc ├── iFlytek MSC Reference Manual │ ├── all__0_8js.html │ ├── all__1_8js.html │ ├── arrowdown.png │ ├── arrowright.png │ ├── bc_s.png │ ├── bdwn.png │ ├── closed.png │ ├── dir_25539194184bab781b1c7ecd67774cd8.html │ ├── dir_9a65024ac0a05d9abfc2bb6c7ff8f818.html │ ├── doc.png │ ├── doxygen.css │ ├── doxygen.png │ ├── dynsections.js │ ├── dynsections_8js.html │ ├── files.html │ ├── files__0_8js.html │ ├── files__1_8js.html │ ├── folderclosed.png │ ├── folderopen.png │ ├── functions__0_8js.html │ ├── functions__1_8js.html │ ├── globals.html │ ├── globals_func.html │ ├── globals_vars.html │ ├── index.html │ ├── jquery.js │ ├── jquery_8js.html │ ├── msp__cmn_8h.html │ ├── msp__cmn_8h_source.html │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── qisr_8h.html │ ├── qisr_8h_source.html │ ├── qmfv_8h.html │ ├── qmfv_8h_source.html │ ├── qtts_8h.html │ ├── qtts_8h_source.html │ ├── search │ │ ├── all_0.html │ │ ├── all_0.js │ │ ├── all_1.html │ │ ├── all_1.js │ │ ├── all_10.html │ │ ├── all_10.js │ │ ├── all_11.html │ │ ├── all_11.js │ │ ├── all_2.html │ │ ├── all_2.js │ │ ├── all_3.html │ │ ├── all_3.js │ │ ├── all_4.html │ │ ├── all_4.js │ │ ├── all_5.html │ │ ├── all_5.js │ │ ├── all_6.html │ │ ├── all_6.js │ │ ├── all_7.html │ │ ├── all_7.js │ │ ├── all_8.html │ │ ├── all_8.js │ │ ├── all_9.html │ │ ├── all_9.js │ │ ├── all_a.html │ │ ├── all_a.js │ │ ├── all_b.html │ │ ├── all_b.js │ │ ├── all_c.html │ │ ├── all_c.js │ │ ├── all_d.html │ │ ├── all_d.js │ │ ├── all_e.html │ │ ├── all_e.js │ │ ├── all_f.html │ │ ├── all_f.js │ │ ├── close.png │ │ ├── files_0.html │ │ ├── files_0.js │ │ ├── files_1.html │ │ ├── files_1.js │ │ ├── files_2.html │ │ ├── files_2.js │ │ ├── files_3.html │ │ ├── files_3.js │ │ ├── files_4.html │ │ ├── files_4.js │ │ ├── files_5.html │ │ ├── files_5.js │ │ ├── files_6.html │ │ ├── files_6.js │ │ ├── functions_0.html │ │ ├── functions_0.js │ │ ├── functions_1.html │ │ ├── functions_1.js │ │ ├── functions_2.html │ │ ├── functions_2.js │ │ ├── functions_3.html │ │ ├── functions_3.js │ │ ├── functions_4.html │ │ ├── functions_4.js │ │ ├── functions_5.html │ │ ├── functions_5.js │ │ ├── functions_6.html │ │ ├── functions_6.js │ │ ├── functions_7.html │ │ ├── functions_7.js │ │ ├── functions_8.html │ │ ├── functions_8.js │ │ ├── functions_9.html │ │ ├── functions_9.js │ │ ├── functions_a.html │ │ ├── functions_a.js │ │ ├── mag_sel.png │ │ ├── nomatches.html │ │ ├── search.css │ │ ├── search.js │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── searchdata.js │ │ ├── variables_0.html │ │ ├── variables_0.js │ │ ├── variables_1.html │ │ ├── variables_1.js │ │ ├── variables_2.html │ │ ├── variables_2.js │ │ ├── variables_3.html │ │ ├── variables_3.js │ │ ├── variables_4.html │ │ ├── variables_4.js │ │ ├── variables_5.html │ │ ├── variables_5.js │ │ ├── variables_6.html │ │ ├── variables_6.js │ │ ├── variables_7.html │ │ └── variables_7.js │ ├── search_8js.html │ ├── searchdata_8js.html │ ├── splitbar.png │ ├── sync_off.png │ ├── sync_on.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ └── tabs.css └── tts_sample │ ├── 32bit_make.sh │ ├── 64bit_make.sh │ ├── Makefile │ └── tts_sample.c ├── include ├── .msp_cmn.h.swp ├── convert.h ├── msp_cmn.h ├── msp_errors.h ├── msp_types.h └── qtts.h ├── lib ├── libmsc.so ├── x64 │ └── libmsc.so └── x86 │ └── libmsc.so └── xf.go /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Go 2 | *.css linguist-language=Go 3 | *.html linguist-language=Go 4 | *.c linguist-language=Go 5 | *.h linguist-language=Go 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ontts 2 | ============== 3 | ontts 是语音在线合成服务 4 | 5 | ## 编译 6 | 7 | ##### GOPATH 8 | 项目源文件需要放在$GOPATH下 9 | 10 | ##### glide 11 | 通过glide管理依赖,若没有安装glide,需先安装 12 | 13 | Ubuntu下glide安装方法: 14 | ``` sh 15 | sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update 16 | sudo apt-get install glide 17 | ``` 18 | 在源文件目录下执行以下命令下载依赖 19 | ``` sh 20 | glide install 21 | ``` 22 | 23 | ##### 编译 24 | ``` sh 25 | go build 26 | ``` 27 | 28 | ##### 运行 29 | 需要将libmsc.so加入环境变量 30 | ``` sh 31 | mv xf/lib/libmsc.so /usr/local/lib/ 32 | vi ~/.bashrc 33 | ``` 34 | export LD_LIBRARY_PATH=/usr/local/lib 35 | 36 | 37 | ## 使用示例 38 | ##### 单次合成: 39 | ``` sh 40 | ./ontts -t "云喇叭快递,快递小管家,您的快递到了,请于下午6点前到学校后门申通快递取件" -o test.wav 41 | ``` 42 | 43 | ##### 启动合成后台服务: 44 | ``` sh 45 | ./ontts -r ":6379" -d /tmp/out 46 | ``` 47 | 48 | ## 命令参数 49 |
50 | 讯飞语音参数选项: 51 | -tp TTS合成参数[有默认值] 52 | -lp 登录参数[有默认值] 53 | 54 | 单次合成模式选项: 55 | -t70 | 71 | ## 目录 72 |待合成的文本 56 | -o 音频输出路径 57 | 58 | 合成服务模式选项: 59 | -d 音频保存的目录 60 | -s 合成速度级别(1-10),数值越小速度越快,越耗CPU[默认为1] 61 | -r redis连接地址 62 | 63 | 日志选项: 64 | -l 日志输出路径[默认./ontts.log] 65 | -ll 日志输出级别(debug,info,warn,error) 66 | 67 | 其他: 68 | -h 查看帮助 69 |
73 | ── ontts 74 | ├── glide.yaml (glide依赖配置) 75 | ├── main.go (程序入口) 76 | ├── README.md 77 | ├── server (TTS合成主体逻辑的package) 78 | │ └── server.go 79 | ├── speed_test.go (速度测试) 80 | └── xf (讯飞SDK的Go封装) 81 | ├── doc (讯飞语音linux SDK相关参考) 82 | ├── include (cgo需要用到的头文件) 83 | ├── lib (动态链接库 SDK) 84 | │ └── libmsc.so 85 | ├── README.md 86 | └── xf.go 87 |88 | -------------------------------------------------------------------------------- /glide.lock: -------------------------------------------------------------------------------- 1 | hash: d98040927f84a825e931f22625c59c43237cf893c9efebb7db41f19ba629c6d9 2 | updated: 2016-10-25T19:52:44.942310245+08:00 3 | imports: 4 | - name: github.com/garyburd/redigo 5 | version: 80f7de34463b0ed3d7c61303e5619efe1b227f92 6 | subpackages: 7 | - internal 8 | - redis 9 | - name: github.com/imroc/log 10 | version: c6167dd819ca6d57c694583aeb6bc534e5fb5b1d 11 | testImports: [] 12 | -------------------------------------------------------------------------------- /glide.yaml: -------------------------------------------------------------------------------- 1 | package: ontts 2 | import: 3 | - package: github.com/imroc/log 4 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "ontts/server" 7 | "os" 8 | "strings" 9 | 10 | "github.com/imroc/log" 11 | ) 12 | 13 | var usageStr = ` 14 | Usage: ontts [options] 15 | 16 | 讯飞语音参数选项: 17 | -tp TTS合成参数[有默认值] 18 | -lp 登录参数[有默认值] 19 | 20 | 单次合成模式选项: 21 | -t
26 | MSC for Windows&Linux API
27 |
28 | |
29 |
86 | 文件 | |
文件 | all_0.js |
文件 | all_1.js |
文件 | files_0.js |
文件 | files_1.js |
文件 | functions_0.js |
文件 | functions_1.js |
文件 | search.js |
文件 | searchdata.js |
26 | MSC for Windows&Linux API
27 |
28 | |
29 |
86 | 目录 | |
目录 | search |
91 | 文件 | |
文件 | dynsections.js |
文件 | jquery.js |
26 | MSC for Windows&Linux API
27 |
28 | |
29 |
94 | 变量 | |
var | searchData |
var searchData | 105 |
26 | MSC for Windows&Linux API
27 |
28 | |
29 |
94 | 变量 | |
var | searchData |
var searchData | 105 |
26 | MSC for Windows&Linux API
27 |
28 | |
29 |
26 | MSC for Windows&Linux API
27 |
28 | |
29 |