Was this page helpful?

多國 TTS - Microsoft TTS

    Microsoft TTS Service

    AGI 官網:http://zaf.github.com/asterisk-mstts/

    系統需求:

    • perl
    • perl-libwww
    • sox
    • API Key (向 Microsoft 免費申請)
    • 網際網路
       

    合成語音的展示:如下附件區(MP3)。

    線上展示:https://www.microsoft.com/cognitive-...-us/speech-api

    安裝設定

    1. 下載 AGI
    2. 修改 AGI 輸入 API ID
    3. 編輯 dialplan

    下載 AGI

    cd /usr/src
    wget --no-check-certificate https://github.com/downloads/zaf/asterisk-mstts/asterisk-mstts-0.1.tar.gz
    tar xzf asterisk-mstts-0.1.tar.gz
    cd asterisk-mstts-0.1
    cp mstts.agi /var/lib/asterisk/agi-bin
    chown asterisk:asterisk /var/lib/asterisk/agi-bin/mstts.agi
    chmod 0755 /var/lib/asterisk/agi-bin/mstts.agi

    修改 mstts.agi

    ...
    # ----------------------------- #
    #   User defined parameters:    #
    # ----------------------------- #
    #  App ID from MS               #
    my $appid   = "HereisyourAPPID";
    
    # Default language              #
    my $lang = "en";
    ...
    

    編輯 dialplan

    ;MsTTS Demo
    [demo-mstts]
    exten => s,1,Answer()
     same => n,Wait(1)
     ;;Speak English:
     same => n,agi(mstts.agi,"Welcome to OSSLab, This is a simple text to speech synthesis test in english.",en)
     ;;Speak Mandarin of Taiwan
     same => n,agi(mstts.agi,"歡迎來到,開放軟體實驗室,這是一個簡單的文字轉語音合成測試。",zh-tw)
     ;;Speak Mandarin of China
     same => n,agi(mstts.agi,"欢迎来到,开放软体实验室,这是一个简单的文字转语音合成测试。",zh-cn)
     same => n,Hangup
    

    用法

    agi(mstts.agi,text,[language],[intkey]): This will invoke the MS Translator TTS engine, render the text string to speech and play it back to the user. If 'intkey' is set the script will wait for user input. Any given interrupt keys will cause the playback to immediately terminate and the dialplan to proceed to the matching extension (for use in IVR).

    The script contacts MS TTS service in order to get the voice data which then stores in a local cache (by default /tmp/) for future use. Parameters like default language, enabling or disabling caching and cache dir can be set up by editing the script.

    可支援的語言

    ca,     ca-es,    da,    da-dk,
    de,     de-de,    en,    en-au,
    en-ca,  en-gb,    en-in, en-us,
    es,     es-es,    es-mx, fi,
    fi-fi,  fr,       fr-ca, fr-fr,
    it,     it-it,    ja,    ja-jp,
    ko,     ko-kr,    nb-no, nl,
    nl-nl,  no,       pl,    pl-pl,
    pt,     pt-br,    pt-pt, ru,
    ru-ru,  sv,       sv-se, zh-chs,
    zh-cht, zh-cn,    zh-hk, zh-tw

    Was this page helpful?
    標籤 (Edit tags)
    • No tags

    文件 1

    文件大小日期附件上傳者 
     demo-mstts.mp3
    無描述
    58.62 KB09:27, 24 Mar 2012alang動作
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core