Skip to content

Commit

Permalink
julius_ros/scripts/run_julius.sh: more information on how to install …
Browse files Browse the repository at this point in the history
…julius and grammer/dictation kit
  • Loading branch information
k-okada committed Jan 9, 2025
1 parent 491f2a9 commit 42e80a9
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion julius_ros/scripts/run_julius.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,24 @@ for OPT in "$@"; do
done

if [ "$ROS_DISTRO" = "debian" ]; then
print_error() {
local message="$1"
echo -e "\e[1m\e[31m${message}\e[0m" >&2
}
if ! test -e $(rospack find julius)/conf -a -e $(rospack find julius)/model; then
echo "julius need install grammer and dictation kit, run 'rosrun julius download_julius_data.sh'"
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ---- julius need install grammer and dictation kit, run 'sudo PATH=\$PATH LD_LIBRARY_PATH=\$LD_LIBRARY_PATH ROS_PACKAGE_PATH=\$ROS_PACKAGE_PATH $(rospack find julius)/download_julius_data.sh'"
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ----"
exit 1
fi
if ! command -v julius >/dev/null 2>&1; then
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ---- executable file 'julius' not found, run 'sudo apt install julius'"
print_error "[${BASH_SOURCE[0]}] ----"
print_error "[${BASH_SOURCE[0]}] ----"
exit 1
fi
exec julius $ARGS
Expand Down

0 comments on commit 42e80a9

Please sign in to comment.