A simple Flask application that allows users to send audio messages through WhatsApp and receive the transcribed text as a response, using OpenAI’s Whisper.
- Clone this repository and navigate to the project directory.
- Install the required packages using pip:
pip install -r requirements.txt
- Set up a Twilio account and WhatsApp API sandbox.
- Create a file named .env in the root of the project directory and set the following environment variables:
ACCOUNT_SID=YOUR_TWILIO_ACCOUNT_SID
AUTH_TOKEN=YOUR_TWILIO_AUTH_TOKEN
FROM=YOUR_TWILIO_PHONE_NUMBER
- Run the application
- Expose the application using ngrok:
ngrok http 5000
- Make sure to follow the instructions in the Twilio documentation to set up your sandbox phone number and configure the webhook for incoming messages.
- Send an audio message to the configured sandbox phone number through WhatsApp.
- The application will transcribe the audio and send the transcribed text back as a response.