This Python-based tool uses Azure OpenAI to summarise Microsoft Teams meeting transcripts. It processes .docx transcript files, chunks them, and uses AI to generate comprehensive summaries.
The diagram below shows the current flow:
- Read the Teams transcript file
- Split the document into manageable chunks
- Use Azure OpenAI to process each chunk
- Compile a final summary of the document
- Python 3.12
- Azure Open AI subscription
- pip (Python package installer)
- Clone the repository
git clone https://github.com/thomast1906/teams-transcript-summariser-python-openai.git
cd teams-transcript-summariser-python-openai
- Create and activate a virtual environment:
python3 -m venv venv
source vnv/bin/activate
python -m venv venv
venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables in a .env file:
FILE_PATH="<file_path>.docx"
AZURE_OPENAI_API_KEY="azure_openai_api_key"
AZURE_OPENAI_ENDPOINT="azure_openai_endpoint"
AZURE_OPENAI_DEPLOYMENT_NAME="azure_openai_deployment_name"
# prompts from prompt.json
INITIAL_PROMPT_SUMMARY="initial_prompt_summary_per_user_questions_answered"
FINAL_PROMPT_SUMMARY="final_prompt_summary_per_user_questions_answered"
Run the summariser:
python summary.py
- Chunks large transcripts for efficient processing
- Utilises Azure OpenAI for intelligent summarisation
- Generates summaries focusing on key areas: Overview, Concerns, Current Model, Questions/Thoughts, To-Do Lists, and Outstanding Tasks
- Supports three summary types: Overall, Per User, and Per User with Questions Answered
- Logs processing steps and errors
The script uses prompts to guide the AI model on what to generate. The prompts are stored in prompt.json
and are read by the script.
- Overall Summary
- Purpose: Generates a general summary of the entire Teams transcript
- Prompts:
initial_prompt_summary
andfinal_prompt_summary
- User-Specific Summary
- Purpose: Creates a summary with references to each participant and their contribution timestamps
- Prompts:
initial_prompt_summary_per_user
andfinal_prompt_summary_per_user
- Comprehensive User Summary with Q&A
- Purpose: Produces a detailed summary including user references, timestamps, and addressed questions
- Prompts:
initial_prompt_summary_per_user_questions_answered
andfinal_prompt_summary_per_user_questions_answered
Example output of each summary: (Formatted raw .txt files for markdown)
The script logs its progress to the console, including chunking status, API requests, and execution time.
Includes error handling for file operations and AI model interactions.