How to add more speakers and their voices in pyttsx3 offline text to speech..

Photo by CHUTTERSNAP on Unsplash

I was working a project which were related to it For that needed more speaker and their voices .Searched many times on web and find different different places. but solution didn’t found. after many days research found a solution to how to add more speakers and their voices in pyttsx3.

So. like me there is many students and project managers and developers working on this kind of projects . So it is helpful for them.

We already known there is only two default system speakers and their voices are available in Microsoft window or pyttsx3.

prerequisite —

1-Install pyttsx3 (pip install pyttsx3) in your local machine.

2-Window 8,8.1 or 10 installed in your system.

3-Any python environment and IDE required like pycharm, jupyter notebook, conda etc.

Let look how to find how many speakers and their voices default supported by window or pyttsx3.

import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
for voice in voices:
print(voice, voice.id)
engine.setProperty('voice', voice.id)
engine.say("Hello World!")
engine.runAndWait()
engine.stop()

Right here , by default we found only two speakers and their voices.

1-David

2-Zira

It was not sufficient for my project. so that i wanted to add more voices and speakers.

Let see how we can do it.

Now, follow all those images and steps to understand how we can add more speakers and their voices in pyttsx3 step by step -

Press window + Control + n .After press follow all the images given below

Follow all the steps-

Now after successfully added the English(Canada) voice . now time to check in pyttsx3 English(Canada) speaker(voice) is available or not .

For that write some python script once again to verify that.

import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
for voice in voices:
print(voice, voice.id)
engine.setProperty('voice', voice.id)
engine.say("Hello World!")
engine.runAndWait()
engine.stop()

Congratulation your English(Canada) speaker and voice has been added successfully.

Same like this. you can added more speakers and their voices.

If any doubt regarding it. please comment below and ask feel free.

If any doubt regarding this tutorial ask feel free on LinkedIn- http://linkedin.com/in/puneet166

GitHub workspace link- https://github.com/puneet166?tab=repositories

--

--

--

Data Science , Machine Learning , BlockChain Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Where do you create objects? — The Factory Design Pattern

Augmented Reality Apps using Unity 3D and Vuforia

The Flywheel

5 Key Questions When Vetting Development Vendors

Multi-tenant SDK Authentication

C++ shared ptr implementation

Using kubectl through SSH

Moussa Jabateh | How Solution Architecture Can Influence A Product’s Business Value

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Puneet Singh

Puneet Singh

Data Science , Machine Learning , BlockChain Developer

More from Medium

Primary Supervised Learning Algorithms Used in Machine Learning

Supervised and Unsupervised Machine Learning Algorithms

What is Deep learning and how does it work?

Part 4: Naive Bayes