A program to transform a text to a vocal message using Tiktok voice template.
It is a rewrite of Oscie57's project in Java. It aims at providing a Java alternative to its program for everyone to use in its own project.
You simply use a TiktokTTS
instance and follow its format.
String sessionID;
TiktokTTS tts = new TiktokTTS(sessionID, Voice.ENGLISH_US_MALE_1, "Testing random things", new File("test.mp3"));
tts.createAudioFile();
tts.setVoice(Voice.ENGLISH_CHEWBACCA);
tts.setOutput(new File("test_chewbacca.mp3"));
tts.createAudioFile();
They're is no limit in speech size.
While connected to the Tiktok web app you go to your Cookie menu and retrieve the value of sessionid
.
- Go to Tiktok and login yourself.
- Press
Ctrl+Shift+i
. - Go to
Application/Cookies
. - Search
sessionid
and copy its value.
Latest Release: GitHub Release
<dependency>
<groupId>io.github.loatchi.tiktok</groupId>
<artifactId>TiktokTTS</artifactId>
<version>VERSION</version>
</dependency>
- Have no limit on speech size
- Properly concatenate each audio together (A concatenation should take place at an end of a sentence "," or ".")