feat: add transcription pause controls
PR and Push Build/Test / build-and-test (push) Successful in 13m19s

This commit is contained in:
2026-09-02 12:22:11 +02:00
parent 714da456df
commit 70ffaa7357
18 changed files with 1927 additions and 94 deletions
@@ -0,0 +1,213 @@
## ADDED Requirements
### Requirement: Active transcription can be paused without ending the meeting
Meeting Assistant SHALL allow transcription for an active meeting recording to be paused and unpaused without stopping the meeting run.
While transcription is paused, Meeting Assistant SHALL keep the recording status active, SHALL preserve the meeting artifacts and run-local speaker context, and SHALL keep the normal finish and cancel/discard controls available.
When transcription is unpaused, Meeting Assistant SHALL resume transcribing newly captured audio through the existing meeting run.
Pausing or unpausing when no active recording exists SHALL leave recording state unchanged.
#### Scenario: Active transcription is paused and unpaused
- **GIVEN** a meeting is actively recording
- **WHEN** the user pauses transcription
- **THEN** the meeting remains active and reports that transcription is paused
- **AND** keeps its existing artifacts and speaker context
- **WHEN** the user unpauses transcription
- **THEN** newly captured audio is transcribed in the same meeting run
#### Scenario: Paused meeting can still be finished
- **GIVEN** an active meeting transcription is paused
- **WHEN** the user finishes the meeting
- **THEN** Meeting Assistant follows the normal stop, transcription drain, speaker processing, and summary flow
#### Scenario: Pause request while idle is harmless
- **GIVEN** no meeting recording is active
- **WHEN** transcription pause is requested
- **THEN** Meeting Assistant remains idle
## MODIFIED Requirements
### Requirement: Windows taskbar icon controls recording
Meeting Assistant SHALL show a Windows taskbar notification icon when running on Windows.
The taskbar icon SHALL indicate whether the newest meeting process is idle, actively recording, or post-recording processing/summarizing.
When a new meeting is actively recording while an older stopped meeting is still transcribing, recognizing speakers, or summarizing, the taskbar icon SHALL show the new active recording state.
The taskbar icon right-click menu SHALL expose recording controls based on the current state and configured launch profiles.
The taskbar icon right-click menu SHALL expose an Exit action in every recording state.
When Meeting Assistant is idle or only processing older stopped meetings, the menu SHALL allow starting a meeting recording for each configured launch profile.
When a meeting is actively recording, the menu SHALL allow stopping the recording and continuing transcription/summary generation.
During an active recording, the normal stop action SHALL be labeled `Finish meeting` and SHALL be the only action in a dedicated menu section immediately below the `Open agent` section.
During an active recording, pause/unpause, microphone selection, cancel/discard, and profile-switch actions SHALL appear in a separate fine-grained controls section below `Finish meeting`.
When a meeting is actively recording and transcription is running, the menu SHALL expose `Pause transcription`.
When a meeting is actively recording and transcription is paused, the menu SHALL expose `Unpause transcription` and SHALL continue exposing `Finish meeting`.
When a meeting is actively recording, the menu SHALL allow canceling the recording and discarding that run's artifacts.
When a meeting is actively recording, the menu SHALL allow switching to each configured launch profile other than the current active profile.
Selecting Exit while Meeting Assistant is idle SHALL stop the application without an additional confirmation prompt.
Selecting Exit while Meeting Assistant is recording, transcribing, recognizing speakers, or summarizing SHALL show a confirmation dialog before stopping the application.
#### Scenario: Idle tray menu can start configured profiles
- **GIVEN** launch profiles `default` and `english` are configured
- **AND** no meeting recording is active
- **WHEN** the taskbar menu is opened
- **THEN** it offers start recording actions for `default` and `english`
#### Scenario: Recording tray menu prioritizes finishing the meeting
- **GIVEN** launch profiles `default` and `english` are configured
- **AND** a meeting is actively recording with profile `default`
- **WHEN** the taskbar menu is opened
- **THEN** `Finish meeting` is the only action in the section immediately below `Open agent`
- **AND** pause, microphone selection, cancel/discard, and switching to `english` appear in a separate following section
- **AND** the menu does not offer switching to `default`
#### Scenario: Tray pause action changes to unpause
- **GIVEN** a meeting is actively recording with transcription running
- **WHEN** the taskbar menu is opened
- **THEN** it offers `Pause transcription`
- **WHEN** transcription is paused and the taskbar menu is opened again
- **THEN** it offers `Unpause transcription`
- **AND** still offers `Finish meeting`
#### Scenario: Active recording has priority over older summarizing runs
- **GIVEN** an older meeting is still summarizing
- **WHEN** a newer meeting is actively recording
- **THEN** the taskbar icon indicates recording
#### Scenario: Tray menu always exposes Exit
- **GIVEN** Meeting Assistant is running
- **WHEN** the taskbar menu is opened
- **THEN** it offers an Exit action
#### Scenario: Idle Exit stops immediately
- **GIVEN** no recording, transcription, speaker recognition, or summary work is running
- **WHEN** the user selects Exit from the taskbar menu
- **THEN** Meeting Assistant stops the application without an additional confirmation prompt
#### Scenario: In-progress Exit asks for confirmation
- **GIVEN** Meeting Assistant is recording, transcribing, recognizing speakers, or summarizing
- **WHEN** the user selects Exit from the taskbar menu
- **THEN** Meeting Assistant asks for confirmation before stopping the application
### Requirement: Recording inactivity safeguard stops forgotten meetings
Meeting Assistant SHALL track transcript inactivity during an active recording from the later of meeting start, the most recent unpause, or the most recent live transcript segment that contains text.
Meeting Assistant SHALL show a stop prompt when transcript inactivity reaches configured prompt thresholds. The default thresholds SHALL be 2 minutes, 5 minutes, and 10 minutes.
On Windows, the stop prompt SHALL use a native Windows app notification with stop, continue, and pause-transcription action buttons.
On Windows, the stop prompt notification SHALL request reminder-style toast behavior and remain actionable for 1 minute.
The stop prompt SHALL ask whether to stop the meeting and SHALL provide affirmative, negative, and pause-transcription actions.
Showing or ignoring the stop prompt SHALL NOT block later inactivity checks, reminder prompts, or automatic stop.
If the user accepts the stop prompt, Meeting Assistant SHALL stop the recording normally, allowing transcription, speaker recognition, and summary generation to continue as for a normal stop.
If the user selects pause from the stop prompt, Meeting Assistant SHALL pause transcription for that same active meeting without finishing it.
When a new non-empty live transcript segment is written, Meeting Assistant SHALL dismiss all outstanding transcript-inactivity notifications and invalidate their pending actions.
While transcription is intentionally paused, Meeting Assistant SHALL NOT show transcript-inactivity prompts and SHALL NOT apply the ordinary transcript-inactivity auto-stop threshold.
Meeting Assistant SHALL normally stop a meeting that remains continuously paused for the configured maximum pause duration, defaulting to 4 hours, without first showing a transcript-inactivity notification. This maximum continuous-pause cutoff SHALL remain active when ordinary transcript-inactivity prompting and auto-stop are disabled.
When transcription is unpaused, Meeting Assistant SHALL clear the continuous-pause timer and restart transcript-inactivity timing from the unpause time.
Meeting Assistant SHALL automatically stop the recording normally when transcript inactivity reaches the configured auto-stop threshold, defaulting to 30 minutes.
When the inactivity safeguard stops a recording, Meeting Assistant SHALL infer the meeting end time from the most recent transcript segment timestamp plus configured padding, defaulting to 1 minute. If no transcript segment has arrived, Meeting Assistant SHALL infer the end time from the meeting start time plus the same padding.
When a recording stops normally and its meeting note, transcript, and assistant context contain no user-authored or captured content beyond generated default headings and metadata, Meeting Assistant SHALL delete the run artifacts instead of running summary generation.
#### Scenario: Inactive recording prompts the user
- **GIVEN** a recording is active
- **AND** no transcript text has arrived for the first configured inactivity prompt threshold
- **WHEN** the inactivity safeguard checks the active recording
- **THEN** Meeting Assistant prompts the user whether to stop the meeting with a native Windows app notification when running on Windows
- **AND** the notification offers pause transcription
- **AND** the notification remains actionable for 1 minute
- **AND** does not abort or discard meeting artifacts
#### Scenario: Ignored inactivity prompt does not block auto-stop
- **GIVEN** a recording is active
- **AND** the inactivity safeguard prompt was shown
- **WHEN** the user ignores the prompt until the automatic stop threshold is reached
- **THEN** Meeting Assistant stops the recording normally without waiting for a prompt response
#### Scenario: User accepts inactivity stop prompt
- **GIVEN** a recording is active
- **AND** the inactivity safeguard prompt is shown
- **WHEN** the user chooses to stop the meeting
- **THEN** Meeting Assistant stops the recording normally
- **AND** continues normal transcription and summary processing
- **AND** writes the inferred meeting end time to meeting artifacts
#### Scenario: User pauses from inactivity prompt
- **GIVEN** a recording is active
- **AND** the inactivity safeguard prompt is shown
- **WHEN** the user chooses to pause transcription
- **THEN** Meeting Assistant dismisses the outstanding inactivity notifications
- **AND** pauses transcription without finishing the meeting
#### Scenario: Inactive recording automatically stops
- **GIVEN** a recording is active
- **AND** no transcript text has arrived through the configured automatic stop threshold
- **WHEN** the inactivity safeguard checks the active recording
- **THEN** Meeting Assistant stops the recording normally without aborting artifacts
- **AND** writes the inferred meeting end time to meeting artifacts
#### Scenario: New transcript text resets inactivity prompts
- **GIVEN** a recording is active
- **AND** one or more inactivity prompts were shown
- **WHEN** a new transcript segment with text is written
- **AND** the segment belongs to that active recording
- **THEN** Meeting Assistant dismisses every outstanding inactivity notification
- **AND** invalidates their pending actions
- **AND** resets the inactivity prompt schedule from that transcript arrival
#### Scenario: Paused transcription suppresses inactivity safeguard
- **GIVEN** an active meeting transcription is paused
- **WHEN** configured transcript-inactivity prompt or automatic-stop thresholds pass before the maximum pause duration
- **THEN** Meeting Assistant does not show an inactivity prompt
- **AND** does not stop the meeting for transcript inactivity
- **WHEN** transcription is unpaused
- **THEN** inactivity timing restarts from the unpause time
#### Scenario: Continuously paused meeting is stopped after four hours
- **GIVEN** an active meeting transcription is paused continuously
- **WHEN** the configured maximum pause duration of 4 hours is reached
- **THEN** Meeting Assistant does not show a transcript-inactivity notification
- **AND** stops the meeting normally
#### Scenario: Maximum pause remains active when transcript-inactivity handling is disabled
- **GIVEN** ordinary transcript-inactivity prompting and auto-stop are disabled
- **AND** an active meeting transcription is paused continuously
- **WHEN** the configured maximum pause duration is reached
- **THEN** Meeting Assistant stops the meeting normally without an inactivity notification
#### Scenario: An older run cannot dismiss a current run's notification
- **GIVEN** an older stopped meeting is still draining transcription
- **AND** a newer active meeting has an outstanding transcript-inactivity notification
- **WHEN** the older meeting writes a late transcript segment
- **THEN** the newer meeting's notification and pending actions remain active
#### Scenario: Empty stopped recording is cleaned up
- **GIVEN** a recording is active
- **AND** the meeting note, transcript, and assistant context only contain generated default content
- **WHEN** the recording stops normally
- **THEN** Meeting Assistant deletes the run artifacts
- **AND** does not run summary generation
@@ -0,0 +1,28 @@
## ADDED Requirements
### Requirement: Streaming recognition sessions survive intentional transcription pauses
Meeting Assistant SHALL preserve the active streaming speech-recognition pipeline and transcript session while transcription is intentionally paused.
For every mixed audio chunk captured while paused, Meeting Assistant SHALL discard the captured sample values and SHALL send an equal-duration PCM silence chunk to the temporary recording, live speaker audio buffer, and configured speech-recognition pipeline.
Meeting Assistant SHALL NOT clear run-local speaker mappings or previously collected speaker samples when transcription is paused or unpaused.
When Azure Speech is the configured provider, Meeting Assistant SHALL keep the same active `ConversationTranscriber` operation and push audio stream across the pause rather than stopping and recreating the Azure recognition session.
#### Scenario: Paused audio is replaced with silence
- **GIVEN** an active meeting transcription is paused
- **WHEN** the audio source captures a non-silent mixed audio chunk
- **THEN** the temporary recording and speech-recognition pipeline receive an equal-length silent chunk
- **AND** neither receives the captured sample values
#### Scenario: Azure session remains active across pause
- **GIVEN** Azure Speech is transcribing an active meeting with speaker attribution
- **WHEN** transcription is paused and later unpaused
- **THEN** Meeting Assistant keeps the same conversation transcriber and push stream active
- **AND** preserves run-local speaker mappings and collected speaker samples
- **AND** newly captured audio after unpause continues through that session
#### Scenario: Buffered pre-pause result is retained
- **GIVEN** the transcription backend accepted audio before transcription was paused
- **WHEN** the corresponding transcript result arrives after the pause begins
- **THEN** Meeting Assistant writes that transcript result to the same meeting transcript