This contains some example code for using the OpenAI API for text-to-speech.
git clone [email protected]:awiteckzb/tts_demo.git
cd tts_demo
pip install python-dotenv openai
cp .env_example .env
- Add your OpenAI API key to the
.env
file - Fill in the text you want to convert to speech in
tts.py
python tts.py
- The output will be in
output.mp3