on a brand new linux PC, e.g. ubuntu 14.04 amd64

To hear voice

sudo apt-get install festival -y

then try to hear some thing from your PC

echo "I am your computer." | festival --tts
# or
echo "I am your computer." | festival --tts --pipe

you will hear something out.

Now replace the voice files, a better one.

Tutorial from https://www.youtube.com/watch?v=4eJTDpAeBSk

To replace voice

commands including:

apt-get install festival
sudo su
cd /usr/share/festival/voices/english/
wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_clb_arctic-0.95-release.tar.bz2
tar jxf cmu_us_clb_arctic-0.95-release.tar.bz2
ln -s cmu_us_clb_arctic cmu_us_clb_arctic_clunits
echo "(set! voice_default 'voice_cmu_us_clb_arctic_clunits)" >> /etc/festival.scm

Then go to command line

$~ festival
festival> (SayText "Hello world")

You will hear something different, a female voice would come out.

To save wave files

echo "Hello I am Lily. " > /tmp/one.txt
text2wave < /tmp/one.txt > /tmp/voice.wav
mplayer /tmp/voice.wav

Your voice file has been saved.

Happy hacking!

* Updated in the morning 09:17 A.M.

To hear selected text in your PC

Now I am going to teach you how to make it in ubuntu 14.04 AMD64

sudo apt-get install xsel -y
sudo su
cat >> /usr/local/bin/xread <<EOF
# Then input
> #!/bin/bash
> xsel | festival --tts --pipe
> EOF

Then create a keyboard shortcut in your PC. KDE/Gnome/Xfce4/Cinnamon/Mate/LXDE or any kind of desktop environment which is based on Xorg services.

In this case, I map the keys <Meta> + <r> in ubuntu 14.04 AMD64. Actually the <Meta> key is the *windows* key which is useless in Linux. Here I just took good use of that. This shortcut will trigger the script "/usr/local/bin/xread" which uses tools "xsel" and "festival".

Use your cursor and select any text area in your PC, browser, console, text editor or anywhere and then press keys <Meta> + <r>. Then you will hear the text voice.

Happy hacking!

reading words in your computer and changing to female voice, linux festival text2wave saving wav files的更多相关文章

  1. 14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小

    14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小 改变 InnoDB ...

  2. 14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量

    14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量 改变InnoDB redo ...

  3. My Reading List - Machine Learning && Computer Vision

    本博客汇总了个人在学习过程中所看过的一些论文.代码.资料以及常用的资源与网站,为了便于记录自身的学习过程,将其整理于博客之中. Machine Learning (1) Machine Learnin ...

  4. Changing the Color of Linux ls Command 改变Linux的ls命令显示的颜色

    Linux command ls basically use the file /etc/DIR_COLORS or /etc/DIR_COLORS.xterm to define the color ...

  5. [学习笔记] CS131 Computer Vision: Foundations and Applications:Lecture 4 像素和滤波器

    Background reading: Forsyth and Ponce, Computer Vision Chapter 7 Image sampling and quantization Typ ...

  6. What every computer science major should know 每一个计算机科学专业的毕业生都应该都知道的

    Given the expansive growth in the field, it's become challenging to discern what belongs in a modern ...

  7. 深度神经网络如何看待你,论自拍What a Deep Neural Network thinks about your #selfie

    Convolutional Neural Networks are great: they recognize things, places and people in your personal p ...

  8. the Linux Kernel: Traffic Control, Shaping and QoS

    −Table of Contents Journey to the Center of the Linux Kernel: Traffic Control, Shaping and QoS 1 Int ...

  9. oracle 数据库安装环境,需要大汇总

     Oracle Database (RDBMS) on Unix AIX,HP-UX,Linux,Mac OS X,Solaris,Tru64 Unix Operating Systems Ins ...

随机推荐

  1. Google maps API开发

    原文:Google maps API开发 Google maps API开发(一) 最近做一个小东西用到google map,突击了一下,收获不小,把自己学习的一些小例子记录下来吧 一.加载Googl ...

  2. sql分页查询公式

    分页查询公式: select top PageRow(每页显示的数据行数) from 表名 where 主键  not in(select top PageRow*(当前页数-1) 主键  from ...

  3. C++ Primer 学习笔记_63_重载运算符和转换 --转换和类类型【上】

    重载运算符和转换 --转换与类类型[上] 引言: 在前面我们提到过:能够用一个实參调用的位 unsignedchar 相同范围的值,即:0到255. 这个类能够捕获下溢和上溢错误,因此使用起来比内置u ...

  4. 快速构建Windows 8风格应用33-构建锁屏提醒

    原文:快速构建Windows 8风格应用33-构建锁屏提醒 引言 Windows Phone(8&7.5)和Windows 8引入了锁屏概念,其实做过Windows Phone 7.5应用开发 ...

  5. Win8.1系统下配置搭建IIS8.5+PHP5.5.4运行环境

    原文 Win8.1系统下配置搭建IIS8.5+PHP5.5.4运行环境 很多人喜欢用linux搭建php网页语言运行环境,但由于linux高度自定义化,经常需要root运行命令,略显高端,相对应的微软 ...

  6. HTML5----input-datalist输入框自己主动提示功能

    效果图: <label for="word_name">字母 : </label> <input id="word_name" n ...

  7. openwrt补丁

    http://wiki.openwrt.org/doc/devel/patches 中文文档:http://andelf.diandian.com/post/2013-05-22/4005067737 ...

  8. 《Visual Studio Magazine》2013年读者选择奖—界面框架类

    好消息!2013 Visual Studio Magazine读者选择奖已经正式揭晓了!据了解,截至今年此奖项已经评选了21次,非常值得.NET开发人员信赖和参考.此次评选共有400多个产品角逐28个 ...

  9. [WebGL入门]十六,绘制多个模型

    注意:文章翻译http://wgld.org/.原作者杉本雅広(doxas),文章中假设有我的额外说明,我会加上[lufy:],另外.鄙人webgl研究还不够深入.一些专业词语.假设翻译有误.欢迎大家 ...

  10. ubuntu14.04无法播放更新后完善的解决方案

    -------------------------------------- 前几天的ubuntu升级14.04该,(Kubuntu版本)时间去更新一下系统..结果没有声音了,网络视频也看不了了.百度 ...