Skip to content

Commit

Permalink
The ask method will now default to the configured voice if none is pr…
Browse files Browse the repository at this point in the history
…ovided in the options passed over AGI. And fixed the recognizer to actually default.
  • Loading branch information
jsgoecke committed Oct 7, 2010
1 parent d8f6c6c commit 44fea5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tropo-agitate.rb
Expand Up @@ -106,7 +106,8 @@ def answer
#
# @return [String] the response in AGI raw form
def ask(options={})
options[:args][:recognizer] = @tropo_agi_config['tropo']['recognizer'] if options[:args][:recognizer].nil?
options[:args][:recognizer] = @tropo_agi_config['tropo']['recognizer'] if options[:args]['recognizer'].nil?
options[:args][:voice] = @tropo_agi_config['tropo']['voice'] if options[:args]['voice'].nil?
response = @current_call.ask options[:args]['prompt'], options[:args]
log "=====> #{response.value} <===="
if response.value == 'NO_SPEECH' || response.value == 'NO_MATCH'
Expand Down

0 comments on commit 44fea5f

Please sign in to comment.