YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Tittoo AI Agent
Tittoo is a powerful AI agent that can understand voice and text input in multiple Indian languages, execute code, and respond with voice or text. It uses local models by default with automatic fallback to cloud services when needed.
Features
- Multilingual Support: Understands and processes Indian languages (Hindi, Tamil, Marathi, Bengali, etc.)
- Voice & Text Input: Interact using voice or text commands
- Local-First Processing: Uses Whisper.cpp for STT and Ollama for LLM inference
- Automatic Cloud Fallback: Falls back to OpenAI services when local processing fails
- Code Execution: Safely runs Python code in a controlled environment
- Voice Response: Speaks responses using offline TTS
- VS Code Integration: Seamless integration as a VS Code extension
- Hugging Face Deployment: Ready for deployment on Hugging Face Spaces
Project Structure
Tittoo/
βββ utils/
β βββ __init__.py
β βββ stt.py # Speech-to-Text service (Whisper.cpp & OpenAI)
β βββ llm_local.py # Local LLM service (Ollama)
β βββ llm_fallback.py # Cloud LLM service (OpenAI)
β βββ runner.py # Safe Python code execution
β βββ tts.py # Text-to-Speech service
βββ vscode-extension/
β βββ package.json # Extension metadata and dependencies
β βββ tsconfig.json # TypeScript configuration
β βββ src/
β βββ extension.ts # Extension implementation with webview
βββ app.py # FastAPI backend application
βββ huggingface_app.py # Hugging Face deployment configuration
βββ requirements.txt # Python dependencies
βββ setup_tittoo.ps1 # Windows setup script
βββ README.md # This file
Prerequisites
- Python 3.8+ installed
- Node.js and npm installed (for VS Code extension)
- Whisper.cpp compiled and available
- Ollama installed with llama3 model pulled
Setup Instructions (Windows)
Clone the repository:
git clone https://github.com/yourusername/tittoo.git cd tittooRun the setup script:
.\setup_tittoo.ps1Configure environment variables:
- Edit the
.envfile created by the setup script - Set the path to your Whisper.cpp executable
- Optionally add your OpenAI API key for cloud fallback
- Edit the
Pull the Llama3 model in Ollama:
ollama pull llama3
Running the Application
Backend Server
Start the FastAPI backend server:
uvicorn app:app --host 0.0.0.0 --port 8000
VS Code Extension
- Open the
vscode-extensionfolder in VS Code - Press F5 to start debugging
- The extension will be loaded in a new VS Code window
- Use the command palette (Ctrl+Shift+P) and type "Tittoo: Start" to open the UI
Hugging Face Deployment
- Create a new Hugging Face Space with a Gradio SDK
- Upload all files to the Space
- Install dependencies:
pip install -r requirements.txt pip install gradio - Set the Space to use the
huggingface_app.pyas the entry point
Local vs Cloud Fallback
Tittoo automatically switches between local and cloud services based on:
- Availability: If local services (Whisper.cpp or Ollama) are not available or fail
- Performance: If local processing takes too long
- Manual Override: When the "Use Cloud" option is selected in the UI
The fallback mechanism is implemented in each service class and provides seamless transitions between local and cloud processing.
Usage Examples
Voice Mode
- Click the "Record" button in the UI
- Speak your command (e.g., "Tittoo, ek Python program likh jisme Fibonacci print hota ho")
- Click "Stop" when finished
- Tittoo will transcribe your speech, process the request, and respond
Text Mode
- Type your command in the text input field (e.g., "Write a Python function to check if a number is prime")
- Click "Send"
- Tittoo will process your request and respond with the appropriate code or explanation
Troubleshooting
- STT Issues: Ensure Whisper.cpp is properly compiled and the path is correctly set in the
.envfile - LLM Issues: Check if Ollama is running and the llama3 model is downloaded
- VS Code Extension: If the extension doesn't load, check the VS Code Developer Tools console for errors
License
MIT
β One-line PowerShell command to run backend:
uvicorn app:app --host 0.0.0.0 --port 8000
β One-line VS Code command to launch extension:
Tittoo: Start
β Example prompt for testing:
Tittoo, ek Python program likh jisme Fibonacci print hota ho.