TikTok Voice Project Overview
The TikTok Voice project is an innovative Python-based tool that allows users to generate audio files (in .mp3
format) by utilizing the TikTok Text-to-Speech (TTS) API. This program enables users to input text and convert it into speech using a selection of voices. The project is user-friendly and serves various needs, especially for content creators who want to enhance their multimedia projects with unique audio content.
Project Support and Community
For those who need help or have questions while working with the project, a dedicated support channel is available on Discord. Users can join the Discord server and direct their inquiries to the #tiktok-voice
channel for the fastest assistance. Additionally, if you encounter any issues, the project also welcomes feedback and questions via the Issues tab on the project's GitHub page.
Your support for this project is welcome and appreciated. If you find this tool useful, contributions can be made via Ko-Fi. Moreover, if the project is instrumental in your work, crediting the repository in your project’s README file is encouraged.
It's important to note that the project is not intended for use in content farm projects, such as Reddit story readers or TikTok/Reels/YouTube Shorts generators.
Getting Started
To get started, ensure you have Python 3.8 or above installed along with the necessary packages. You can install the required packages using:
pip3 install playsound requests
or
pip3 install -r requirements.txt
Reading Text from Files
- Prepare your text in a plaintext file with any preferred name.
- Use the command:
This method does not impose a character limit but only supports Latin characters.py main.py -v VOICE -f FILENAME.txt --session SESSION_ID
Reading Text from Arguments
To convert short texts directly via command-line arguments, you can run:
py main.py -v VOICE -t TEXT -n FILENAME.mp3 --session SESSION_ID
This method accommodates up to 200 characters and supports non-Latin characters when a compatible TTS voice is chosen.
Playing the Text
If preferred, users can play the generated audio directly without saving it by appending the -p
argument. Note that an error code 263
might appear, which can be ignored as it does not impact the operation.
Obtaining a Session ID
A critical step in using this project is obtaining a session ID. For guidance on how to acquire this, refer to the wiki.
Supported Voices and Languages
The project supports a broad range of voice options across different languages. The comprehensive list of available voice codes can be found in the project wiki. Supported languages include:
- Portuguese (Brazil)
- German
- English (Australia, United Kingdom, United States, Disney)
- Spanish (including Mexico)
- French
- Indonesian
- Japanese
- Korean
Voice Samples
To explore different voice options, users can access sample files available in the /samples/ directory on the GitHub repository.
Project Credits
The TikTok Voice project was brought to life thanks to the contributions of various collaborators, including:
- Acknowledgment to Spotlight for the foundational idea.
- Development by Oscie.
- Voice option features by scanlime.
- German text translation contributions from Komfudo.
- French text translation by Philemax.
- Command line enhancements by Ash.
- Play argument addition by BigJ64.
The TikTok Voice project remains an accessible tool for those seeking to bring unique audio features to their creative endeavors through a straightforward and functional programming interface.