Text to Speech

A project log for USB CDC Robosapien V1

Robosapien's actions controlled through a virtual USB port. Speaker switchable between Robosapien & external audio jack

Christoph TackChristoph Tack 07/31/2020 at 13:320 Comments


in Ubuntu

sudo apt install libttspico-utils sox

Convert text to speech

pico2wave -w lookdave.wav "Look Dave, I can see you're really upset about this."

Speech playback

Using aplay

aplay lookdave.wav 
Playing WAVE 'lookdave.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono

Using play

play -qV0 lookdave.wav treble 24 gain -l

Adding speech effects

The following command will convert the female voice to a robot voice.

play lookdave.wav stretch 1.2 133.33 lin 0.2 0.4 echo 0.4 0.8 15 0.8 synth sine fmod 30 echo 0.8 0.8 29 0.8
play WARN alsa: can't encode 0-bit Unknown or not applicable


 File Size: 119k      Bit Rate: 256k
  Encoding: Signed PCM    
  Channels: 1 @ 16-bit   
Samplerate: 16000Hz      
Replaygain: off         
  Duration: 00:00:03.72  

play WARN echo: echo: warning >>> gain-out can cause saturation of output <<<
In:100%  00:00:03.72 [00:00:00.00] Out:72.0k [      |      ]        Clip:0