Some times we can not answer calls and can't respond to them on call for some time, so instead of rejecting their call and telling them to text, we get thier messege and convert it to text and whatsapp it to our own number.
- python
- DeepGram API key
- Twilio Python Helper Library
- Twilio WhatsApp sandbox
- Subscribed to twilio whatsapp sandbox from your number
Export Following environment variables
- RECORD_STS_WEBHOOK
- TWILIO_ACCOUNT_SID
- RECORD_STS_WEBHOOK (webhook URL for recording status updates)
- DEEPGRAM_API_KEY
- TWILIO_WHATSAPP_NO
- PERSONAL_WHATSAPP_NO
Now run the flask app which is main.py
Now whenever someone calls your Twilio number Twilio will record the call and once the call ends our flask application will receive a webhook call. Once our application receives a webhook called DeepGram will take the recording and returns the Text of that recording which will be sent to our number via WhatsApp.