Kanjul/Multimodal-AI-Assistant
0
๐ค My Multimodal AI Assistant ๐๏ธ๐ฌ
This Gradio application serves as an interactive multimodal AI assistant, bringing together speech-to-text, large language model processing, and text-to-speech capabilities. It aims to provide a seamless conversational experience.
โจ Features
- Speech-to-Text (STT): Transcribes user's spoken audio input into text.
- Large Language Model (LLM) Interaction: Processes the transcribed text and generates intelligent, context-aware responses.
- Text-to-Speech (TTS): Converts the LLM's text response back into natural-sounding speech for an auditory reply.
- Built with Gradio: Provides an easy-to-use web interface for interaction.
๐ How to Use
- Launch the App: Once the Space is loaded, you will see the interactive interface.
- Provide Input:
- You can speak directly into your microphone (allow browser access if prompted).
- Alternatively, you can upload an audio file containing your message.
- Get Response:
- Your audio will be transcribed and displayed.
- The AI will process your input and generate a text response.
- Finally, the AI's response will be converted into speech and played back to you.
๐ ๏ธ Technologies Used
- Gradio: For building the interactive web user interface.
- gTTS (Google Text-to-Speech): For basic text-to-speech conversion.
- ElevenLabs: For high-quality, more natural-sounding text-to-speech.
- Groq API (likely via OpenAI-compatible library): For fast large language model inference and potentially speech-to-text.
- PyAudio: For handling audio input/output, requiring
PortAudiosystem libraries.
โ๏ธ Local Development Setup
To run this assistant on your local machine:
- Clone the Repository:
git clone [https://huggingface.co/spaces/Kanjul/Multimodal-AI-Assistant](https://huggingface.co/spaces/Kanjul/Multimodal-AI-Assistant)
cd Multimodal-AI-Assistant- Create and Activate a Virtual Environment:
python -m venv venv
.\venv\Scripts\activate # On Windows PowerShell
# source venv/bin/activate # On Linux/macOS- Install Dependencies:
pip install -r requirements.txt- Set Environment Variables (API Keys): Create a
.envfile in the root of your project and add your API keys:
ELEVEN_API_KEY="your_elevenlabs_api_key_here"
GROQ_API_KEY="your_groq_api_key_here" # If you use Groq
# Add any other API keys your app might need Ensure your Python code accesses these using os.environ.get("YOUR_KEY_NAME").
- Run the Application:
python app.py Your Gradio app will then be accessible in your web browser, typically at http://127.0.0.1:7860.
โ๏ธ Deployment on Hugging Face Spaces
This application is designed for easy deployment on Hugging Face Spaces. The README.md metadata (this file!) and requirements.txt handle the setup. Ensure your API keys are added as Space Secrets in the Hugging Face Space settings, NOT in your code or .env in the repo.
Developed by Kanjul
