stardic

sudo apt-get install stardict


install dict:

http://kdr2.com/resource/stardict.html

/usr/share/stardict/dic

安装语音引擎

  • /usr/share/WyabdcRealPeopleTTS
  • /usr/share/OtdRealPeopleTTS

安装mpg321用于播放mp3格式的单词语音文件

      sudo apt-get install mpg321

脚本 /data/depot/utils/shell/myespeak 

    修改脚本的权限 chmod 755 /data/depot/utils/shell/myespeak


#!/bin/sh  
stardict_path="/win/c/edward/dic_sound"  

until [ -z "$1" ]  
do  
lowerword=`echo "$1" | tr A-Z a-z`  
firstchar=`expr substr "$lowerword" 1 1`  
case $firstchar in  
[0-9]) firstchar=0;;  
esac  

mp3_file="$stardict_path/$firstchar/${1}.mp3"  
if [ -e "$mp3_file" ]; then         
mpg321 "$mp3_file"  
else  
espeak "$1"  
fi  
shift  
done  
exit 0  


设置stardict


stardic_第1张图片

6. 重新启动词典


stardic_第2张图片







你可能感兴趣的:(stardic)