CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: JWinslow23 on December 07, 2017, 08:33:48 AM

Title: Text to speech...in my own voice [Python]
Post by: JWinslow23 on December 07, 2017, 08:33:48 AM
After discovering Text to Trump (http://jungle.horse), I thought to myself: how cool would it be to make a text-to-speech voice that resembles my own? And then I thought: how hard would it be?

The answer to both questions is "very". :P

Slightly modified from this Github repository (https://github.com/alexram1313/text-to-speech-sample), I created a Python program which would take entries in a modified version of the CMU Pronouncing Dictionary (http://www.speech.cs.cmu.edu/cgi-bin/cmudict), convert them into individual sounds, and play them back (as well as output them to a .wav file). The results are a bit Stephen-Hawking-ish right now, but I hope to try and improve it soon ;)

Here is an example of "my own voice" reading the CodeWalrus intro: https://clyp.it/02ucuy3z

Requires Python (https://www.python.org/downloads/), PyAudio (http://people.csail.mit.edu/hubert/pyaudio/), and PyDub (https://github.com/jiaaro/pydub). You do not need FFmpeg, but the program can freak out without it (https://www.ffmpeg.org/).

Project download here (https://github.com/JWinslow23/JoSiri-Winslow). Try it!
Title: Re: Text to speech...in my own voice
Post by: _iPhoenix_ on December 07, 2017, 12:33:26 PM
You had a great opportunity to use machine learning, yet you didn't!
Title: Re: Text to speech...in my own voice
Post by: Caleb Hansberry on December 08, 2017, 04:56:49 AM
Your voice sounds horrible! :P
Title: Re: Text to speech...in my own voice [Python]
Post by: JWinslow23 on December 08, 2017, 03:20:53 PM
Nah, it's just the method I chose to go about this is horrible. My voice itself is fine :P