Board logo

標題: google TTS [打印本頁]

作者: ckleea    時間: 2011-12-14 13:00     標題: google TTS

I got an update on Text to Speech.

If you have an asterisk server, you may try this agi

Detailed set up can be found here

http://211.72.203.62/VoIP/IP_PBX ... 8B_TTS_-_Google_TTS

Language support

-------------------
Supported Languages
-------------------
"af" Afrikaans, "sq" Albanian, "am" Amharic, "ar" Arabic, "hy" Armenian, "az" Azerbaijani,
"eu" Basque, "be" Belarusian, "bn" Bengali, "bh" Bihari, "bs" Bosnian, "br" Breton, "bg" Bulgarian,
"km" Cambodian, "ca" Catalan, "zh-CN" Chinese (Simplified), "zh-TW" Chinese (Traditional),
"co" Corsican, "hr" Croatian, "cs" Czech, "da" Danish, "nl" Dutch, "en" English, "eo" Esperanto,
"et" Estonian, "fo" Faroese, "tl" Filipino, "fi" Finnish, "fr" French, "fy" Frisian, "gl" Galician,
"ka" Georgian, "de" German, "el" Greek, "gn" Guarani, "gu" Gujarati, "xx-hacker" Hacker, "ha" Hausa,
"iw" Hebrew, "hi" Hindi, "hu" Hungarian, "is" Icelandic, "id" Indonesian, "ia" Interlingua, "ga" Irish,
"it" Italian, "ja" Japanese, "jw" Javanese, "kn" Kannada, "kk" Kazakh, "rw" Kinyarwanda,
"rn" Kirundi, "xx-klingon" Klingon, "ko" Korean, "ku" Kurdish, "ky" Kyrgyz, "lo" Laothian,
"la" Latin, "lv" Latvian, "ln" Lingala, "lt" Lithuanian, "mk" Macedonian, "mg" Malagasy,
"ms" Malay, "ml" Malayalam, "mt" Maltese, "mi" Maori, "mr" Marathi, "mo" Moldavian, "mn" Mongolian,
"sr-ME" Montenegrin, "ne" Nepali, "no" Norwegian, "nn" Norwegian (Nynorsk), "oc" Occitan, "or" Oriya,
"om" Oromo, "ps" Pashto, "fa" Persian, "xx-pirate" Pirate, "pl" Polish, "pt-BR" Portuguese (Brazil),
"pt-PT" Portuguese (Portugal), "pa" Punjabi, "qu" Quechua, "ro" Romanian, "rm" Romansh, "ru" Russian,
"gd" Scots Gaelic, "sr" Serbian, "sh" Serbo-Croatian, "st" Sesotho, "sn" Shona, "sd" Sindhi,
"si" Sinhalese, "sk" Slovak, "sl" Slovenian, "so" Somali, "es" Spanish, "su" Sundanese, "sw" Swahili,
"sv" Swedish, "tg" Tajik, "ta" Tamil, "tt" Tatar, "te" Telugu, "th" Thai, "ti" Tigrinya, "to" Tonga,
"tr" Turkish, "tk" Turkmen, "tw" Twi, "ug" Uighur, "uk" Ukrainian, "ur" Urdu, "uz" Uzbek,
"vi" Vietnamese, "cy" Welsh, "xh" Xhosa, "yi" Yiddish, "yo" Yoruba, "zu" Zulu.
作者: ckleea    時間: 2011-12-14 13:01

I found the quality in Chinese not bad
作者: ckleea    時間: 2011-12-14 23:06

I try this. good audio quality
exten => 1003,1,Answer
exten => 1003,n,Wait(2)
exten => 1003,n,AGI(googletts.agi,"你好嗎? 歡迎光臨我的電話系統",zh-TW)
;exten => 1003,n,Background(thank-you-for-calling,m)
;exten => 1003,n,Background(vm-enter-num-to-call,m)
exten => 1003,n,AGI(googletts.agi,"請輸入你需要的內線號碼",zh-TW)
exten => 1003,n,WaitExten()
exten => 1003,n,Hangup
exten => i,1,AGI(googletts.agi,"內線號碼不正確",zh-TW)
exten => i,2,Goto(1003,1)
exten => t,1,AGI(googletts.agi,"再見",zh-TW)
exten => t,2,Hangup
作者: ckleea    時間: 2011-12-15 08:26

今早從街上打回再試,基本上非常清晰。
作者: bubblestar    時間: 2011-12-15 09:30

My test result is the other way round.  The TTS in English is better while Chinese is garbled.

I doubt I don't have appropriate codec installed.  Do you have any ideas which codec should I use for the conversion.  Also, have you installed *.wav in the system?
作者: alang    時間: 2011-12-15 11:12

我想這與 codec 沒有直接的關係,至少使用 ulaw/alaw 一定可以工作,另外也不需安裝任何語音檔 *.wav,因為這是利用 stdin 方式,類似播放語音串流方式。

https://plus.google.com/u/0/1101 ... 0/posts/ZQ9kjoFdc1R
作者: ckleea    時間: 2011-12-15 11:31

回復 6# alang


    或者是網絡的問題,我現在只設定普通話,但效果好好。昨晚試英文就不堪入耳,比OBi AA 還差
作者: bubblestar    時間: 2011-12-15 11:54

回復 6# alang


   
謝謝Alang 師兄回覆,因為昨晚半夜安裝測試,可能有遺漏也說不定。稍後再查找原因。
作者: bubblestar    時間: 2011-12-15 11:57

回復 7# ckleea


    OBi AA 英文現在的確好一些,GoogleTTS 英文稍遜,GoogleTTS 中文暫時很差,可能是我本身的問題,要再測試才能作比較。
作者: alang    時間: 2011-12-15 13:54

你可以先到這裡,聽聽它的語調,其實我也不喜歡它的語調,不過免費的中文 TTS 實在很難見,就湊合著用了。
http://translate.google.com/?hl=en&tab=mT
作者: bubblestar    時間: 2012-3-7 10:32

終於成功地聽到 Google TTS  的中文了,還不錯嘛,可以接受啊!
我把extension.conf 在Gnome 上以UTF-8 儲存,就可以聽到了。Default 好像是 western 8859 ISO之類的設置,所以一直不成功也沒有留意。而且之前多數以WinSCP 修改及儲存APL所寫的dial plan,所以....
作者: ckleea    時間: 2012-3-13 21:37

回復 11# bubblestar


    You may need to create a special .conf file to handle this. E.g. I use googletts.conf and use include => googletts.conf in the extensions.conf
作者: bubblestar    時間: 2012-3-13 21:58

回復 12# ckleea


   
我也是這樣想。就跟其它一些Macro 都想這樣做。
作者: ckleea    時間: 2012-3-13 22:06

回復 13# bubblestar


    You ought to do this for better file and scripts management
作者: bubblestar    時間: 2012-3-20 21:33

回復 14# ckleea


I have splitted extensions.conf into several configuration files for easy managements now.  It runs without problem.
作者: ckleea    時間: 2012-3-20 21:41

回復 15# bubblestar


    Glad to hear this. Please show yours file and how they interact.

For me, I take out the macro into a separate file
skype_trunk into another
incoming call to third, etc
作者: bubblestar    時間: 2012-3-20 22:07

回復 16# ckleea


Basically, I use the same logic as yours.  
I use include=> macro.conf and the like in my extensions.conf to make interaction.  All extenal resources like Google Voice, IPTEL etc. are extracted to other files for easy managmenet.  Now, the file size of extensions.conf is much smaller than before.
作者: ckleea    時間: 2012-3-20 22:08

回復 17# bubblestar

This is the trick. If you somehow need to manage via GUI, the risk will be much lesser.
作者: ckleea    時間: 2012-3-23 06:49

回復 17# bubblestar


An update:
http://zaf.github.com/asterisk-googletts/

The change logs are
  1. 2012-03-18 Lefteris Zafiris <zaf.000@gmail.com> - 0.6
  2.         Added speed factor option. Major rewrite of the cli app.
  3.         Many small fixes.

  4. 2012-01-18 Lefteris Zafiris <zaf.000@gmail.com> - 0.5
  5.         Removed the waiting for user input after the end of playback.
  6.         It is now advised to use Waitexten() in IVR to get that behavior.
  7.     Updated dialplan examples in README accordingly.
  8.         Replaced POSIX character class [:punct:] in text splitting regural
  9.         expressions. This fixes a misbehavior with some unicode strings.
  10.         Added sample cli app that does speech synthesis.

  11. 2011-12-20 Lefteris Zafiris <zaf.000@gmail.com> - 0.4
  12.         Added option for verbose debugging messages.
  13.         Fixed interrupt handling and cleaning of temp files.
  14.         Multiline and unicode input is now properly handled.
  15.         Code cleanup.

  16. 2011-12-13 Lefteris Zafiris <zaf.000@gmail.com> - 0.3
  17.         Fixed compatibility with asterisk 1.4 and older.
  18.         Changed the arguments of tempfile() for compatibility
  19.         with older perl versions.
  20.         Encode ampersands and plus sign to ascii values.
  21.         Added check for channel status before answering.
  22.         When 'intkey' is set the script waits for user input.

  23. 2011-12-01 Lefteris Zafiris <zaf.000@gmail.com> - 0.2
  24.         Working cache mechanism. Input sanitisation
  25.         and removal of dangerous characters. Better
  26.         error handling. Support for sampling rates
  27.         other than 8KHz. Cleanup mechanism for
  28.         temporary files.

  29. 2011-11-28 Lefteris Zafiris <zaf.000@gmail.com> - 0.1
  30.         Initial release 0.1
複製代碼

作者: bubblestar    時間: 2012-3-23 11:52

回復 19# ckleea


   
Thanks for the information.  Just updated already.  As before, the Installation instruction in Readme just tell that we only need to copy googletts.agi to our agi-bin directory and thats it.  Do you notice that there is another file called googletts-cli.pl in the source folder cli ?  Don't know what is all about and shall we need to put it somewhere in our Asterisk server as well.  Any ideas?
作者: bubblestar    時間: 2012-3-23 12:16

回復 20# bubblestar


   
Just disregard my question.  I made a mistake.  The content of googletts-cli.pl is already included in googletts.agi.   
作者: lawleo    時間: 2012-7-12 23:49

Raspberry 入手了多時,最近想試試架設自己的 asterisk, 請問TTS 能否由 asterisk 叫 mac 裡的 say 指令來達成的呢?
作者: ckleea    時間: 2012-7-13 06:12

回復 22# lawleo


    You mean to use Mac OSX voice function to achieve? I think you can but it is a matter of programming
作者: lawleo    時間: 2012-7-13 07:38

可行便好了, thx




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2