This project is a Streamlit web application for automatically creating a podcast between two characters. The project generates character dialogues using the PyCharacterAI library and converts text to speech using TulgaTTS.
- PyCharacterAI — for generating AI character dialogues.
- TulgaTTS — for text-to-speech (TTS) conversion.
- Streamlit — for building the web interface.
-
Clone the repository:
git clone https://github.com/dauitsuragan002/CharacterPodcast cd CharacterPodcast -
Install the required dependencies:
pip install -r tulgatts PyCharacterAI streamlit
-
Add your TulgaTTS API token to the
.envfile:- Obtain your token:
⚠️ DO NOT SHARE YOUR TOKEN! It is required to send requests from your account.- Open link https://character.ai/chat/2WPyJRflV_4nTx6_-tuNrhkiiqhDyOsn9O25BR1sDO8
- Open Developer Tools in your browser (usually F12).
- Go to the Network tab.
- Refresh the page or send a message to any character.
- In the list of network requests, click on any request (for example, to
/settings).
- Go to the Headers section.
- Find the Authorization header. It will look like:
Authorization: Token <your_token_here> - Copy only the token part (after
Token). - Set the
CHARACTER_AI_TOKENenvironment variable or create a.envfile in the project root and addCHAR_TOKEN=CHARACTER_AI_TOKEN.
- Authorization easy (use for mobile) script
If you want to easily obtain your CharacterAI token using your email, you can use the providedmodules/auth.pyscript:
pip install characterai python modules/auth.py
- Enter your email address.
- Open the sign-in link sent to your email (you can do this on your mobile).
- Paste the link back into the script prompt.
- The script will save your token to
user_token.txtin the format required for.env.
This makes it easy to get your token without using browser developer tools.
To launch the web application:
streamlit run podcast_web.py- Select characters and enter a podcast topic
- Automatically generate character dialogues
- Listen to each message via voice
- Save and view podcast history
app.py— logic for generating podcast dialoguespodcast_web.py— Streamlit web interfacesmodules/func.py— TTS and audio playback functionsconfig.py— configuration and character listaudio/— generated audio filespodcast_history.json— podcast history