Skip to content

Meeting transcriber with speaker diarization using Sarvam AI and OpenRouter

License

Notifications You must be signed in to change notification settings

initrd/localscribe

Repository files navigation

LocalScribe

Meeting transcriber with speaker diarization using Sarvam AI and OpenRouter.

Features

  • Multi-speaker transcription with speaker diarization
  • Multi-lingual support for 22+ Indian languages
  • Meeting analysis with AI-generated summaries
  • Template support - customizable analysis templates
  • Local storage - recordings, transcripts, and summaries saved locally
  • CLI interface for easy workflow

Requirements

Quick Start

1. Clone and Setup

# Clone repository
git clone https://github.com/yourusername/localscribe.git
cd localscribe

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or: venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

2. Configure

# Copy environment template
cp .env.example .env

# Edit .env with your API keys
nano .env

3. Use

# List audio devices
localscribe devices

# Record a meeting
localscribe record -n "team-standup"

# List recordings
localscribe list-recordings

# Transcribe
localscribe transcribe team-standup

# Analyze
localscribe analyze team-standup

# View summary
localscribe show team-standup

Recording Controls

During recording, use keyboard controls:

Key Action
P Pause both mic and speaker
M Mute mic (speaker continues recording)
R Resume from pause or unmute mic
S Stop and save recording
? Show help

The display shows:

  • Event time: Total time including pauses
  • Recorded time: Actual recorded audio (excludes pauses)

Using Templates

LocalScribe supports customizable analysis templates:

# Use a specific template
localscribe analyze team-standup --template weekly-team

# Use custom prompt
localscribe analyze meeting --prompt "Focus on action items and deadlines"

# Provide context (model decides format)
localscribe analyze meeting --context "What decisions were made?"

# Combine template with context
localscribe analyze standup --template standup --context "Sprint planning"

Available templates:

Template Description
default Standard summary with key points and action items
detailed Comprehensive analysis with all sections
brief Quick 2-3 paragraph summary
lecture Lecture notes with concepts and definitions
standup Daily standup format
weekly-team Weekly team meeting format

Docker

# Build
docker build -t localscribe .

# Run
docker-compose up

Commands

Command Description
record Start recording
list-recordings List recordings
transcribe Transcribe recording
analyze Generate summary
show View results
devices List audio devices
delete Delete recording

Configuration

Edit config.yaml:

audio:
  sample_rate: 16000

transcription:
  model: "saaras:v3"
  mode: "translate"
  with_diarization: true

summarization:
  model: "openai/gpt-4o-mini"
  template: "default"  # template name (default, detailed, brief, lecture, standup, weekly-team)

storage:
  templates_dir: "templates"  # directory containing template files

Template Variables

Templates support variable substitution using {{variable}} syntax:

Variable Description
{{date}} Current date (YYYY-MM-DD)
{{time}} Current time (HH:MM:SS)
{{datetime}} Full datetime
{{filename}} Meeting ID
{{transcript}} Full transcript text
{{speaker_count}} Number of speakers
{{speakers}} Comma-separated speaker names
{{speaker_1}} Name of speaker 1
{{speaker_N}} Name of speaker N
{{prompt}} Custom prompt (from --prompt)
{{context}} Meeting context (from --context or metadata)

Creating Custom Templates

Create a .md file in the templates directory with YAML frontmatter:

---
system_prompt: |
  Your custom prompt for the LLM...

output_header: |
  # My Custom Header
  Date: {{date}}

context: ""  # default context
---

## Analysis

{{transcript}}

Development

# Install dev dependencies
pip install -r requirements-dev.txt

# Run tests
pytest

# Lint
ruff check src/

# Type check
mypy src/

License

MIT

About

Meeting transcriber with speaker diarization using Sarvam AI and OpenRouter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published