adhearsion / adhearsion-asr

Adds speech recognition support to Adhearsion as a plugin.
http://adhearsion.com
MIT License
6 stars 6 forks source link

#menu always matches the first option #4

Closed JustinAiken closed 10 years ago

JustinAiken commented 11 years ago

Given this simple controller:

class DialPlan < Adhearsion::CallController
  include AdhearsionASR::ControllerMethods

  def run
    answer
    menu 'welcome', :timeout => 8.seconds, :tries => 3 do
      match '1' do
        logger.fatal "you pushed 1"
      end
      match 5 do
        logger.fatal "you pushed 5"
      end
      match('7') { logger.fatal "you pushed 7" }
      match('9') { logger.fatal "you pushed 9" }
    end
    hangup
  end
end

No matter which of the 4 options you push, it acts like you pushed the first.

This is because in here, utterance contains the correct key, but both interpretation and confidence are blank.

So the resulting AdhearsionASR::Result has the correct option as utterance, but handling the match will always result in @matchers[0] being dispatched.

TRACE LOG

benlangfeld commented 11 years ago

Ai damnit. Two things:

  1. mod_rayo appears not to support SISR tags (but only literals), which are required for the new menu implementation. I should figure out the correct failure mode for this, but mod_rayo needs to implement them like this. Sorry @crienzo :(
  2. The confidence not being pulled out of the NLSML is odd, I'll have to check on this.
benlangfeld commented 11 years ago

So, the reason the confidence is being missed is that mod_rayo is including it in the <input/> tag of the NLSML result, rather than the <interpretation/> as Punchblock does and looks for. Both are allowed by the spec and the semantics of which should be used are undefined. I need to think about how we should use these in our simplified representation some more.

JustinAiken commented 10 years ago

Hmm, this must have been fixed at some point, since I haven't had an issue with it lately, but I can't remember which ASR/PB/AHN/Rayo commit fixed it :wink: