demo.mp4
Zippy Talking Avatar uses Azure Cognitive Services and OpenAI API to generate text and speech. It is built with Next.js and Tailwind CSS. This avatar responds to user input by generating both text and speech, offering a dynamic and immersive user experience. You can learn more about Zippy Talking Avatar by visiting the Kraken the Code: How to Build a Talking Avatar website.
I have made this Discord channel available: Math & Code to resolve doubts about the configurations of this project in development.
Zippy seamlessly blends the power of multiple AI technologies to create a natural and engaging conversational experience:
- Text Input: Start the conversation by typing your message in the provided text box.
- OpenAI API Response Generation: Your text is forwarded to OpenAI API, which crafts a coherent and meaningful response.
- Azure Cognitive Services: Speech Synthesis: Azure's text-to-speech capabilities transform OpenAI API's response into natural-sounding audio.
- Viseme Generation: Azure creates accurate visemes (visual representations of speech sounds) to match the audio.
- Synchronized Delivery: The generated audio and visemes are delivered to Zippy, bringing the avatar to life with synchronized lip movements and spoken words.
- Azure subscription - Create a free account.
- Create a Speech resource in the Azure portal.
- Your Speech resource key and region. After your Speech resource is deployed, select
Go to resource
to view and manage keys. For more information about Azure AI services resources, see Get the keys for your resource. - OpenAI subscription - Create one.
- Creare a new secret key in the OpenAI portal.
- Node.js and npm (or yarn)
- Clone this repository
git clone [email protected]:Monadical-SAS/zippy-avatar-ai.git
- Navigate to the project directory
cd zippy-avatar-ai
- Install dependencies
npm install
# or
yarn install
- Create a .env.development file in the root directory of the project and add the following environment variables:
# AZURE
NEXT_PUBLIC_SPEECH_KEY=<YOUR_AZURE_SPEECH_KEY>
NEXT_PUBLIC_SPEECH_REGION=<YOUR_AZURE_SPEECH_REGION>
# OPENAI
NEXT_PUBLIC_OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
- Run the development server:
npm run dev
# or
yarn dev
Open https://localhost:3000 with your browser to see the result.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.