27

Convert Text to Speech in 5 Lines of Code

 3 years ago
source link: https://towardsdatascience.com/convert-text-to-speech-in-5-lines-of-code-1c67b12f4729?gi=5deda098e48b
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

INbIbaB.jpg!web

Photo by Ketut Subiyanto from Pexels

In this post, I will show you how to convert text to speech using Python. This will be a simple machine learning project that we will understand some basics of speech library called pyttsx3. If you are wondering where can we use text to speech conversion in real life, don’t worry you are not alone. I ask the same question before learning almost anything, I will ask myself how will this information help me, and where can I use it in real life. This way of thinking helps me to learn new things faster and motivates me to use that information in my personal life.

There are a couple of industries that I will list that uses text to speech in a very nice way. One of them is in a classroom environment, students who don’t know how to read yet but can understand when you speak to them. Technology is used very often in classrooms these days, and some text to speech software can help the teachers a lot. Instead of the teacher spending time with each kid, and reading for them, a simple text to speech can very helpful. Here is a nice video showing how text to speech is used in a classroom:

Another nice example of text to speech usage is on Chromebooks. They have an accessibility feature called “Select to Speak”, you can select/ highlight the text and the computer will read it aloud to the person using this feature.

The last example of text to speech conversion, I would like to share with you is audiobooks. Using some training data from previous audio files, it is possible to make a machine read a book using a trained person’s voice. Yes, artificial intelligence is becoming more and more part of our daily life. Also teaching a machine is much easier than teaching a human being. This makes the development of the field much faster. Let’s get back to the project.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK