Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create the clear voice using pyttsx3 on Ubuntu? #292

Open
GoldenDragon0710 opened this issue Nov 1, 2023 · 2 comments
Open

How to create the clear voice using pyttsx3 on Ubuntu? #292

GoldenDragon0710 opened this issue Nov 1, 2023 · 2 comments

Comments

@GoldenDragon0710
Copy link

I just used pyttsx3 for generating voice from the text with below code in Ubuntu 22.04.
The voice was cracked and it was not clear when playing audio file. But I got the clean audio file when running the same code in Windows 10.
How to create clear voice using pyttsx3 in Ubuntu 22.04?

import pyttsx3

engine = pyttsx3.init("espeak")
voices = engine.getProperty('voices')
engine.setProperty('rate', 160)
engine.setProperty("voice", voices[11].id)

# Save audio file
def speak(text):
    engine.say(text)
    engine.save_to_file(text, "output.wav")
    engine.runAndWait()

speak("Hello world and this is a test.")
@Robert-Lau
Copy link

Same problem, did you install espeak on Ubuntu?

@subba-gh
Copy link

subba-gh commented Jan 7, 2024

Facing the same problem. I have installed espeak also. Still the same issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants