Voice Chatbot Example
This example demonstrates how to create a voice-enabled chatbot using Quivr, Flask, and OpenAI’s Whisper model. Users can ask questions via audio input and receive spoken responses.
Features
- Audio input for asking questions
- Speech transcription using OpenAI’s Whisper model
- Integration with Quivr API for intelligent responses
- Speech synthesis for audio playback
Prerequisites
- Python 3.6+
- Flask
- OpenAI Python package
- Requests package
Installation
-
Clone the repository:
git clone https://github.com/stangirard/quivr-whisper.git
cd Quivr-talk
-
Install dependencies:
pip install flask openai requests python-dotenv
-
Configure environment variables:
OPENAI_API_KEY='your_openai_api_key'
QUIVR_API_KEY='your_quivr_api_key'
QUIVR_CHAT_ID='your_quivr_chat_id'
QUIVR_BRAIN_ID='your_quivr_brain_id'
QUIVR_URL='http://localhost:8000' # Update this to your local or deployed Quivr instance URL
Usage
-
Start the Flask application:
-
Navigate to http://localhost:5000
-
Click “Ask a question to Quivr”
-
Record your question
-
Wait for transcription and response
-
Listen to the synthesized response
For the complete example code, visit our GitHub repository.
Responses are generated using AI and may contain mistakes.