Click here to register.

Dialog Managers

Flat
Command Line Dialog Manager
User: pomprocker
Date: 2/2/2010 9:04 pm
Views: 8097
Rating: 23

Can someone recommend a good CLI based dialog manager to run on linux...Perl or shell script (or php)

 

I am running Julius on a server with no monitor. The server is being used as a home automation device (think HAL)

 

I need to be able to echo the output or send it to festival, etc...

--- (Edited on 2/2/2010 9:04 pm [GMT-0600] by pomprocker) ---

Re: Command Line Dialog Manager
User: kmaclean
Date: 2/3/2010 1:41 pm
Views: 198
Rating: 22

>Can someone recommend a good CLI based dialog manager to run on

>linux...Perl or shell script (or php)

see FAQ: What is a Dialog Manager?

--- (Edited on 2/3/2010 2:41 pm [GMT-0500] by kmaclean) ---

Re: Command Line Dialog Manager
User: pomprocker
Date: 2/3/2010 5:42 pm
Views: 311
Rating: 22

Thanks, I've seen those. I was wondering if there was a complete package not just code bits for single purpose use.

--- (Edited on 2/3/2010 5:42 pm [GMT-0600] by pomprocker) ---

Re: Command Line Dialog Manager
User: waryishe
Date: 4/9/2010 12:06 am
Views: 191
Rating: 22

This may be too late, but I have a simple bash script that should do what you want.  All it does is listen for sentences from julius and then attempts to run a script that matches that sentence. If it doesn't find that script it will then try to run a script of the same name but with one less word.  if found, it then runs that script with the extra word as an argument.  Example.  Julius recognizes "Hello World".  My script will try to find "Hello World" in the ./scripts directory.  If it doesn't find it, it then checks for just "Hello". If it finds that it will then call ./scripts/"Hello" with "World" as an argument.  It works pretty well for me.  I use it to play songs with mpd or check email on my HTPC.  Let me know if your interested.

   

--- (Edited on 4/9/2010 12:19 am [GMT-0500] by waryishe) ---

Re: Command Line Dialog Manager
User: pomprocker
Date: 4/9/2010 12:24 am
Views: 265
Rating: 23

Sure send it to me!

--- (Edited on 4/9/2010 12:24 am [GMT-0500] by pomprocker) ---

Re: Command Line Dialog Manager
User: cmisip
Date: 4/17/2010 10:23 pm
Views: 173
Rating: 23

Please send me the script as well or a link where I can download it.

 

Thanks

Chri

--- (Edited on 4/17/2010 10:23 pm [GMT-0500] by cmisip) ---

Re: Command Line Dialog Manager
User: kmaclean
Date: 4/19/2010 12:06 pm
Views: 208
Rating: 24

similar to this?: http://bitbucket.org/ptg/vox/src

Description from the site:

A wrapper program around julius and julius-voxforge that simplifies their use. Part of a voice interface for my computers.

--- (Edited on 4/19/2010 1:06 pm [GMT-0400] by kmaclean) ---

Re: Command Line Dialog Manager
User: cmisip
Date: 4/22/2010 12:11 pm
Views: 349
Rating: 19

Thanks for the link. However, I couldn't get it to work.  What I am interested in is how to get the recognized output from julius into a bash variable.  The rest of the script is pretty easy.  For now, I am using a modified command.py to call an external bash script that actually runs things.  It would be nice to do away with command.py and go with bash only. 

Thanks

Chris

--- (Edited on 4/22/2010 12:11 pm [GMT-0500] by cmisip) ---

Re: Command Line Dialog Manager
User: waryishe
Date: 9/4/2010 11:11 pm
Views: 2889
Rating: 21

Sorry I didn't get around to it.  But here you go. It's dirty, but it works.  Just pipe the output to the script.  ./julius -C config | script

 

#!/bin/bash

li=()
li2=()

IFS=$'\n'
IFS="$IFS "
while [ true ] ; do
read -a li
echo ${li[@]} #>> log$1
if [ "${li[0]}" = "sentence1:" ]; then
          echo "${li[@]}"
          unset li2
          for name in ${li[@]//_/ } 
                 do 
                 if [ "$name" != "sentence1:" ] && [ "$name" != "<s>" ] && [ "$name" != "</s>" ] && [ "$name" != "" ]; then
                      li2[${#li2[@]}]=$name 
                 fi
           done;
elif [ "${li[0]}" == "Error:" ]; then
#echo "${li[@]}"
           echo "${li[@]}"
elif [ "${li[0]}" == "cmscore1:" ]; then
           go=1
           unset score
           echo "${li[@]}"
           li[0]=""
           li[1]=""
           li[$((${#li[@]}-1))]=""
           for i in ${li[@]}; do
                  if [ -n "$i" ] && [ "$i" != "cmscore1:" ]; then
                          score[${#score[@]}]="${i//./}"
                  fi
           done
           tp=(${li2[@]})
           score2=0
           for ((i=${#li2[@]};i>0;i-=1)); do
                 yup="${tp[@]}"
                 if [ -e "./scripts/$yup" ]; then
                            for ((a=0;a<${#tp[@]};a+=1)); do
                                        unset li2[a]
                            done
                            if [ -e "./scripts/$yup.score" ]; then
                                       score2=(`cat "./scripts/$yup.score"`)
                                       score2=(${score2[@]//./})
                                       for ((t=0;t<${#score2[@]};t++));          do
                                                if [ "${score2[t]}" -gt "${score[t]}" ]; then
                                                       go=0
                                                fi
                                        done
                                       echo "$score2 $score"
                            fi
                            if [ "$go" == "1" ] ; then  
                                       echo "!./scripts/$yup! ${li2[@]}"
                                       "./scripts/$yup" ${li2[@]} &
                            else
                                       ./scripts/failure "$yup"
                            fi
                            i=0
                            else
                                    unset tp[i-1]
                            fi
           done
fi

done

--- (Edited on 9/4/2010 11:11 pm [GMT-0500] by waryishe) ---

--- (Edited on 9/4/2010 11:12 pm [GMT-0500] by waryishe) ---

Re: Command Line Dialog Manager
User: kmaclean
Date: 9/9/2010 10:24 pm
Views: 1664
Rating: 21

Hi  waryishe,

Thanks for the code,

Ken

--- (Edited on 9/9/2010 11:24 pm [GMT-0400] by kmaclean) ---

PreviousNext