This is a simple shell script to access the TikTok Text-to-Speech API.
This project currently relies on afplay
in macOS for mp3 audio playback.
- afplay
- curl
- jq
curl -sL https://raw.githubusercontent.com/lzm0/tiktok/main/tiktok -o tiktok
chmod +x tiktok
mv tiktok /usr/local/bin/tiktok
Usage: tiktok [-v voice] [-o file] [text...]
Options:
-v voice Voice to use (default: en_us_001)
see https://github.com/oscie57/tiktok-voice/blob/main/codes.md for available voices
-o file Output file, default is to play audio to the speakers
tiktok -v en_us_c3po 'Hello, world!'
tiktok -v en_us_c3po -o hello_world.mp3 'Hello, world!'
fortune | tiktok
- tiktok-voice Simple Python script to interact with the TikTok TTS API