我花了最近3周的時間試圖使其發揮作用。我想使用github上的googletts.agi腳本從星號進行語音撥號。它的工作原理,但問題是googletts有時會返回一個單詞而不是數字在像「話語」變量18004633339可能會回來作爲「180046樹樹樹奈特」或「1800力6棵樹樹339」等將單詞轉換爲Asterisk dialplan中的數字
https://github.com/zaf/asterisk-googletts https://github.com/zaf/asterisk-speech-recog
下面的鏈接有一個腳本,轉換字號碼
http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php
這是我的撥號方案
exten => 2255,1,Answer()
exten => 2255,n,Wait(1)
;exten => 2255,n,flite("Say the number you wish to call. Then press the pound key.")
exten => 2255,n,Espeak("Say the number you wish to call. Then press the pound key.")
exten => 2255,n(record),agi(speech-recog.agi,en-US)
exten => 2255,n,Noop(= Script returned: ${status} , ${id} , ${confidence}, ${utterance} =)
exten => 2256,6,Set(NUM2CALL=${utterance})
需要編寫代碼在這裏,將採取$ {話語}或NUM2CALL變量,並修復它是否有它的話,以適當的數量,其星號可以撥打
exten => 2255,n,SayDigits("${NUM2CALL2}")
exten => 2255,n,Background(vm-star-cancel)
exten => 2255,n,Background(vm-tocallnum)
exten => 2255,n,Read(PROCEED,beep,1)
exten => 2255,n,GotoIf($["foo${PROCEED}" = "foo1"]?15:16)
exten => 2255,15,Goto(outbound-allroutes,${NUM2CALL2},1)
exten => 2255,16,hangup
我想如果我可以添加到字典數組中,我最終將擁有一個非常準確的語音撥號程序。我花了4天時間測試tropo ASR,它對於單個數字非常準確,但具有多位數字的準確性快速下降。預先感謝您的幫助。我將在github上發佈完成的腳本作爲項目。我還用pocketphinx與TIDIGITS語法和模型一起嘗試過,但這比提供類似問題的pocketsphinx默認字典更糟糕。
非常感謝。取得了一些進展,但變量不會去數組是缺少的東西。 – user1733491
非常感謝。取得了一些進展,但變量不會去數組是缺少的東西。這裏是日誌。 [鏈接](https://docs.google.com/document/pub?id=1KmHPi41pGdhSoHLmAmJwNQNsPWsUucBZMpZD04_ILgc) – user1733491
如何設置變量?我在日誌中看到$ num,而不是$ num的期望值。 – pce