A Python tool for extracting, transforming, and formatting meeting transcripts with automatic speaker detection and multiple output formats (DOCX, RTF, Markdown).
- Extract transcripts from clipboard or text files
- Transform with automatic:
- Line ending normalization (CRLF)
- Whitespace cleanup
- Label detection and formatting
- Paragraph detection using sentence endings and pause indicators
- Speaker resolution with Dan Moisan identification
- Load to multiple formats:
- Microsoft Word (DOCX) with proper spacing and fonts
- Rich Text Format (RTF)
- Markdown (MD)
- CLI with argparse for automation
- Interactive UI with tkinter dialogs when arguments are missing
- Configuration storage for last output folder
- Comprehensive Logging with dual handlers (console INFO+, file DEBUG+) for diagnostics
- Git Context Scripts (PowerShell) for AI-assisted commit/PR message generation
# Clone the repository
git clone https://github.com/drmoisan/transcript-etl-pipeline.git
cd transcript-etl-pipeline
# Install with Poetry
poetry install
# Or install for system-wide use
poetry build
pip install dist/transcript_etl_pipeline-0.1.0-py3-none-any.whl# Process a transcript file to DOCX
transcript-etl --source file --file transcript.txt --format docx --output-folder ~/Documents
# Process from clipboard to Markdown
transcript-etl --source clipboard --format md --output-name "meeting_notes.md" --output-folder ~/Documents
# Use interactive UI (prompts for missing arguments)
transcript-etl
# Show help
transcript-etl --helpfrom transcript_etl_pipeline.extract.from_file import extract_from_file
from transcript_etl_pipeline.transform.normalize import normalize_text
from transcript_etl_pipeline.transform.enhance import enhance_text
from transcript_etl_pipeline.document.parser import parse_enhanced_text
from transcript_etl_pipeline.formatters.docx_formatter import format_to_docx
# Extract
raw_text = extract_from_file("transcript.txt")
# Transform
normalized = normalize_text(raw_text)
enhanced, speaker_map = enhance_text(normalized)
# Parse to document model
document = parse_enhanced_text(enhanced)
# Format and save
format_to_docx(document, "output.docx")src/transcript_etl_pipeline/
├── extract/ # Input sources (file, clipboard)
├── transform/ # Normalization and enhancement
│ ├── normalize.py # Line endings, whitespace, labels
│ ├── paragraphs.py # Paragraph detection
│ ├── speakers.py # Speaker resolution
│ └── enhance.py # Orchestration
├── document/ # Document model
│ ├── model.py # Data structures
│ ├── formatting_rules.py # Spacing and font rules
│ └── parser.py # Text to Document conversion
├── formatters/ # Output generators
│ ├── docx_formatter.py
│ ├── rtf_formatter.py
│ └── md_formatter.py
├── logging_config.py # Centralized logging configuration
├── cli.py # Command-line interface
├── ui.py # Interactive dialogs
└── config.py # Configuration management
scripts/
├── collect-commit-context.ps1 # Generate Git context for commits
├── collect-pull-request-context.ps1 # Generate Git context for PRs
└── README.md # Scripts documentation
All output formats follow consistent spacing and styling:
- Font: 10pt Calibri (DOCX, RTF) or bold markers (MD)
- Labels: Bold with single space after colon
- Metadata: No extra spacing between lines
- Transcript label: 12pt space above
- Speaker paragraphs: 12pt space above
- Regular paragraphs: 6pt space above
- Line spacing: Single (1.0)
The project includes comprehensive test coverage with 241 tests:
- Unit Tests: 219 tests covering core functionality
- Integration Tests: 22 tests for end-to-end pipeline validation
- Coverage: 62% overall, 97%+ for core transformation logic
- 100% coverage: formatters (RTF, MD), transform logic, document model
- 97%+ coverage: parser, DOCX formatter, normalizer, speaker resolution
- Lower coverage: CLI/UI integration layers (tested via integration tests)
# Run all tests
poetry run pytest
# Run with coverage report
poetry run pytest --cov=src/transcript_etl_pipeline --cov-report=html
# Open htmlcov/index.html to view detailed coverage
# Run only unit tests
poetry run pytest tests/ -k "not integration"
# Run only integration tests
poetry run pytest tests/integration/
# Run with verbose output
poetry run pytest -v
# Run linters and type checking
poetry run black .
poetry run ruff check
poetry run pyrighttests/
├── document/ # Document model and formatting rules
├── extract/ # File and clipboard extraction
├── formatters/ # DOCX, RTF, Markdown output
├── transform/ # Normalization, paragraphs, speakers
└── integration/ # End-to-end pipeline tests
├── test_parser.py # Document parser integration
├── test_end_to_end_docx.py # Full pipeline → DOCX
├── test_end_to_end_rtf.py # Full pipeline → RTF
└── test_end_to_end_md.py # Full pipeline → Markdown
# Clone the repository
git clone https://github.com/drmoisan/transcript-etl-pipeline.git
cd transcript-etl-pipeline
# Install dependencies with Poetry
poetry install
# Set up pre-commit hooks (optional)
poetry run pre-commit installThe project uses strict code quality standards:
# Format code with Black (line length 100)
poetry run black .
# Check code with Ruff linter
poetry run ruff check
# Fix auto-fixable Ruff issues
poetry run ruff check --fix
# Type checking with Pyright (strict mode)
poetry run pyright
# Run pre-commit hooks manually
poetry run pre-commit run --all-files- Make changes to code
- Write/update tests for new functionality
- Format code:
poetry run black . - Check linting:
poetry run ruff check - Check types:
poetry run pyright - Run tests:
poetry run pytest - Commit changes
All checks must pass before committing. Pre-commit hooks enforce this automatically.
If you get "tkinter is not available" errors, provide all CLI arguments:
transcript-etl --source file --file input.txt --format docx \
--output-name output.docx --output-folder ~/DocumentsEnsure your system allows clipboard access. On Linux, you may need additional packages:
# Ubuntu/Debian
sudo apt-get install python3-tk
# Fedora/RHEL
sudo dnf install python3-tkinterThe pipeline automatically identifies "Dan Moisan" by analyzing dialogue references. For other speakers:
- Names from metadata (Attendees line) are auto-detected
- Unknown speakers trigger UI prompt with sample utterances (if UI available)
- Use CLI with
--sourceand all required arguments to skip UI prompts
Pipeline execution is logged to ~/.transcript_etl/pipeline.log with:
- Stage-by-stage progress (Extract → Normalize → Enhance → Parse → Load)
- Character counts and speaker mappings
- Detailed error tracebacks
- Console output (INFO+) and file output (DEBUG+)
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the code quality standards (Black, Ruff, Pyright)
- Write tests for new functionality
- Ensure all tests pass (
poetry run pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
✅ Production Ready
- Core ETL pipeline fully functional
- 241 tests with 62% coverage (all passing)
- All code quality checks passing (Black, Ruff, Pyright, Pytest)
- Multiple output formats supported (DOCX, RTF, MD)
- CLI and UI fully operational
- Comprehensive logging infrastructure
- PowerShell utilities for Git context collection
- Speaker resolution requires either metadata names or UI interaction
- UI dialogs require tkinter (can be bypassed with full CLI arguments)
- Best results with properly formatted transcript input
- Speaker identification uses heuristics that may need refinement for edge cases
Built with:
- python-docx for DOCX generation
- tkinter for UI dialogs
- Poetry for dependency management