Skip to main content

Makes famous people speak whatever you wish bylinking their words

Project description

Would you like to make any famous figure speak whatever you want? Use Speech-Hacker to train your own speaker and receive speeches spoken by them.


Speech-Hacker takes a large data base of audio speeches spoken by your chosen figure and employs Simple Audio Indexer (Using Watson Speech API) to split them on words and to create smaller chunks of audio files containing those words. Finally, your desired speech’s words and phrases get associated with audio chunks that were created and converted, so that you can receive a brand new speech spoken by your figure.

Significant Improvement in New Version

In earlier versions, Speech-Hacker was using pydub to split words based on amount of silence between them. That worked, but it wasn’t as smart as we wanted to be. Therefore, we thought of using IBM Watson Speech API to index words. Of course, we got much better results! SimpleAudioIndexer was built as a separate project to help us implement this functionality for Speech-hacker.

Samples (Trained by President Obama’s Speeches)

“Let me give you an example. When I was in Washington, I fought hard to make sure your rights are under safety, like social security and other things.”

“Black Friday was the best thing in the world! Did you go shopping?”

“American people now should care about science more than before since we have problems in this country.”

“Call me on your phone so we can talk about important issues.”

“I want a better job after this because this one did not make me sick enough!

“Make america great again and long live alt right! I am not sure of course what I just said!””


  1. Python 2.7
  2. Simple Audio Indexer
  3. IBM Watson Speech API Username and Password
  4. pydub


pip install Speech-Hacker


  1. Choose your figure(s).
  2. Browse the internet to find reasonable amount of relatively good quality audio files spoken by your figure. (Convert them to WAV)
  3. Place all the audio files you found in a folder
  4. Acquire IBM Watson Speech to Text username and password at (For help visit: Here)


Command for training a model


Command for generating your custom speech


If you would like to generate from a text file, you can alternatively enter:


Arguments Description:

-train : Training mode

IBM_USERNAME : IBM Watson Speech to Text username

IBM_PASWORD : IBM Watson Speech to Text password

ABS_PATH_TO_YOUR_AUDIO_FILES_FOLDER : Absolute path to the folder you placed the audio of your figure

-generate : Generating mode

ABS_PATH_TO_TRAINED_MODEL : Absolute path of the folder of audios you entered when training.

DESTINATION_FOR_REQUESTED_AUDIO : The destination you would like to export your generated audio to.


Many thanks to the following GitHub users for contributing code and/or ideas:






Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Speech-Hacker, version 2.3
Filename, size File type Python version Upload date Hashes
Filename, size Speech-Hacker-2.3.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page