DEV Community

Stack All Flow
Stack All Flow

Posted on • Originally published at stackallflow.com on

Natural Sounding Text to Speech in Ubuntu?

software-recommendationtext to speech

I am looking for some easy to install text to speech software for Ubuntu that sounds natural. I’ve installed Festival, Gespeaker, etc., but nothing sounds very natural. All very synthetic and hard to understand.

Any recommendations out there?

Accepted Answer

SVOX pico2wave

A very minimalistic TTS, a better sounding than espeak or mbrola (to my mind). Some information here.

I don’t understand why pico2wave is, compared to espeak or mbrola, rarely discussed. It’s small, but sounds really good (natural). Without modification you’ll hear a natural sounding female voice.

AND … compared to Mbrola, it recognise Units and speaks it the right way!

For example:

  • 2°C → two degrees
  • 2m → two meters
  • 2kg → two kilograms

After installation I use it in a script:

#!/bin/bash
pico2wave -w=/tmp/test.wav "$1"
aplay /tmp/test.wav
rm /tmp/test.wav

Enter fullscreen mode Exit fullscreen mode

Then run it with the desired text:

<scriptname>.sh "hello world"

Enter fullscreen mode Exit fullscreen mode

or read the contents of an entire file:

<scriptname>.sh "$(cat <filename>)"

Enter fullscreen mode Exit fullscreen mode

That’s all to have a lightweight, stable working TTS on Ubuntu.

The post Natural Sounding Text to Speech in Ubuntu? appeared first on Stack All Flow.

Discussion (0)