• <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>
     首頁 > 新聞 > 專家觀點(diǎn) >

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

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


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

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

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

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

      那么,能不能在 FreeSWITCH 里用呢?當(dāng)然,F(xiàn)reeSWITCH 通過 mod_shout 支持 mp3!

       默認(rèn)的 FreeSWITCH 中 mod_shout 是不編譯的,所以需要自己編譯。到源代碼目錄下,執(zhí)行

    make mod_shout-install

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

      在 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)

      太爽了。但中文的沒有成功,不知道為什么。

      當(dāng)然你也可以寫到 Dialplan 中,然后呼叫 1234 試一下 :D(為了排版方便,我換行了,記著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> 

    分享到: 收藏

    專題

    亚洲精品网站在线观看不卡无广告,国产a不卡片精品免费观看,欧美亚洲一区二区三区在线,国产一区二区三区日韩 大港区| 将乐县| 大姚县| 襄垣县| 吴忠市| 平果县| 从江县| 调兵山市| 伊吾县| 亳州市| 黑河市| 明水县| 马龙县| 东平县| 安福县| 闻喜县| 平果县| 青岛市| 财经| 梅河口市| 饶阳县| 天柱县| 汽车| 澎湖县| 开原市| 若羌县| 襄垣县| 屯门区| 将乐县| 博客| 北流市| 江达县| 蒙阴县| 凉山| 宜春市| 潢川县| 建瓯市| 开化县| 静海县| 元朗区| 南宁市| http://444 http://444 http://444 http://444 http://444 http://444