K2-k2/SpeakSync-AI
0
๐๏ธ SpeakSync AI
A powerful, real-time voice translation bridge built with Streamlit, OpenAI Whisper, and Google Gemini 2.5 Flash. Speak in your native tongue and let AI handle the transcription, translation, and vocal synthesis instantly.
๐ Overview
SpeakSync AI is designed to break language barriers by combining state-of-the-art Speech-to-Text (STT), Large Language Models (LLM), and Text-to-Speech (TTS) technologies. Whether you're recording live or uploading a file, the app detects your language and speaks back to you in your chosen target dialect.
๐ ๏ธ Key Features
- Dual Input Modes: Record directly via your microphone or upload audio files (
mp3,wav,m4a). - Whisper Powered: Uses OpenAI's Whisper (Base) for high-accuracy, multilingual transcription.
- Gemini 2.5 Flash: Leverages Google's fastest model for nuanced, context-aware translations.
- Auto-Detect: Not sure what language is being spoken? The AI identifies it for you.
- Instant Playback: Automatically generates and plays the translated audio using Google Text-to-Speech (gTTS).
- Smart UI: Features a seamless language swap toggle and persistent session states.
๐ Deployment on Hugging Face Spaces
- SDK: Select Streamlit when creating your Space.
- Secret Keys: Go to Settings > Variables and Secrets*.
- Add
GOOGLE_API_KEY_Nwith your Gemini API Key from Google AI Studio. - Requirements: Ensure your
requirements.txtincludes:
streamlit
openai-whisper
torch
google-generativeai
gTTS- System Packages: Create a
packages.txtfile (required for Whisper/Audio) and add:
ffmpeg๐๏ธ The Tech Stack
- Frontend: Streamlit
- STT (Speech-to-Text): OpenAI Whisper
- Translation Engine: Google Gemini 2.5 Flash
- TTS (Text-to-Speech): gTTS (Google Text-to-Speech)
- Processing: Torch (CPU/CUDA optimized)
๐ป Local Setup
# Clone the repository
git clone [https://huggingface.co/spaces/K2-k2/SpeakSync-AI](https://huggingface.co/spaces/K2-k2/SpeakSync-AI)
# Install dependencies
pip install -r requirements.txt
# Run the app
streamlit run app.pyDeveloped by Kesar Agarwal an aspiring AI Engineer focused on creating accessible, agentic AI tools.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
