|
--- |
|
title: Voice Ai |
|
emoji: π¦ |
|
colorFrom: yellow |
|
colorTo: indigo |
|
sdk: streamlit |
|
sdk_version: 1.42.0 |
|
app_file: app.py |
|
pinned: false |
|
license: mpl-2.0 |
|
thumbnail: >- |
|
https://cdn-uploads.huggingface.co/production/uploads/6752c8b21288ea13c1ceeef0/pOdkspnUGlneUDIERdXab.jpeg |
|
short_description: A Streamlit-based Voice AI with text, speech, and replies. |
|
--- |
|
|
|
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |
|
|
|
|
|
# Voice AI - Chat & Voice Assistant ποΈπ€ |
|
|
|
|
|
## π Overview |
|
Voice AI is an interactive chatbot that supports both **text and voice-based conversations**. Built using **Streamlit, Whisper API, LLaMA 3, and Edge TTS**, it provides a seamless experience where users can **speak or type their queries** and get **AI-generated responses** in both **text and speech formats**. |
|
|
|
## π Features |
|
- π€ **Voice Input**: Record your voice and get AI-generated answers. |
|
- π **Text Input**: Type questions and receive intelligent responses. |
|
- π **Text-to-Speech (TTS)**: AI responses are converted to speech and played back. |
|
- π **Conversational Memory**: Holds the conversation history in the session. |
|
- πΆ **Dynamic Audio File Naming**: Each response generates a new numbered audio file. |
|
- π **Hosted on Hugging Face Spaces**: Accessible anywhere, anytime. |
|
|
|
## ποΈ Technologies Used |
|
- **Streamlit**: UI Framework for interactive web apps. |
|
- **Whisper API (Groq)**: Converts voice input to text. |
|
- **LLaMA 3 (Groq)**: AI model for intelligent responses. |
|
- **Edge TTS**: Converts AI-generated responses into speech. |
|
|
|
## π How It Works |
|
1. **Start Chatting** |
|
- Type your question OR press the **mic button** to record your voice. |
|
2. **AI Processing** |
|
- If using voice, your speech is converted to text. |
|
- AI generates a relevant response based on the input. |
|
3. **Response Output** |
|
- The response is displayed on the screen. |
|
- A voice response is also generated and played automatically. |
|
4. **Continue the Conversation** |
|
- Each new message is appended to the conversation history. |
|
- Previous responses remain visible, and only the latest audio autoplays. |
|
|
|
## π¦ Installation & Running Locally |
|
If you want to run the project on your own machine: |
|
|
|
### Prerequisites |
|
- Python 3.8+ |
|
- Install dependencies |
|
|
|
```bash |
|
pip install -r requirements.txt |
|
``` |
|
|
|
### Run the App |
|
```bash |
|
streamlit run app.py |
|
``` |
|
|
|
## π Demo |
|
Check out the live app on [Hugging Face Spaces](https://huggingface.co/spaces/vsj0702/voice_ai)! |
|
|
|
## π License |
|
This project is licensed under the **MPL-2.0 License**. |
|
|
|
--- |
|
π‘ *Contributions & Feedback are Welcome!* π |