voice_ai / README.md
vsj0702's picture
Update README.md
5c63c06 verified

A newer version of the Streamlit SDK is available: 1.43.2

Upgrade
metadata
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
pip install -r requirements.txt

Run the App

streamlit run app.py

🎭 Demo

Check out the live app on Hugging Face Spaces!

πŸ“ License

This project is licensed under the MPL-2.0 License.


πŸ’‘ Contributions & Feedback are Welcome! πŸš€