1.  安装stardict,需要的词典和语音词库(我用的是网上下来的14w词汇的发音库)

2.  安装语音引擎

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

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

      sudo apt-get install mpg321

4. 脚本 /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

 5 设置stardict


Ubuntu 12.04下stardict发音的设置

6. 重新启动词典


Ubuntu 12.04下stardict发音的设置

相关文章:

  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-06-29
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
  • 2022-12-23
相关资源
相似解决方案