• <strike id="fdgpu"><input id="fdgpu"></input></strike>
    <label id="fdgpu"></label>
    <s id="fdgpu"><code id="fdgpu"></code></s>

  • <label id="fdgpu"></label>
  • <span id="fdgpu"><u id="fdgpu"></u></span>

    <s id="fdgpu"><sub id="fdgpu"></sub></s>

    《FreeSWITCH: VoIP實(shí)戰》:使用 google translate 進(jìn)行文本語(yǔ)音轉換

    2012-08-30 14:45:18   作者:杜金房    來(lái)源:FreeSWITCH    評論:0  點(diǎn)擊:


      今天,偶然發(fā)現 google translate 一個(gè)很酷的功能,TTS。

      在瀏覽器中輸入 http://translate.google.com/translate_tts
    q=hello+and+welcome+to+w+w+w+dot+dujinfang+dot+com&tl=en 然后立即就可以播放聲音。

      又試了一下這個(gè),呵呵 http://translate.google.com/translate_tts?q=歡迎光臨七哥的博客&tl=zh ,也好用。

      我在Mac上分別用 Safari, Chrome 和 FireFox 都測試通過(guò)。

      那么,能不能在 FreeSWITCH 里用呢?當然,FreeSWITCH 通過(guò) mod_shout 支持 mp3!

       默認的 FreeSWITCH 中 mod_shout 是不編譯的,所以需要自己編譯。到源代碼目錄下,執行

    make mod_shout-install

      就裝好了(當然,前提是你已經(jīng)用源代碼安裝了 FreeSWTICH 的情況,參見(jiàn) 電子書(shū)第二章)。

      在 FreeSWITCH 命令行上裝入模塊:

    load mod_shout

    測試一下:

    originate user/1000 &playback(shout://translate.google.com/translate_tts?q=hello+and+welcome+to+www+dot+dujinfang+dot+com&tl=en)

      太爽了。但中文的沒(méi)有成功,不知道為什么。

      當然你也可以寫(xiě)到 Dialplan 中,然后呼叫 1234 試一下 :D(為了排版方便,我換行了,記著(zhù)shout 那一行別斷行

    <extension name="Free_Google_Text_To_Speech">
         <condition field="destination_number" expression="^1234$">
          <action application="answer" data=""/>
          <action application="playback"
                       data="shout://translate.google.com/translate_tts?
                       q=hello+and+welcome+to+www+dot+dujinfang+dot+com&tl=en"/>
         </condition>
    </extension> 

    分享到: 收藏

    專(zhuān)題

    亚洲精品网站在线观看不卡无广告,国产a不卡片精品免费观看,欧美亚洲一区二区三区在线,国产一区二区三区日韩 渑池县| 延安市| 翁源县| 顺义区| 呈贡县| 应城市| 桃园县| 林州市| 察哈| 建德市| 岑巩县| 大关县| 比如县| 五家渠市| 汾西县| 阳原县| 永靖县| 博兴县| 榆树市| 尼勒克县| 蕲春县| 天水市| 阿克| 博白县| 长治县| 梁平县| 长子县| 江北区| 六枝特区| 徐水县| 夏津县| 宁津县| 新宁县| 舟曲县| 泾川县| 宣威市| 凯里市| 天等县| 古浪县| 雷州市| 怀远县| http://444 http://444 http://444 http://444 http://444 http://444