Permalink
Browse files

More README updates

  • Loading branch information...
1 parent a862a25 commit 58a760cb7f096fcfe9a66028154d4bb6be177f9d @zaf committed Jan 18, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −1 README
  2. +1 −1 wolfram/README
View
@@ -61,14 +61,19 @@ exten => 1235,1,Answer()
exten => 1235,n,agi(googletts.agi,"Say something in English, when done press the pound key.",en)
exten => 1235,n(record),agi(speech-recog.agi,en-US)
exten => 1235,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
+
+;Check return status:
exten => 1235,n,GotoIf($["${status}" = "0"]?success:fail)
+;Check the probability of a successful recognition:
exten => 1235,n(success),GotoIf($["${confidence}" > "0.8"]?playback:retry)
+;Playback the text
exten => 1235,n(playback),agi(googletts.agi,"The text you just said was...",en)
exten => 1235,n,agi(googletts.agi,"${utterance}",en)
exten => 1235,n,goto(end)
+;Retry in case speech recognition wasn't successful:
exten => 1235,n(retry),agi(googletts.agi,"Can you please repeat more clearly?",en)
exten => 1235,n,goto(record)
@@ -86,7 +91,7 @@ exten => 1236,n(success),goto(${utterance},1)
exten => 1236,n(retry),agi(googletts.agi,"Can you please repeat?",en)
exten => 1236,n,goto(record)
-Under the folder wolfram you can find a sample agi script that in combination with speech-recog.agi
+Under the folder wolfram you can find a sample agi script that in combination with speech-recog.agi
sends queries to WolframAlpha and returs the answers as a dialplan variable. See wolfram/README for
details and dialplan examples.
View
@@ -42,7 +42,7 @@ exten => 1237,1,Answer()
exten => 1237,n,agi(googletts.agi,"What is your question?",en)
;;Record the question and render it to text:
exten => 1237,n(record),agi(speech-recog.agi,en-US)
-exten => 1237,n,GotoIf($[$["${status}" = "0"] & $["${confidence}" > "0.8"]]?success:retry
+exten => 1237,n,GotoIf($[$["${status}" = "0"] & $["${confidence}" > "0.8"]]?success:retry)
;;Submit the question to wolfram:
exten => 1237,n(success),agi(wolfram.agi,"${utterance}")

0 comments on commit 58a760c

Please sign in to comment.