This project is a voice-activated assistant designed to entertain and engage audiences during Halloween. It uses OpenAI's GPT-4 model to generate responses and Eleven Labs' Text-to-Speech API for voice output. The assistant can sing songs, tell jokes, and narrate classic Halloween tales.
- Clone the repository.
- Run
yarn install
to install the required packages.
- Set up your environment variables (see below).
- Run
yarn compile
to compile the application. - Run
yarn start
to start the application.
OPENAI_API_KEY
: Your OpenAI API key.ELEVENLABS_API_KEY
: Your Eleven Labs API key.MAX_RETRIES
: Maximum number of retries for API calls (optional).
- Voice Capture: Captures voice input and saves it as an audio file.
- Transcription: Transcribes the voice input to text using OpenAI's Whisper model.
- Assistant Interaction: Processes the transcribed text and generates a response.
- Voice Output: Converts the generated text to voice using Eleven Labs' Text-to-Speech API.
- Audio Playback: Plays the generated voice output.
The application has robust error handling to deal with API failures, missing environment variables, and other issues.
Feel free to fork the repository and submit pull requests for any improvements or features you'd like to add.