Skip to content

Setting Up (With TTS Endpoint)

Alex edited this page Nov 20, 2024 · 1 revision

If you want to use the audio generation capabilities through TikTok's Text-to-speech alongside the LLMs, this set up guide is for you.

Prerequisites

Using the TTS endpoint in the wrapper API requires one thing, a session_id from TikTok. To do this:

  1. Log in to the TikTok Web App
  2. Install the Cookie Editor extension for your browser
  3. Open the extension and search for sessionid
  4. Copy the value and paste it in your desired setup in SESSION_ID_HERE

Setting Up Locally

  1. pip install -r requirements.txt

  2. python server.py --session-id SESSION_ID_HERE (should now be running on localhost:1337)

  3. Perform a test call by running python testcalls.py in a separate terminal

Setting Up Via Docker

This uses the latest image version in the Docker Hub repository

  1. docker run -d --name keyless -p 1337:1337 -e TIKTOK_SESSION_ID=SESSION_ID_HERE callbacked/keyless:latest

Setting Up Via Docker (Building your image locally)

If you don't want to use the Docker Hub image and want to do it yourself, you can do it one of two ways, its up to personal preference:

Doing it with docker run:

  1. git clone https://github.com/callbacked/keyless-gpt-wrapper-api && cd keyless-gpt-wrapper-api

  2. docker build -t keyless:latest .

  3. docker run -d --name keyless -p 1337:1337 -e TIKTOK_SESSION_ID=SESSION_ID_HERE keyless:latest

Doing it with docker-compose:

  1. git clone https://github.com/callbacked/keyless-gpt-wrapper-api && cd keyless-gpt-wrapper-api

  2. docker-compose up -d

Clone this wiki locally