Skip to content

Repository files navigation

Foresight

PyPI version Python 3.9+ License: MIT GitHub stars

Turn recorded conversations into structured insights. Automatically.

Drop an audio file in a folder. Get back a searchable transcript and an AI-extracted summary with key themes, quotes, and follow-up questions.

100% local. No API costs. No data leaves your machine.

Demo

Recorded with vhs. The script lives at examples/demo.tape.


The Problem

You record important conversations—interviews, user research calls, sales demos, meetings. Then the audio sits there because:

  • Transcription services cost money and take time
  • Reading a full transcript is tedious
  • The insights you need are buried in 45 minutes of audio
  • Organizing files manually is a chore

The Solution

Audio file drops in folder
         ↓
   [3-5 minutes]
         ↓
Transcript.md + Insights.md
         ↓
Original archived automatically

What you get:

Output Contents
Transcript Full searchable text, YAML metadata, word count
Insights Pain points, objections, decision criteria, key quotes, follow-up questions, executive summary

Use Cases

  • User Research — Extract patterns from customer interviews
  • Sales Calls — Capture objections and buying signals
  • Podcasters — Generate show notes and quotable moments
  • Journalists — Transcribe interviews with structured highlights
  • Founders — Process investor/customer conversations at scale
  • Consultants — Document client discovery sessions
  • Academics — Transcribe and analyze qualitative research

Install

pip install foresight-transcribe

That's it. Or install from source:

git clone https://github.com/dnoma/foresight.git
cd foresight
pip install -e .

Setup Ollama (required for insights)

# Install Ollama
brew install ollama   # macOS
# or: curl -fsSL https://ollama.ai/install.sh | sh  # Linux

# Start and pull model (~4GB)
ollama serve &
ollama pull mistral

Verify installation

foresight --test

Usage

Watch Mode (recommended)

Leave it running. Drop files in the folder, they process automatically.

foresight --watch

Single File

Process one recording right now.

foresight --file meeting.m4a

Use a custom extraction template:

foresight --file meeting.m4a --prompt prompts/sales-call.txt

Batch Mode

Have a backlog? Process everything at once.

foresight --batch

Web UI (optional)

Launch a simple drag-and-drop UI at http://localhost:8000:

foresight --ui

Install the UI dependency first:

pip install "foresight-transcribe[ui]"

What the Output Looks Like

Transcript

---
filename: customer-call-jan-11.m4a
duration: 34:22
word_count: 4521
model: whisper-medium
---

# Transcript: customer-call-jan-11

The full conversation, searchable and quotable...

Insights

## PAIN POINTS
- Manual invoice processing takes 3 days each month
- No visibility into supplier risk until problems occur

## DECISION CRITERIA
- Must integrate with existing SAP system
- Needs to show ROI within 90 days

## KEY QUOTES
- "We've been burned twice by suppliers going bankrupt with no warning"

## FOLLOW-UP QUESTIONS
- What's the current approval workflow for new suppliers?
- Who else is involved in the vendor selection process?

## EXECUTIVE SUMMARY
[2-3 sentence summary of the entire conversation]

Example Outputs (Repo)

See sample files in examples/:

  • examples/sample-transcript.md
  • examples/sample-insights.md

Directory Structure

Auto-created on first run:

~/klavis-interviews/
├── raw/           ← Drop recordings here
├── transcripts/   ← Whisper output
├── insights/      ← LLM-extracted analysis
├── archive/       ← Processed originals
└── processing.log

Set output_dir in foresight.yaml to change the base directory.


Configuration

Edit the config in interview_processor.py (or after install: ~/.local/lib/python*/site-packages/interview_processor.py):

WHISPER_MODEL = "medium"    # tiny|base|small|medium|large
OLLAMA_MODEL = "mistral"    # or phi3, llama3, etc.
MIN_FILE_SIZE = 100000      # Skip files under 100KB

Customize the extraction prompt

The EXTRACTION_PROMPT variable controls what the LLM extracts. Modify it for your use case:

# For sales calls
EXTRACTION_PROMPT = """Extract: objections raised, competitor mentions,
next steps agreed, budget signals..."""

# For user research
EXTRACTION_PROMPT = """Extract: user goals, frustrations,
current workflow, feature requests..."""

You can also keep templates in files and pass one at runtime:

foresight --file meeting.m4a --prompt prompts/user-research.txt

Config file

Create foresight.yaml in your working directory to override defaults:

whisper_model: medium
ollama_model: mistral
prompt_template: user-research
output_dir: ./processed

You can also pass a path explicitly:

foresight --config /path/to/foresight.yaml --watch

Options

Flag Description
-m, --model Whisper model size (default: medium)
--skip-insights Transcribe only, skip LLM extraction
--keep-original Don't move to archive after processing
--dry-run Preview what would be processed
--status Show pending files and system health
--retry-failed Retry previously failed files
--prompt Use a prompt template file for insights
--config Load settings from a config file
--test Verify installation works
--ui Launch a simple web UI

System Requirements

  • macOS (tested) or Linux
  • ~6-7GB RAM during processing (models load/unload automatically)
  • Python 3.9+
  • ~5GB disk for models (one-time download)

Processing Time

Audio Length Time (M1 Mac)
5 min ~45 sec
30 min ~3 min
60 min ~6 min

Why Local?

Local (this tool) Cloud APIs
Cost Free $0.006/min+
Privacy Data stays on device Uploaded to servers
Speed No upload/download Network dependent
Availability Works offline Requires internet

A 1-hour recording costs ~$0.36 on cloud transcription. Process 100 interviews and you've saved $36—plus your data never left your laptop.


Supported Formats

.m4a .mp3 .wav .mp4

Files under 100KB are skipped (filters out accidental recordings).


Prompt Templates

Use-case templates live in prompts/:

  • prompts/sales-call.txt
  • prompts/user-research.txt
  • prompts/podcast-shownotes.txt
  • prompts/meeting-notes.txt
  • prompts/journalist-interview.txt

Pass one with --prompt to switch extraction style. In foresight.yaml, prompt_template can be a template name (e.g., user-research) or a full file path.


Troubleshooting

Ollama not running?

ollama serve        # Start the server
ollama ps           # Check if model is loaded

Transcription too slow?

foresight --file audio.m4a --model small

Check system status:

foresight --status

License

MIT


Contributing

PRs welcome. Ideas:

  • Speaker diarization (who said what)
  • Custom prompt templates via config file
  • Web UI for reviewing insights
  • Export to Notion/Obsidian
  • Slack/Discord notifications when processing completes

Support

If this saved you time or money, consider giving it a star. It helps others discover the project.

Star this repo

Built by @dnoma — indie dev building tools that save time.

About

Turn recorded conversations into structured insights. Local transcription (Whisper) + AI extraction (Ollama). No API costs, no data leaves your machine.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages