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. Linux内核源代码情景分析-中断半

    一.中断初始化 1.中断向量表IDT初始化 void __init init_IRQ(void) { int i; #ifndef CONFIG_X86_VISWS_APIC init_ISA_irq ...

  2. style中position的属性值具体解释

    Position的英文原意是指位置.职位.状态.也有安置的意思.在CSS布局中,Position发挥着非常关键的数据,非常多容器的定位是用Position来完毕. Position属性有四个可选值,它 ...

  3. TDD(测试驱动开发)学习一:初识TDD

    首先说一下名词解释,TDD,英文名称Test-Driven Development,中文名称测试驱动开发,简单的断下句“测试/驱动/开发”,简单的理解一下,就是测试驱动着开发,大白话就是说用一边测试一 ...

  4. Linux学习笔记——怎样在交叉编译时使用共享库

    0.前言     在较为复杂的项目中会利用到交叉编译得到的共享库(*.so文件).在这样的情况下便会产生下面疑问,比如:     [1]交叉编译时的共享库是否须要放置于目标板中,假设须要放置在哪个文件 ...

  5. Android基础笔记(十)- 帧动画、补间动画具体解释、对话框

    帧动画 补间动画Tween Animation 对话框以及面试中的注意点 帧动画 帧动画非常easy,我们首先看一下Google官方解释This is a traditional animation ...

  6. 6. SQL Server数据库监控 - 如何告警

    原文:6. SQL Server数据库监控 - 如何告警 常用的告警方式大致有:短信.邮件.应用程序 (beep提示,图标提示,升窗提示等),可是不能一直坐在电脑前看着应用程序,或者用脚本部署监控,根 ...

  7. jQuery Easy UI LinkButton(button)包

    LinkButton(button)包,easyui其中一个基本组成部分 演示样例: <!DOCTYPE html> <html> <head> <title ...

  8. 代码审查 (Google牛人谈Code Review)

    代码审查 (Google牛人谈Code Review) 在上一篇博客里我暗示自己将不在为Google工作. 我还没有决定好去哪儿-有几个非常不错的工作机会让我选择.鉴于这段时间内我不受雇于任何公司,我 ...

  9. Android Wear和二维码

    这是一篇发布在Android官方开发者社区博客,15年年初的时候就看到了这篇文章,直到现在才有时间把它翻译下来. 这是一篇如何在Android Wear上面如何正确地展示二维码的文章,里面有许多的经验 ...

  10. Python的@符号

    Python一直都属于用,没有去系统学习过,在一次代码review中见到了@符号,回来看了下,这个符号用于装饰器中,用于修饰一个函数,把被修饰的函数作为参数传递给装饰器,下面举几个例子: 1. @cl ...