File size: 2,625 Bytes
6219ed4
 
 
 
 
 
aafcada
6219ed4
 
 
aafcada
 
 
6219ed4
 
 
376fdff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5c63c06
376fdff
 
 
 
 
aafcada
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
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!* πŸš€