Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AiMeetingNotes

AiMeetingNotes is a long-running local recorder for D&D sessions and meetings. It continuously captures microphone audio, transcribes complete speech in chunks with Mega-ASR, and writes rolling summaries while recording continues.

The transcript is chronological and append-only. Recent transcript text is also passed into the next ASR request as context, which helps preserve names, places, and topics across chunk boundaries.

Features

  • Continuous recording with configurable, exact-length audio chunks
  • Robust local transcription with the zhifeixie/Mega-ASR checkpoint
  • Mega-ASR audio-quality routing: clean audio uses base Qwen3-ASR and degraded audio uses the robust Mega-ASR adaptation
  • Rolling full transcript and per-chunk summaries during multi-hour sessions
  • Bounded audio backlog so slow inference cannot consume unlimited memory
  • Cross-chunk ASR context and hierarchical summarization for long text
  • Graceful Ctrl+C shutdown that processes usable remaining audio
  • Optional language detection, final session summary, and raw-transcript suppression
  • Configurable microphone, routing, models, output directory, and summary sizes
  • Immutable, validated summarization-model downloads

Runtime requirements

  • Python 3.13
  • A working microphone with permission granted to Python
  • Git, for installing the pinned Mega-ASR source revision
  • Enough RAM, VRAM, and disk space for the Qwen3-ASR-1.7B backbone, Mega-ASR adaptation, router, and summarization model
  • Optional but strongly recommended: a CUDA-capable NVIDIA GPU

AiMeetingNotes targets Python 3.13 because Qwen-ASR declares support for it and the required Windows wheels are available. Mega-ASR's own quick start currently uses Python 3.10, so the tightly coupled PyTorch, Torchaudio, Qwen-ASR, and Transformers versions remain pinned to Mega-ASR's known-compatible stack.

This project uses Mega-ASR's Transformers backend because vLLM does not support native Windows GPU inference. vLLM streaming requires Linux, WSL2, or a Linux container. AiMeetingNotes remains continuous on Windows by recording in one thread while completed chunks are processed in another.

Installation

On Windows PowerShell:

git clone https://github.com/RejectKid/AiMeetingNotes.git
cd AiMeetingNotes
py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python .\setup_mega_asr.py

The final setup command:

  1. Checks out the pinned xzf-thu/Mega-ASR source under third_party/Mega-ASR.
  2. Downloads a compatible pinned zhifeixie/Mega-ASR checkpoint under models/Mega-ASR.
  3. Verifies the base model, adaptation weights, and router checkpoint.

Both downloaded directories are excluded from Git. Run python .\setup_mega_asr.py --help to use different locations or revisions.

PyTorch installation varies by hardware. The requirements match Mega-ASR's PyTorch 2.10 runtime. If the default wheel does not provide the CUDA build you need, install the appropriate PyTorch 2.10 build for your system before running the remaining installation commands.

Usage

Start recording with the defaults:

python .\AudioToTextNotes.py

Press Ctrl+C to stop. By default, the application records 150-second chunks and writes these files in the current directory:

  • raw_transcripts.txt — complete Mega-ASR text for every processed chunk
  • notes.txt — a rolling summary for every processed chunk

Add --final-summary to write meeting_summary.txt after the recorder drains its remaining audio.

List available microphones:

python .\AudioToTextNotes.py --list-devices

Example for a D&D session:

python .\AudioToTextNotes.py `
  --input-device 2 `
  --chunk-seconds 150 `
  --asr-context-characters 4000 `
  --output-dir .\meeting-output `
  --final-summary

Use automatic language detection and avoid retaining the raw transcript:

python .\AudioToTextNotes.py --language auto --no-raw-transcript

Disable the audio-quality router and always apply the robust Mega-ASR adapter:

python .\AudioToTextNotes.py --no-routing

Run python .\AudioToTextNotes.py --help for every option.

The default facebook/bart-large-cnn summarizer is pinned to an immutable Hugging Face commit and its configuration is checked before Transformers loads it. If you select another --summary-model, also pass its full 40-character commit SHA with --summary-model-revision; branch names such as main are rejected. Only SafeTensors weights and non-executable model/tokenizer data are downloaded; summarizers available only as pickle-based weights are rejected.

How continuous processing works

The microphone callback places one-second audio blocks in a bounded queue. Recording never waits for ASR or summarization. The processing thread assembles exact chunks, writes each one to a temporary WAV file for Mega-ASR's router, deletes that file after inference, appends the full transcript, and then writes the chunk summary.

Up to ten minutes of unprocessed audio is retained by default. If inference falls farther behind, new audio is dropped with a visible warning rather than allowing memory use to grow indefinitely. Change this limit with --max-backlog-seconds.

The default ASR generation limit is 1,024 tokens to avoid truncating dense 150-second conversations. Change it with --max-asr-tokens. Recent transcript context is capped at 2,000 characters by default and can be changed with --asr-context-characters.

For long chunks, routing is performed on a representative 30-second window from the middle of the chunk and the selected ASR path still transcribes the entire chunk. Change the routing window with --router-sample-seconds.

Device selection

--device auto uses CUDA when PyTorch can access it and otherwise falls back to CPU. The Mega-ASR backbone, router, adapter, and summarizer all follow the selected device. CPU inference is supported but may not keep up with a live session on all hardware.

Keeping adapter deltas on the GPU makes Mega-ASR route switching faster but uses more VRAM. Use --no-keep-delta-on-gpu if memory is constrained.

Privacy

Audio inference is local after the source and model downloads complete. The temporary WAV for each chunk is deleted immediately after transcription. Transcripts and summaries are ordinary unencrypted text files, so treat the output directory as sensitive and apply an appropriate retention policy. Use --no-raw-transcript when only summarized notes should be retained.

Dependency security

Qwen-ASR 0.0.6 requires Transformers 4.57.6, and Mega-ASR currently depends on the PyTorch/Torchaudio 2.10 pair. Newer releases contain security fixes but are not drop-in compatible with this inference stack. AiMeetingNotes limits the known exposure by using immutable Mega-ASR and summarizer revisions, rejecting unsafe summarizer configuration fields, disabling remote model code, and not using the affected Torch JIT or Transformers training paths. Reassess these pins when Qwen-ASR or Mega-ASR publishes a compatible dependency update.

Development

The standard-library tests do not require the ML models or microphone:

python -m unittest discover -s tests -v

License

AiMeetingNotes is available under the MIT License. Mega-ASR and its model are separate Apache-2.0-licensed dependencies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages