Just_A_Coder
Just_A_Coder

Reputation: 43

espeak text to speech sounds very weird on ubuntu 20.04 LTS

I am bit new to linux and I tried to run this python code. At the first time it asked me to install libespeak-dev and try to run the code again. After installing it when I ran the code the sound was very weird and very robotic and it was terrible to listen. Here is the code:

import pyttsx3

engine = pyttsx3.init()


def speak(text):
    engine.say(text)
    engine.runAndWait()


speak("Hello World and this is a test.")

For some reasons I am unable to attach the mp3 file to tell how terrible it sounds. By the way I am using Ubuntu 20.04 LTS which comes with default installation of python 3.8.5. Is there any fix to this? Because it sounds very bad. Thanks in advance...

Upvotes: 1

Views: 1306

Answers (1)

Ronish Rohan
Ronish Rohan

Reputation: 21

It doesn't work as windows uses a framework called as sapi5 which is way more developed than what linux uses that is espeak which is open source and also worse. You cannot in any way use sapi5 on linux...

Upvotes: 2

Related Questions