A modern web application that records your voice, transcribes it using OpenAI Whisper, and intelligently cleans up the transcript using a local AI model. All processing happens locally on your machine for complete privacy.
- 🎙️ Browser-based Recording: Record audio directly in your web browser using the MediaRecorder API
- 📝 AI-Powered Transcription: Accurate speech-to-text conversion using OpenAI's Whisper model (runs locally)
- 🧹 Intelligent Text Cleaning: Automatically removes filler words (um, uh, like), repetitions, and false starts while fixing grammar
- 📋 One-Click Copy: Easily copy cleaned transcripts to your clipboard
- 🔒 Privacy-First: All processing happens locally - your audio never leaves your machine
- 🎨 Modern UI: Beautiful gradient interface with smooth animations and responsive design
- FastAPI: Modern, fast web framework for building APIs
- OpenAI Whisper: State-of-the-art speech recognition model
- Ollama: Local LLM runtime for text cleaning (using gemma2:2b model)
- Vanilla JavaScript: No framework dependencies
- HTML5 MediaRecorder API: Browser-native audio recording
- Modern CSS: Gradient backgrounds, animations, and responsive design
Before you begin, ensure you have the following installed:
- Python 3.8+ (Python 3.11 recommended)
- Ollama installed and running on your system
- Download from ollama.ai
- Pull the required model:
ollama pull gemma2:2b
-
Clone the repository
git clone https://github.com/Aayushmaan-24/VoiceTranscriber cd VoiceCleaner/VoiceTranscriber -
Create a virtual environment (recommended)
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Python dependencies
pip install fastapi uvicorn openai-whisper ollama
Note: Installing Whisper will also install PyTorch and other ML dependencies, which may take some time.
-
Verify Ollama is running
ollama list # Should show gemma2:2b modelIf the model is not installed:
ollama pull gemma2:2b
-
Start the FastAPI server
cd backend uvicorn main:app --reloadThe server will start on
http://localhost:8000 -
Open your browser
- Navigate to
http://localhost:8000 - The application will automatically redirect to the frontend
- Navigate to
-
Record and transcribe
- Click "Start Recording 🎙️" and grant microphone permissions
- Speak naturally - include ums, pauses, and filler words
- Click "🛑 Click to Stop" when finished
- Click "Transcribe with AI" to process your recording
- Wait for the AI to transcribe and clean your audio
- Copy the cleaned transcript using the "📋 Copy Transcript" button
VoiceTranscriber/
├── backend/
│ └── main.py # FastAPI application with transcription endpoint
├── frontend/
│ ├── index.html # Main HTML file
│ ├── script.js # JavaScript for recording and API calls
│ └── styles.css # Styling and animations
├── temp/ # Temporary audio files (auto-created)
└── venv/ # Python virtual environment
Edit backend/main.py and modify the model name:
whisper_model = whisper.load_model('base') # Options: tiny, base, small, medium, largeNote: Larger models provide better accuracy but require more memory and processing time.
Edit backend/main.py and modify the Ollama model:
response = ollama.generate(model = 'gemma2:2b', prompt = prompt)Available models depend on what you've installed with Ollama. Other options include:
llama3.2:3bllama3.2:1bmistral:7b
- Ensure your browser has microphone permissions enabled
- Check browser settings for site permissions
- Try using HTTPS or localhost (some browsers require secure contexts)
- Verify Ollama is running:
ollama list - Ensure the model is installed:
ollama pull gemma2:2b - Check if Ollama is accessible on the default port
- First-time model download may take several minutes
- Ensure you have sufficient disk space (~500MB for base model)
- Check your internet connection for initial download
- Use a smaller Whisper model (tiny or base) for faster processing
- Consider using a smaller LLM model for text cleaning
- Ensure your system meets the minimum requirements
Transcribes and cleans an audio file.
Request:
- Content-Type:
multipart/form-data - Body: Audio file (webm format)
Response:
{
"transcript": "Cleaned transcript text...",
"raw": "Original transcript with filler words..."
}Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
- OpenAI Whisper for speech recognition
- Ollama for local LLM inference
- FastAPI for the web framework
For issues, questions, or contributions, please open an issue on the repository.
Made with ❤️ for privacy-conscious voice transcription