VoxForge
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) ---
>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) ---
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) ---
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) ---
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) ---
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) ---