3
Z&                 @   s   d dl T G dd deZdS )    )*c                   s4   e Zd Z fddZG dd deZdd Z  ZS )Speech1c                s   t  jddd d S )NT)speechspeech_debug)super__init__)self)	__class__ ./Speech1.pyr      s    zSpeech1.__init__c                   s   e Zd Z fddZ  ZS )zSpeech1.Heardc                s(   |j j d }d| | _t j| d S )N   zI will grab %s)resultgroupstextr   start)r   eventobj)r	   r
   r   r      s    
zSpeech1.Heard.start)__name__
__module____qualname__r   __classcell__r
   r
   )r	   r   Heard   s   r   c             C   sf   t djdj| }| j jdj| }tdjd}|j|j| t jd}|j|j| | S )z
          loop: Say('what now')
          loop =Hear('cozmo ?(please|) grab (cube1|cube2|cube3)')=> self.Heard() =C=> loop
        zwhat nowloopheard1z)cozmo ?(please|) grab (cube1|cube2|cube3)
heartrans1completiontrans1)Sayset_name
set_parentr   	HearTransadd_sourcesadd_destinationsCompletionTrans)r   r   r   r   r   r
   r
   r   setup   s    zSpeech1.setup)r   r   r   r   r   r   r#   r   r
   r
   )r	   r   r      s   r   N)	cozmo_fsmStateMachineProgramr   r
   r
   r
   r   <module>   s   