Company
Date Published
Author
Matthew Gilliard
Word count
1231
Language
English
Hacker News points
None

Summary

Twilio, Azure and WhatsApp are used to generate photo alt-text in Java by connecting the Twilio API for WhatsApp with Azure's Computer Vision (CV) APIs. The application takes a URL of any photo in the WhatsApp message and passes it to the Azure CV API, which generates a description of the picture. The app then grabs the caption from the response and uses it as a reply to the original message on WhatsApp. A SparkJava microframework is used to create an HTTP server that listens for Twilio webhooks. Ngrok is used to expose the SparkJava server via a temporary internet-accessible URL, and Twilio's Sandbox for WhatsApp is configured to call a webhook when a message comes in. The application can be used to generate alt-text for images online, making them more accessible.