A Python script that converts text to video using Simli.ai and ElevenLabs APIs to generate an AI presenter speaking your provided text.
- Python 3.x
- Required Python packages (install via pip):
- requests
- python-dotenv
- webbrowser
- Clone this repository
- Create a
.env
file in the root directory using the providedenv_sample
as a template - Add your API keys to the
.env
file:SIMLI_API_KEY="your_simli_api_key" ELEVENLABS_API_KEY="your_elevenlabs_api_key"
- Edit the
text
field intext2video.py
to customize what the AI presenter will say - Run the script:
python text2video.py
- The script will:
- Generate a video using the Simli.ai API
- Create an HTML player file
- Automatically open the video in your default web browser
You can customize various parameters in text2video.py
:
faceId
: Choose different AI presentersvoice_settings
: Adjust voice parameters like stability and stylevoiceName
: Select different ElevenLabs voices
Make sure to keep your API keys confidential and never commit them to version control.