13.07.2015 Views

TESIS DOCTORAL - Robotics Lab - Universidad Carlos III de Madrid

TESIS DOCTORAL - Robotics Lab - Universidad Carlos III de Madrid

TESIS DOCTORAL - Robotics Lab - Universidad Carlos III de Madrid

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.5. How the robot interacts with the objects 16113 $<strong>de</strong>scribing = [$GARBAGE] $insults_compliments;VXML dialogs are based on forms which are filled according to the data provi<strong>de</strong>dby a user and processed by a grammar. In the mentioned application, just one form isnecessary. This dialog is shown in Listing 7.5. Initially, the form is i<strong>de</strong>ntified with thename insults_compliments (line 7) and several properties are <strong>de</strong>fined: the timeoutproperty specifies the <strong>de</strong>fault interval of silence allowed while waiting for a user inputbefore a noinput event is thrown. In this case, it is set to 30 seconds (line 9). Then, the<strong>de</strong>fault language and grammar are set (lines 12 and 13 of Listing 7.5). The prompt tagcontrols the output of the dialog: it can be a synthesized sentence, the configuration of aproperty, emitting an event, etc.The field element specifies an input item to be gathered from the user. In this dialog,this field is linked with the adjective attribute <strong>de</strong>fined in the insults_complimentsgrammar. Once adjective is filled by a user’s utterance, the action <strong>de</strong>fined by the co<strong>de</strong>in the filled element is executed (between lines 19 and 28). In this case, <strong>de</strong>pending onthe value of the adjective attribute, the user has paid Maggie a compliment or he hasoffen<strong>de</strong>d it. In the first case, the COMPLIMENTED event is sent and a happy sentence issaid (lines 21-22). In the last case, the OFFENDED event is emitted and a sad sentence issaid (lines 24-25).In the case that the field is not filled (the user does not speak, or his speech does notfit the grammar), after 30 seconds, the noinput element is executed (lines 30-33): this isnotified by the IGNORED event and the robot says "you ignore me".Co<strong>de</strong> listing 7.5: The VXML dialog used by the Interact action.1 2 7 8109 11 12 #setLanguage$en13 #setGrammar$insults_compliments.gram14 15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!