Record a meeting from both sides, and write its minutes

Who said what is the hard part of a meeting transcript, and the usual answer
is to hand one mixed recording to a model and ask it to tell the voices apart.
That guess is wrong often enough to be worse than useless in minutes, where a
decision attributed to the wrong person is a decision nobody made.

So the question never reaches a model. ffmpeg records the microphone and the
default sink's monitor as one stereo stream, you on the left and everyone else
on the right, and one process reading both is what keeps them aligned over an
hour. Each channel is transcribed on its own and the two are interleaved on a
single timeline, so attribution is settled by the wire a voice arrived on.
What a microphone picks up from the speakers lands on both channels; our copy
is dropped when it overlaps theirs in time and says nearly the same thing.

The stream is written to disk as it arrives rather than held in memory, so
length costs nothing and a crash costs the tail instead of the whole meeting.
Every stage the run reaches is recorded in meetings.jsonl, so a failure while
summarising does not throw away the transcription of an hour of audio: the
retry reads the transcript back out of the document and picks up from there.
A run that dies keeps its recording whether or not audio is being kept.

The minutes model is configured on its own, under Settings, with its own
prompt, and it is told who was expected in the room so the names come out
spelled right. It is told outright that the transcript is a record of other
people talking, not instructions addressed to it.

The built-in listener now holds several bindings rather than one, and the KDE
side is parameterised by desktop id, so the meeting toggle gets a shortcut of
its own on the same footing as the dictation one.
This commit is contained in:
yusufipk
2026-07-28 16:32:31 +07:00
parent 0bdee07564
commit 352f7b6c22
11 changed files with 1783 additions and 82 deletions
+4 -4
View File
@@ -75,7 +75,7 @@ class FileTranscriber(QObject):
wav_path = _to_wav(path, workdir)
self._check()
chunks = _split(wav_path, workdir)
chunks = split_wav(wav_path, workdir)
if len(chunks) > 1:
self.progress.emit(t("Splitting into {count} chunks…", count=len(chunks)))
@@ -128,7 +128,7 @@ class FileTranscriber(QObject):
conf = self.conf
prompt = conf.cleanup_prompt(with_timestamps=timestamps)
out = []
for block in _split_text(text, timestamps):
for block in split_text(text, timestamps):
self._check()
out.append(api.cleanup(
block,
@@ -214,7 +214,7 @@ def _to_wav(path, workdir):
return out
def _split(wav_path, workdir):
def split_wav(wav_path, workdir):
"""[(chunk path, offset in seconds)], a single entry for short files."""
with contextlib.closing(wave.open(wav_path, "rb")) as src:
rate = src.getframerate()
@@ -240,7 +240,7 @@ def _split(wav_path, workdir):
return chunks
def _split_text(text, timestamps):
def split_text(text, timestamps):
"""Break long text into cleanup-sized blocks, never mid-line."""
if len(text) <= CLEANUP_CHUNK_CHARS:
return [text]