Through trial and error to use google tts instead of flite or cepstral, i have found a way to have the google tts engine read the recording back to you, below you will find the dial plan, and file. I hope to be able to find a way to do the same using weather under ground instead of yahoo, and help would be greatly appreciated.
;# // BEGIN Weather by ZIP
exten => 947,1,Answer
exten => 947,2,Wait(1)
exten => 947,3,Set(TIMEOUT(digit)=7)
exten => 947,4,Set(TIMEOUT(response)=10)
;exten => 947,5,Flite("At the beep enter the five digit zip code for the weather report you wish to retrieve.")
exten => 947,5,agi(googletts.agi,"At the beep enter the five digit zip code for the weather report you wish to retrieve.")
exten => 947,6,Read(ZIPCODE,beep,5)
;exten => 947,7,Flite("Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,7,agi(googletts.agi,"Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,8,AGI(nv-weather-yahoo.php,${ZIPCODE})
;exten => 947,9,NoOp(Wave file: ${TMPWAVE})
;exten => 947,10,Playback(${TMPWAVE})
;exten => 947,10,Playback(tts/FileName)
;exten => 947,11,Hangup
exten => 947,n,NoOp(Forecast: ${WEATHER})
exten => 947,n,agi(googletts.agi,"${WEATHER}",en)
exten => 947,n,Hangup
;# // END Weather by ZIP
Change the txt extention from txt to php. remember to also change the permissions to 0775
I hope to find a way to get weather underground working, or receive some help on it.
;# // BEGIN Weather by ZIP
exten => 947,1,Answer
exten => 947,2,Wait(1)
exten => 947,3,Set(TIMEOUT(digit)=7)
exten => 947,4,Set(TIMEOUT(response)=10)
;exten => 947,5,Flite("At the beep enter the five digit zip code for the weather report you wish to retrieve.")
exten => 947,5,agi(googletts.agi,"At the beep enter the five digit zip code for the weather report you wish to retrieve.")
exten => 947,6,Read(ZIPCODE,beep,5)
;exten => 947,7,Flite("Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,7,agi(googletts.agi,"Please hold a moment while we contact the National Weather Service for your report.")
exten => 947,8,AGI(nv-weather-yahoo.php,${ZIPCODE})
;exten => 947,9,NoOp(Wave file: ${TMPWAVE})
;exten => 947,10,Playback(${TMPWAVE})
;exten => 947,10,Playback(tts/FileName)
;exten => 947,11,Hangup
exten => 947,n,NoOp(Forecast: ${WEATHER})
exten => 947,n,agi(googletts.agi,"${WEATHER}",en)
exten => 947,n,Hangup
;# // END Weather by ZIP
Change the txt extention from txt to php. remember to also change the permissions to 0775
I hope to find a way to get weather underground working, or receive some help on it.