A Streamlit-based web application that combines OpenAI's chat capabilities with ElevenLabs' text-to-speech technology to create an interactive conversational experience with audio responses.
- Interactive chat interface built with Streamlit
- AI-powered responses using OpenAI's language models
- Text-to-speech conversion using ElevenLabs
- Chat history persistence during session
- Audio playback of AI responses
- Stream-based response display
- Python 3.10 or higher
- OpenAI API key
- ElevenLabs API key
-
Clone this repository
-
Install the required dependencies:
pip install -r requirements.txt
- Set up your environment variables:
- Create a
.streamlit/secrets.toml
file with the following content:
OPENAI_API_KEY = "your-openai-api-key" ELEVENLABS_API_KEY = "your-elevenlabs-api-key" OPENAI_MODEL = "gpt-3.5-turbo" # or your preferred model
- Create a
- Start the Streamlit application:
streamlit run app.py
-
Open your web browser and navigate to the URL shown in your terminal (typically
http://localhost:8501
) -
Enter your message in the chat input and press Enter to receive both text and audio responses