Skip to main content

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.

Description

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)

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

“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.”

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

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

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

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

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

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

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

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

http://www.kohls.com/media/38.0.0-339/images/thumb/videoPlayer_Icon.png

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

Get Started

  1. Dependencies

  2. Install

  3. Setup

  4. Usage

  5. Thanks

Dependencies

  1. Python 2.7

  2. Simple Audio Indexer

  3. IBM Watson Speech API Username and Password

  4. pydub

Install

pip install Speech-Hacker

Setup

  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 https://www.ibm.com/watson/developercloud/speech-to-text.html (For help visit: Here)

Usage

Command for training a model

Speech-Hacker -train -u IBM_USERNAME -p IBM_PASSWORD -d ABS_PATH_TO_YOUR_AUDIO_FILES_FOLDER

Command for generating your custom speech

Speech-Hacker -generate -d ABS_PATH_TO_TRAINED_MODEL -t "WHAT_YOU WANT_TO_SAY" -g DESTINATION_FOR_REQUESTED_AUDIO

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

Speech-Hacker -generate -d ABS_PATH_TO_TRAINED_MODEL -f "ABS_PATH_OF_TEXT_FILE" -g DESTINATION_FOR_REQUESTED_AUDIO

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.

Thanks

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

aalireza

raphaeldore

Stickerpants

girishramnani

ochawkeye

Release files for Speech-Hacker 2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Speech-Hacker 2.3
File Size Uploaded
Speech-Hacker-2.3.tar.gz 6.5 kB Details

Release files / Speech-Hacker-2.3.tar.gz

Download URL Speech-Hacker-2.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d111d6da28f9f7b41ead5a7e568a5d9f4a68c26a9cf802f2e6634c8d2df4d98c
BLAKE2b-256 checksum
How to use checksums
e6cc1ec876e46f6ad6d02d069b2afeef3f3018352baf84f5155bb6ad7ca7a20b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.3 This release

1 release file

2.2

1 release file

2.1

1 release file

2.0

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page