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. C++语言笔记系列之十二——C++的继承

    C++的继承 1.继承方式 public(公有继承) 派生类中的成员能够訪问基类的public成员和protected成员,但不能訪问基类的private成员. 派生类的对象仅仅能訪问基类的publi ...

  2. json.net 比jsonIgnore 更好的方法 修改源码

    关于 JsonIgnore  问题, EF T4 模板 中 存在主外键关系 namespace WindowsFormsApplication1{    using System;    using ...

  3. JavaScript两种方法来定义一个函数

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  4. Vim实用小技巧

    Vim实用小技巧 一些网络上质量较高的Vim资料 从我07年接触Vim以来,已经过去了8个年头,期间看过很多的Vim文章,我自己觉得非常不错,而且创作时间也比较近的文章有如下这些. Vim入门 目前为 ...

  5. Postman (Chrome插件)

    接口测试从未如此简单 - Postman (Chrome插件) Posted on 2015-01-16 15:50 WadeXu 阅读(468) 评论(7) 编辑 收藏 接口测试从未如此简单 - P ...

  6. Kafka集群在空载情况下Cpu消耗比较高的问题

    线上kafka与storm的空载情况下负载都比较高, kafka达到122%, storm平均负载达到, 20%,  当前是通过Ambari下管理kafka的, a. 先停止s5的kafka进程.b. ...

  7. C#网络编程系列(两)它Socket同步TCPserver

    声明原文 笔者:竹zz  本文地址http://blog.csdn.net/zhujunxxxxx/article/details/44258719 转载请注明出处 文章系列文件夹 C#网络编程系列文 ...

  8. 处理动态SQL语句的参数

    原文:处理动态SQL语句的参数 经常对SQL进行开发,写动态的SQL语句,是少之不了的,但是在使用动态语句中,常是因为有动态的参数的出现.参考下面代码示例: 正因为有了标记1的动态条件代码,而让SQL ...

  9. PHP中判断输入验证码是否一致

    首先用session将随机生成的验证码的值传到页面,然后获取当前文本框中输入的值  进行对比:代码如下: 生成的随机数,把它传到session里面 <? session_start();   必 ...

  10. springmvc的一些记录

    1.springmvc基本配置 2.springmvc+hibernate4配置 3.springmvc+hibernate4+freemarker配置 4.springmvc+hibernate4+ ...