Wishes From AI
Tags: devchallenge, twiliochallenge, ai, twilio
Published: 2024-06-20 13:59:34

*This is a submission for the [Twilio Challenge ](https://dev.to/challenges/twilio)*

## What I Built
I built Wishes from AI, an innovative app designed to generate personalized celebration messages using AI and Twilio’s powerful communication APIs. This app allows users to create heartfelt messages for various occasions, such as birthdays, anniversaries, and other special events, and send them as voice messages to friends and family.

## Demo
{% embed https://youtube.com/shorts/9JtRjGBUdzo %}

# Screenshots
![Wishes From AI Login Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vc124ssq42i8f1y7w2er.png)

![No Celebrations Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dr5t5zg2271zsv79gfjh.png)


![Menu Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0grcwp857jfshjun6say.png)
![Celebration List Screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwwkgammnb0j1a5bmnsd.png)

![Schedule Date Picker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwiy2c56my46vl7ox7xs.png)
![Voice Chooser](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dy3ebl14zyf7yzk3pu7j.png)


![Contacts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w8sgowhd8yc7ptp7at65.png)

## Twilio and AI

I leveraged Twilio’s **Voice API**, **phone number** validation, and OpenAI’s text generation capabilities to create an integrated solution for sending personalized voice messages. Here’s how it works:

	

- **Message Generation**: Users input their message or use the app to generate a random message using OpenAI. This ensures that even users who are unsure of what to say can send meaningful messages.
- **AI Voice Generation**: The app uses PlayHT to convert the text message into a natural-sounding voice message. There is support for normal and cloned voices for even more fun.
- **Phone Number Validation**: Before sending the message, the app uses Twilio’s Lookup API to validate the recipient’s phone number, ensuring that messages are sent to valid numbers.
- **Twilio Integration**: The generated voice message is uploaded to Firebase, and a URL is generated. Twilio’s Voice API is then used to make a call to the recipient, playing the voice message.

By integrating Twilio’s capabilities, the app ensures reliable and clear communication, making each celebration special and memorable.

## Additional Prize Categories

• **Twilio Times Two**: The app extensively uses Twilio’s Voice API to deliver voice messages and the Lookup API for phone number validation.
	•	**Impactful Innovators**: By making it easier to send personalized celebration messages, the app helps people stay connected and celebrate important moments despite physical distances.
	•	**Entertaining Endeavors**: The integration with OpenAI and PlayHT (normal and parody voices) to generate random and fun messages adds an element of surprise and entertainment for users.

## Further Notes
- Currently using Twillio sandbox account (not tested it live)
- Apple sign in with firebase
- Scheduled celebrations cloud functions (future work)
- More cloned voices (future work)
- Redesign (I'm not a designer, so future work)
- Privacy and Firebase App Check and api's lifted to the cloud (future work)
- **Twillio apis**: https://lookups.twilio.com/v2/PhoneNumbers + https://api.twilio.com/2010-04-01/Accounts/xxx/Calls.json