• <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