meeting-noter 0.7.0__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of meeting-noter might be problematic. Click here for more details.
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/PKG-INFO +2 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/pyproject.toml +57 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/__init__.py +1 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/audio/encoder.py +8 -3
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/cli.py +211 -27
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/config.py +11 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/daemon.py +80 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/mic_monitor.py +3 -0
- meeting_noter-1.1.0/src/meeting_noter/transcription/live_transcription.py +250 -0
- meeting_noter-1.1.0/src/meeting_noter/update_checker.py +65 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/PKG-INFO +2 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/SOURCES.txt +9 -1
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/entry_points.txt +1 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/requires.txt +1 -0
- meeting_noter-1.1.0/tests/test_cli.py +804 -0
- meeting_noter-1.1.0/tests/test_config.py +297 -0
- meeting_noter-1.1.0/tests/test_daemon.py +917 -0
- meeting_noter-1.1.0/tests/test_meeting_detector.py +641 -0
- meeting_noter-1.1.0/tests/test_mic_monitor.py +596 -0
- meeting_noter-1.1.0/tests/test_output_writer.py +205 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/README.md +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/setup.cfg +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/__main__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/audio/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/audio/capture.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/audio/system_audio.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/__main__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/app.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/main_window.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/meetings_tab.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/recording_tab.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/gui/settings_tab.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/install/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/install/macos.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/meeting_detector.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/menubar.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/output/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/output/writer.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon.icns +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_128.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_16.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_256.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_32.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_512.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/resources/icon_64.png +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/transcription/__init__.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter/transcription/engine.py +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/dependency_links.txt +0 -0
- {meeting_noter-0.7.0 → meeting_noter-1.1.0}/src/meeting_noter.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meeting-noter
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Offline meeting transcription for macOS with automatic meeting detection
|
|
5
5
|
Author: Victor
|
|
6
6
|
License: MIT
|
|
@@ -40,6 +40,7 @@ Requires-Dist: meeting-noter-models>=0.1.0; extra == "offline"
|
|
|
40
40
|
Provides-Extra: dev
|
|
41
41
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
42
42
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
43
44
|
Requires-Dist: black; extra == "dev"
|
|
44
45
|
Requires-Dist: ruff; extra == "dev"
|
|
45
46
|
Requires-Dist: mypy; extra == "dev"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "meeting-noter"
|
|
7
|
-
version = "
|
|
7
|
+
version = "1.1.0"
|
|
8
8
|
description = "Offline meeting transcription for macOS with automatic meeting detection"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -51,6 +51,7 @@ offline = [
|
|
|
51
51
|
dev = [
|
|
52
52
|
"pytest>=7.0",
|
|
53
53
|
"pytest-cov",
|
|
54
|
+
"pytest-mock",
|
|
54
55
|
"black",
|
|
55
56
|
"ruff",
|
|
56
57
|
"mypy",
|
|
@@ -58,6 +59,7 @@ dev = [
|
|
|
58
59
|
|
|
59
60
|
[project.scripts]
|
|
60
61
|
meeting-noter = "meeting_noter.cli:cli"
|
|
62
|
+
mn = "meeting_noter.cli:cli"
|
|
61
63
|
|
|
62
64
|
[project.urls]
|
|
63
65
|
Homepage = "https://github.com/tech4vision/meeting-noter"
|
|
@@ -77,3 +79,57 @@ target-version = ["py39", "py310", "py311", "py312"]
|
|
|
77
79
|
[tool.ruff]
|
|
78
80
|
line-length = 100
|
|
79
81
|
select = ["E", "F", "I", "N", "W"]
|
|
82
|
+
|
|
83
|
+
[tool.pytest.ini_options]
|
|
84
|
+
testpaths = ["tests"]
|
|
85
|
+
python_files = ["test_*.py"]
|
|
86
|
+
python_functions = ["test_*"]
|
|
87
|
+
addopts = [
|
|
88
|
+
"--cov=meeting_noter",
|
|
89
|
+
"--cov-report=term-missing",
|
|
90
|
+
"--cov-report=html",
|
|
91
|
+
"-v",
|
|
92
|
+
]
|
|
93
|
+
filterwarnings = [
|
|
94
|
+
"ignore::DeprecationWarning",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[tool.coverage.run]
|
|
98
|
+
source = ["src/meeting_noter"]
|
|
99
|
+
branch = true
|
|
100
|
+
omit = [
|
|
101
|
+
"*/gui/*",
|
|
102
|
+
"*/menubar.py",
|
|
103
|
+
"*/__main__.py",
|
|
104
|
+
"*/audio/system_audio.py", # ScreenCaptureKit-based, requires macOS runtime
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[tool.coverage.report]
|
|
108
|
+
exclude_lines = [
|
|
109
|
+
"pragma: no cover",
|
|
110
|
+
"def __repr__",
|
|
111
|
+
"raise NotImplementedError",
|
|
112
|
+
"if TYPE_CHECKING:",
|
|
113
|
+
"if __name__ == .__main__.:",
|
|
114
|
+
# Exclude macOS-specific framework code that can't be unit tested
|
|
115
|
+
"import ScreenCaptureKit",
|
|
116
|
+
"import CoreMedia",
|
|
117
|
+
"import AppKit",
|
|
118
|
+
"from AppKit import",
|
|
119
|
+
"from EventKit import",
|
|
120
|
+
"from Foundation import NSObject",
|
|
121
|
+
"from libdispatch import",
|
|
122
|
+
"from dispatch import",
|
|
123
|
+
"class StreamOutput",
|
|
124
|
+
"def stream_didOutputSampleBuffer_ofType_",
|
|
125
|
+
"def stream_didStopWithError_",
|
|
126
|
+
"except ImportError:",
|
|
127
|
+
# Exclude daemon fork code (requires OS process fork)
|
|
128
|
+
"def daemonize",
|
|
129
|
+
"os.fork()",
|
|
130
|
+
"os.setsid()",
|
|
131
|
+
"os.chdir",
|
|
132
|
+
"os.dup2",
|
|
133
|
+
"sys.exit(0)",
|
|
134
|
+
"sys.exit(1)",
|
|
135
|
+
]
|
|
@@ -105,12 +105,17 @@ class MP3Encoder:
|
|
|
105
105
|
|
|
106
106
|
def finalize(self) -> bytes:
|
|
107
107
|
"""Finalize encoding."""
|
|
108
|
-
if self._process is not None
|
|
108
|
+
if self._process is not None:
|
|
109
109
|
try:
|
|
110
|
-
self._process.stdin
|
|
110
|
+
if self._process.stdin is not None:
|
|
111
|
+
self._process.stdin.close()
|
|
111
112
|
except Exception:
|
|
112
113
|
pass
|
|
113
|
-
|
|
114
|
+
try:
|
|
115
|
+
self._process.wait(timeout=5.0)
|
|
116
|
+
except subprocess.TimeoutExpired:
|
|
117
|
+
self._process.kill()
|
|
118
|
+
self._process.wait()
|
|
114
119
|
self._process = None
|
|
115
120
|
return b""
|
|
116
121
|
|
|
@@ -104,10 +104,46 @@ def _launch_gui_background():
|
|
|
104
104
|
click.echo("Meeting Noter GUI launched.")
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
def _handle_version():
|
|
108
|
+
"""Handle --version: show version, check for updates, auto-update if enabled."""
|
|
109
|
+
import subprocess
|
|
110
|
+
|
|
111
|
+
from meeting_noter.update_checker import check_for_update
|
|
112
|
+
|
|
113
|
+
config = get_config()
|
|
114
|
+
|
|
115
|
+
click.echo(f"meeting-noter {__version__}")
|
|
116
|
+
|
|
117
|
+
# Check for updates
|
|
118
|
+
click.echo("Checking for updates...", nl=False)
|
|
119
|
+
new_version = check_for_update()
|
|
120
|
+
|
|
121
|
+
if new_version:
|
|
122
|
+
click.echo(f" update available: {new_version}")
|
|
123
|
+
|
|
124
|
+
if config.auto_update:
|
|
125
|
+
click.echo(f"Auto-updating to {new_version}...")
|
|
126
|
+
result = subprocess.run(
|
|
127
|
+
["pipx", "upgrade", "meeting-noter"],
|
|
128
|
+
capture_output=True,
|
|
129
|
+
text=True,
|
|
130
|
+
)
|
|
131
|
+
if result.returncode == 0:
|
|
132
|
+
click.echo(click.style(f"Updated to {new_version}", fg="green"))
|
|
133
|
+
else:
|
|
134
|
+
click.echo(click.style("Update failed. Run manually:", fg="yellow"))
|
|
135
|
+
click.echo(" pipx upgrade meeting-noter")
|
|
136
|
+
else:
|
|
137
|
+
click.echo("Run to update: pipx upgrade meeting-noter")
|
|
138
|
+
click.echo("Or enable auto-update: mn config auto-update true")
|
|
139
|
+
else:
|
|
140
|
+
click.echo(" up to date")
|
|
141
|
+
|
|
142
|
+
|
|
107
143
|
@click.group(cls=SuggestGroup, invoke_without_command=True)
|
|
108
|
-
@click.
|
|
144
|
+
@click.option("--version", "-V", is_flag=True, help="Show version and check for updates")
|
|
109
145
|
@click.pass_context
|
|
110
|
-
def cli(ctx):
|
|
146
|
+
def cli(ctx, version):
|
|
111
147
|
"""Meeting Noter - Offline meeting transcription.
|
|
112
148
|
|
|
113
149
|
\b
|
|
@@ -124,6 +160,10 @@ def cli(ctx):
|
|
|
124
160
|
meeting-noter config whisper-model base.en Set transcription model
|
|
125
161
|
meeting-noter config auto-transcribe false Disable auto-transcribe
|
|
126
162
|
"""
|
|
163
|
+
if version:
|
|
164
|
+
_handle_version()
|
|
165
|
+
ctx.exit(0)
|
|
166
|
+
|
|
127
167
|
if ctx.invoked_subcommand is None:
|
|
128
168
|
# No subcommand - start background watcher
|
|
129
169
|
ctx.invoke(watcher)
|
|
@@ -131,8 +171,9 @@ def cli(ctx):
|
|
|
131
171
|
|
|
132
172
|
@cli.command()
|
|
133
173
|
@click.argument("name", required=False)
|
|
174
|
+
@click.option("--live", "-l", is_flag=True, help="Show live transcription in terminal")
|
|
134
175
|
@require_setup
|
|
135
|
-
def start(name: Optional[str]):
|
|
176
|
+
def start(name: Optional[str], live: bool):
|
|
136
177
|
"""Start an interactive foreground recording session.
|
|
137
178
|
|
|
138
179
|
NAME is the meeting name (optional). If not provided, uses a timestamp
|
|
@@ -141,11 +182,14 @@ def start(name: Optional[str]):
|
|
|
141
182
|
Examples:
|
|
142
183
|
meeting-noter start # Uses timestamp name
|
|
143
184
|
meeting-noter start "Weekly Standup" # Uses custom name
|
|
185
|
+
meeting-noter start "Meeting" --live # With live transcription
|
|
144
186
|
|
|
145
187
|
Press Ctrl+C to stop recording. The recording will be automatically
|
|
146
188
|
transcribed if auto_transcribe is enabled in settings.
|
|
147
189
|
"""
|
|
148
190
|
from meeting_noter.daemon import run_foreground_capture
|
|
191
|
+
import threading
|
|
192
|
+
import time
|
|
149
193
|
|
|
150
194
|
config = get_config()
|
|
151
195
|
output_dir = config.recordings_dir
|
|
@@ -154,14 +198,59 @@ def start(name: Optional[str]):
|
|
|
154
198
|
# Use default timestamp name if not provided
|
|
155
199
|
meeting_name = name if name else generate_meeting_name()
|
|
156
200
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
201
|
+
# Live transcription display thread
|
|
202
|
+
stop_live_display = threading.Event()
|
|
203
|
+
|
|
204
|
+
def display_live_transcript():
|
|
205
|
+
"""Background thread to display live transcription."""
|
|
206
|
+
live_dir = output_dir / "live"
|
|
207
|
+
last_content = ""
|
|
208
|
+
|
|
209
|
+
# Wait for live file to appear
|
|
210
|
+
while not stop_live_display.is_set():
|
|
211
|
+
live_files = list(live_dir.glob("*.live.txt")) if live_dir.exists() else []
|
|
212
|
+
if live_files:
|
|
213
|
+
live_file = max(live_files, key=lambda p: p.stat().st_mtime)
|
|
214
|
+
break
|
|
215
|
+
time.sleep(0.5)
|
|
216
|
+
else:
|
|
217
|
+
return
|
|
218
|
+
|
|
219
|
+
# Tail the file
|
|
220
|
+
while not stop_live_display.is_set():
|
|
221
|
+
try:
|
|
222
|
+
content = live_file.read_text()
|
|
223
|
+
if len(content) > len(last_content):
|
|
224
|
+
new_content = content[len(last_content):]
|
|
225
|
+
for line in new_content.splitlines():
|
|
226
|
+
# Only show timestamp lines (transcriptions)
|
|
227
|
+
if line.strip() and line.startswith("["):
|
|
228
|
+
click.echo(click.style(line, fg="cyan"))
|
|
229
|
+
last_content = content
|
|
230
|
+
except Exception:
|
|
231
|
+
pass
|
|
232
|
+
time.sleep(0.5)
|
|
233
|
+
|
|
234
|
+
# Start live display thread if requested
|
|
235
|
+
live_thread = None
|
|
236
|
+
if live:
|
|
237
|
+
click.echo(click.style("Live transcription enabled", fg="cyan"))
|
|
238
|
+
live_thread = threading.Thread(target=display_live_transcript, daemon=True)
|
|
239
|
+
live_thread.start()
|
|
240
|
+
|
|
241
|
+
try:
|
|
242
|
+
run_foreground_capture(
|
|
243
|
+
output_dir=output_dir,
|
|
244
|
+
meeting_name=meeting_name,
|
|
245
|
+
auto_transcribe=config.auto_transcribe,
|
|
246
|
+
whisper_model=config.whisper_model,
|
|
247
|
+
transcripts_dir=config.transcripts_dir,
|
|
248
|
+
silence_timeout_minutes=config.silence_timeout,
|
|
249
|
+
)
|
|
250
|
+
finally:
|
|
251
|
+
stop_live_display.set()
|
|
252
|
+
if live_thread:
|
|
253
|
+
live_thread.join(timeout=1.0)
|
|
165
254
|
|
|
166
255
|
|
|
167
256
|
@cli.command(hidden=True) # Internal command used by watcher
|
|
@@ -355,7 +444,13 @@ def logs(follow: bool, lines: int):
|
|
|
355
444
|
)
|
|
356
445
|
@require_setup
|
|
357
446
|
def list_recordings(output_dir: Optional[str], limit: int):
|
|
358
|
-
"""List recent meeting recordings.
|
|
447
|
+
"""List recent meeting recordings.
|
|
448
|
+
|
|
449
|
+
\b
|
|
450
|
+
Examples:
|
|
451
|
+
meeting-noter list # Show last 10 recordings
|
|
452
|
+
meeting-noter list -n 20 # Show last 20 recordings
|
|
453
|
+
"""
|
|
359
454
|
from meeting_noter.output.writer import list_recordings as _list_recordings
|
|
360
455
|
|
|
361
456
|
config = get_config()
|
|
@@ -377,28 +472,116 @@ def list_recordings(output_dir: Optional[str], limit: int):
|
|
|
377
472
|
default=None,
|
|
378
473
|
help="Whisper model size (overrides config)",
|
|
379
474
|
)
|
|
380
|
-
@click.option(
|
|
381
|
-
"--live", "-l",
|
|
382
|
-
is_flag=True,
|
|
383
|
-
help="Real-time transcription of current recording",
|
|
384
|
-
)
|
|
385
475
|
@require_setup
|
|
386
|
-
def transcribe(file: Optional[str], output_dir: Optional[str], model: Optional[str]
|
|
476
|
+
def transcribe(file: Optional[str], output_dir: Optional[str], model: Optional[str]):
|
|
387
477
|
"""Transcribe a meeting recording.
|
|
388
478
|
|
|
389
|
-
|
|
390
|
-
|
|
479
|
+
\b
|
|
480
|
+
Examples:
|
|
481
|
+
meeting-noter transcribe # Transcribe latest recording
|
|
482
|
+
meeting-noter transcribe recording.mp3 # Transcribe specific file
|
|
483
|
+
meeting-noter transcribe -m base.en # Use larger model for accuracy
|
|
391
484
|
"""
|
|
392
|
-
from meeting_noter.transcription.engine import transcribe_file
|
|
485
|
+
from meeting_noter.transcription.engine import transcribe_file
|
|
393
486
|
|
|
394
487
|
config = get_config()
|
|
395
488
|
output_path = Path(output_dir) if output_dir else config.recordings_dir
|
|
396
489
|
whisper_model = model or config.whisper_model
|
|
397
490
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
491
|
+
transcribe_file(file, output_path, whisper_model, config.transcripts_dir)
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
@cli.command()
|
|
495
|
+
@require_setup
|
|
496
|
+
def live():
|
|
497
|
+
"""Show live transcription of an active recording.
|
|
498
|
+
|
|
499
|
+
Displays the real-time transcript as it's being generated.
|
|
500
|
+
Use in a separate terminal while recording with 'meeting-noter start'.
|
|
501
|
+
|
|
502
|
+
\b
|
|
503
|
+
Examples:
|
|
504
|
+
# Terminal 1: Start recording
|
|
505
|
+
meeting-noter start "Team Meeting"
|
|
506
|
+
|
|
507
|
+
# Terminal 2: Watch live transcript
|
|
508
|
+
meeting-noter live
|
|
509
|
+
|
|
510
|
+
Or use 'meeting-noter start "name" --live' to see both in one terminal.
|
|
511
|
+
"""
|
|
512
|
+
import time
|
|
513
|
+
|
|
514
|
+
config = get_config()
|
|
515
|
+
live_dir = config.recordings_dir / "live"
|
|
516
|
+
|
|
517
|
+
# Find the most recent .live.txt file in the live/ subfolder
|
|
518
|
+
if not live_dir.exists():
|
|
519
|
+
click.echo(click.style("No live transcript found.", fg="yellow"))
|
|
520
|
+
click.echo("Start a recording with: meeting-noter start")
|
|
521
|
+
return
|
|
522
|
+
|
|
523
|
+
live_files = sorted(
|
|
524
|
+
live_dir.glob("*.live.txt"),
|
|
525
|
+
key=lambda p: p.stat().st_mtime,
|
|
526
|
+
reverse=True,
|
|
527
|
+
)
|
|
528
|
+
|
|
529
|
+
if not live_files:
|
|
530
|
+
click.echo(click.style("No live transcript found.", fg="yellow"))
|
|
531
|
+
click.echo("Start a recording with: meeting-noter start")
|
|
532
|
+
return
|
|
533
|
+
|
|
534
|
+
live_file = live_files[0]
|
|
535
|
+
|
|
536
|
+
# Check if file is actively being written (modified in last 30 seconds)
|
|
537
|
+
file_age = time.time() - live_file.stat().st_mtime
|
|
538
|
+
if file_age > 30:
|
|
539
|
+
click.echo(click.style("No active recording found.", fg="yellow"))
|
|
540
|
+
click.echo(f"Most recent transcript ({live_file.name}) is {int(file_age)}s old.")
|
|
541
|
+
click.echo("Start a recording with: meeting-noter start")
|
|
542
|
+
return
|
|
543
|
+
|
|
544
|
+
click.echo(click.style("Live Transcription", fg="cyan", bold=True))
|
|
545
|
+
click.echo(f"Source: {live_file.name.replace('.live.txt', '.mp3')}")
|
|
546
|
+
click.echo("Press Ctrl+C to stop watching.\n")
|
|
547
|
+
click.echo("-" * 40)
|
|
548
|
+
|
|
549
|
+
# Tail the file
|
|
550
|
+
try:
|
|
551
|
+
last_content = ""
|
|
552
|
+
no_update_count = 0
|
|
553
|
+
|
|
554
|
+
while True:
|
|
555
|
+
try:
|
|
556
|
+
with open(live_file, "r") as f:
|
|
557
|
+
content = f.read()
|
|
558
|
+
|
|
559
|
+
# Print only new content
|
|
560
|
+
if len(content) > len(last_content):
|
|
561
|
+
new_content = content[len(last_content):]
|
|
562
|
+
# Print line by line for better formatting
|
|
563
|
+
for line in new_content.splitlines():
|
|
564
|
+
if line.strip():
|
|
565
|
+
click.echo(line)
|
|
566
|
+
last_content = content
|
|
567
|
+
no_update_count = 0
|
|
568
|
+
else:
|
|
569
|
+
no_update_count += 1
|
|
570
|
+
|
|
571
|
+
# Check if file hasn't been updated for 30+ seconds (recording likely ended)
|
|
572
|
+
file_age = time.time() - live_file.stat().st_mtime
|
|
573
|
+
if file_age > 30 and no_update_count > 5:
|
|
574
|
+
click.echo("\n" + click.style("Recording ended.", fg="yellow"))
|
|
575
|
+
break
|
|
576
|
+
|
|
577
|
+
except FileNotFoundError:
|
|
578
|
+
click.echo("\n" + click.style("Live transcript file removed.", fg="yellow"))
|
|
579
|
+
break
|
|
580
|
+
|
|
581
|
+
time.sleep(1)
|
|
582
|
+
|
|
583
|
+
except KeyboardInterrupt:
|
|
584
|
+
click.echo("\n" + click.style("Stopped watching.", fg="cyan"))
|
|
402
585
|
|
|
403
586
|
|
|
404
587
|
@cli.command()
|
|
@@ -463,6 +646,7 @@ CONFIG_KEYS = {
|
|
|
463
646
|
"transcripts-dir": ("transcripts_dir", "path", "Directory for transcripts"),
|
|
464
647
|
"whisper-model": ("whisper_model", "choice:tiny.en,base.en,small.en,medium.en,large-v3", "Whisper model for transcription"),
|
|
465
648
|
"auto-transcribe": ("auto_transcribe", "bool", "Auto-transcribe after recording"),
|
|
649
|
+
"auto-update": ("auto_update", "bool", "Auto-update when running --version"),
|
|
466
650
|
"silence-timeout": ("silence_timeout", "int", "Minutes of silence before auto-stop"),
|
|
467
651
|
"capture-system-audio": ("capture_system_audio", "bool", "Capture meeting participants via ScreenCaptureKit"),
|
|
468
652
|
}
|
|
@@ -553,7 +737,7 @@ def config(key: Optional[str], value: Optional[str]):
|
|
|
553
737
|
WATCHER_PID_FILE = Path.home() / ".meeting-noter-watcher.pid"
|
|
554
738
|
|
|
555
739
|
|
|
556
|
-
@cli.command()
|
|
740
|
+
@cli.command(hidden=True)
|
|
557
741
|
@click.option(
|
|
558
742
|
"--foreground", "-f",
|
|
559
743
|
is_flag=True,
|
|
@@ -665,7 +849,7 @@ def _run_watcher_loop():
|
|
|
665
849
|
stop_daemon(DEFAULT_PID_FILE)
|
|
666
850
|
|
|
667
851
|
|
|
668
|
-
@cli.command()
|
|
852
|
+
@cli.command(hidden=True)
|
|
669
853
|
@require_setup
|
|
670
854
|
def watch():
|
|
671
855
|
"""Watch for meetings interactively (foreground with prompts).
|
|
@@ -32,6 +32,7 @@ DEFAULT_CONFIG = {
|
|
|
32
32
|
"transcripts_dir": str(Path.home() / "meetings"),
|
|
33
33
|
"whisper_model": "tiny.en",
|
|
34
34
|
"auto_transcribe": True,
|
|
35
|
+
"auto_update": True, # Auto-update when running --version
|
|
35
36
|
"silence_timeout": 5, # Minutes of silence before stopping recording
|
|
36
37
|
"capture_system_audio": True, # Capture other participants via ScreenCaptureKit
|
|
37
38
|
"show_menubar": False,
|
|
@@ -139,6 +140,16 @@ class Config:
|
|
|
139
140
|
"""Set show menubar setting."""
|
|
140
141
|
self._data["show_menubar"] = value
|
|
141
142
|
|
|
143
|
+
@property
|
|
144
|
+
def auto_update(self) -> bool:
|
|
145
|
+
"""Get auto-update setting."""
|
|
146
|
+
return self._data.get("auto_update", True)
|
|
147
|
+
|
|
148
|
+
@auto_update.setter
|
|
149
|
+
def auto_update(self, value: bool) -> None:
|
|
150
|
+
"""Set auto-update setting."""
|
|
151
|
+
self._data["auto_update"] = value
|
|
152
|
+
|
|
142
153
|
@property
|
|
143
154
|
def setup_complete(self) -> bool:
|
|
144
155
|
"""Check if setup has been completed."""
|
|
@@ -157,7 +157,11 @@ def run_daemon(
|
|
|
157
157
|
remove_pid_file(pid_file)
|
|
158
158
|
|
|
159
159
|
|
|
160
|
-
def _run_capture_loop(
|
|
160
|
+
def _run_capture_loop(
|
|
161
|
+
output_dir: Path,
|
|
162
|
+
meeting_name: Optional[str] = None,
|
|
163
|
+
enable_live_transcription: bool = True,
|
|
164
|
+
):
|
|
161
165
|
"""Main capture loop.
|
|
162
166
|
|
|
163
167
|
Audio imports happen HERE, safely AFTER the fork.
|
|
@@ -171,6 +175,16 @@ def _run_capture_loop(output_dir: Path, meeting_name: Optional[str] = None):
|
|
|
171
175
|
|
|
172
176
|
config = get_config()
|
|
173
177
|
|
|
178
|
+
# Live transcription (imported here to avoid loading Whisper before fork)
|
|
179
|
+
live_transcriber = None
|
|
180
|
+
if enable_live_transcription:
|
|
181
|
+
try:
|
|
182
|
+
from meeting_noter.transcription.live_transcription import LiveTranscriber
|
|
183
|
+
LiveTranscriber # Just verify import works, create later
|
|
184
|
+
except ImportError as e:
|
|
185
|
+
print(f"Live transcription not available: {e}")
|
|
186
|
+
enable_live_transcription = False
|
|
187
|
+
|
|
174
188
|
print(f"Meeting Noter daemon started. Saving to {output_dir}")
|
|
175
189
|
sys.stdout.flush()
|
|
176
190
|
if meeting_name:
|
|
@@ -253,15 +267,42 @@ def _run_capture_loop(output_dir: Path, meeting_name: Optional[str] = None):
|
|
|
253
267
|
print(f"Recording started: {filepath.name}")
|
|
254
268
|
recording_started = True
|
|
255
269
|
audio_detected = True
|
|
270
|
+
|
|
271
|
+
# Start live transcription
|
|
272
|
+
if enable_live_transcription:
|
|
273
|
+
try:
|
|
274
|
+
from meeting_noter.transcription.live_transcription import LiveTranscriber
|
|
275
|
+
live_transcriber = LiveTranscriber(
|
|
276
|
+
output_path=filepath,
|
|
277
|
+
sample_rate=sample_rate,
|
|
278
|
+
channels=channels,
|
|
279
|
+
window_seconds=5.0,
|
|
280
|
+
slide_seconds=2.0,
|
|
281
|
+
model_size=config.whisper_model,
|
|
282
|
+
)
|
|
283
|
+
live_transcriber.start()
|
|
284
|
+
print(f"Live transcription: {live_transcriber.live_file_path.name}")
|
|
285
|
+
except Exception as e:
|
|
286
|
+
print(f"Failed to start live transcription: {e}")
|
|
287
|
+
live_transcriber = None
|
|
256
288
|
else:
|
|
257
289
|
# Currently recording
|
|
258
290
|
session.write(audio)
|
|
259
291
|
|
|
292
|
+
# Feed audio to live transcriber
|
|
293
|
+
if live_transcriber is not None:
|
|
294
|
+
live_transcriber.write(audio)
|
|
295
|
+
|
|
260
296
|
if has_audio:
|
|
261
297
|
audio_detected = True
|
|
262
298
|
|
|
263
299
|
# Check for extended silence (meeting ended)
|
|
264
300
|
if is_silence and audio_detected:
|
|
301
|
+
# Stop live transcription first
|
|
302
|
+
if live_transcriber is not None:
|
|
303
|
+
live_transcriber.stop()
|
|
304
|
+
live_transcriber = None
|
|
305
|
+
|
|
265
306
|
filepath, duration = session.stop()
|
|
266
307
|
if filepath:
|
|
267
308
|
print(f"Recording saved: {filepath.name} ({duration:.1f}s)")
|
|
@@ -275,6 +316,10 @@ def _run_capture_loop(output_dir: Path, meeting_name: Optional[str] = None):
|
|
|
275
316
|
finally:
|
|
276
317
|
capture.stop()
|
|
277
318
|
|
|
319
|
+
# Stop live transcription
|
|
320
|
+
if live_transcriber is not None:
|
|
321
|
+
live_transcriber.stop()
|
|
322
|
+
|
|
278
323
|
# Save any ongoing recording
|
|
279
324
|
if 'session' in locals() and session.is_active:
|
|
280
325
|
filepath, duration = session.stop()
|
|
@@ -377,6 +422,7 @@ def run_foreground_capture(
|
|
|
377
422
|
whisper_model: str = "tiny.en",
|
|
378
423
|
transcripts_dir: Optional[Path] = None,
|
|
379
424
|
silence_timeout_minutes: int = 5,
|
|
425
|
+
enable_live_transcription: bool = True,
|
|
380
426
|
) -> Optional[Path]:
|
|
381
427
|
"""Run audio capture in foreground with a named meeting.
|
|
382
428
|
|
|
@@ -390,6 +436,7 @@ def run_foreground_capture(
|
|
|
390
436
|
whisper_model: Whisper model to use for transcription
|
|
391
437
|
transcripts_dir: Directory for transcripts
|
|
392
438
|
silence_timeout_minutes: Stop after this many minutes of silence
|
|
439
|
+
enable_live_transcription: Whether to enable real-time transcription
|
|
393
440
|
|
|
394
441
|
Returns:
|
|
395
442
|
Path to the saved recording, or None if recording was too short
|
|
@@ -401,6 +448,9 @@ def run_foreground_capture(
|
|
|
401
448
|
|
|
402
449
|
config = get_config()
|
|
403
450
|
|
|
451
|
+
# Initialize live transcriber
|
|
452
|
+
live_transcriber = None
|
|
453
|
+
|
|
404
454
|
# Check audio device
|
|
405
455
|
if not check_audio_available():
|
|
406
456
|
click.echo(click.style("Error: ", fg="red") + "No audio input device found.")
|
|
@@ -461,6 +511,27 @@ def run_foreground_capture(
|
|
|
461
511
|
filepath = session.start()
|
|
462
512
|
click.echo(click.style("Recording: ", fg="green") + filepath.name)
|
|
463
513
|
|
|
514
|
+
# Start live transcription
|
|
515
|
+
if enable_live_transcription:
|
|
516
|
+
try:
|
|
517
|
+
from meeting_noter.transcription.live_transcription import LiveTranscriber
|
|
518
|
+
live_transcriber = LiveTranscriber(
|
|
519
|
+
output_path=filepath,
|
|
520
|
+
sample_rate=sample_rate,
|
|
521
|
+
channels=channels,
|
|
522
|
+
window_seconds=5.0,
|
|
523
|
+
slide_seconds=2.0,
|
|
524
|
+
model_size=whisper_model,
|
|
525
|
+
)
|
|
526
|
+
live_transcriber.start()
|
|
527
|
+
click.echo(
|
|
528
|
+
click.style("Live transcript: ", fg="cyan") +
|
|
529
|
+
str(live_transcriber.live_file_path)
|
|
530
|
+
)
|
|
531
|
+
except Exception as e:
|
|
532
|
+
click.echo(click.style(f"Live transcription not available: {e}", fg="yellow"))
|
|
533
|
+
live_transcriber = None
|
|
534
|
+
|
|
464
535
|
while not _stop_event.is_set():
|
|
465
536
|
audio = capture.get_audio(timeout=0.5)
|
|
466
537
|
if audio is None:
|
|
@@ -472,6 +543,10 @@ def run_foreground_capture(
|
|
|
472
543
|
|
|
473
544
|
session.write(audio)
|
|
474
545
|
|
|
546
|
+
# Feed audio to live transcriber
|
|
547
|
+
if live_transcriber is not None:
|
|
548
|
+
live_transcriber.write(audio)
|
|
549
|
+
|
|
475
550
|
# Check for extended silence
|
|
476
551
|
if silence_detector.update(audio):
|
|
477
552
|
click.echo("\n" + click.style("Stopped: ", fg="yellow") + "silence timeout reached")
|
|
@@ -487,6 +562,10 @@ def run_foreground_capture(
|
|
|
487
562
|
except Exception as e:
|
|
488
563
|
click.echo(click.style(f"\nError: {e}", fg="red"))
|
|
489
564
|
finally:
|
|
565
|
+
# Stop live transcription
|
|
566
|
+
if live_transcriber is not None:
|
|
567
|
+
live_transcriber.stop()
|
|
568
|
+
|
|
490
569
|
capture.stop()
|
|
491
570
|
|
|
492
571
|
# Save recording
|
|
@@ -169,6 +169,9 @@ def is_meeting_app_active() -> Optional[str]:
|
|
|
169
169
|
|
|
170
170
|
# Browser-based meetings (Google Meet, etc.)
|
|
171
171
|
if any(browser in owner_lower for browser in ["chrome", "safari", "firefox", "edge", "brave", "arc"]):
|
|
172
|
+
# Skip video streaming sites (YouTube, Vimeo, etc.)
|
|
173
|
+
if any(x in title_lower for x in ["youtube", "vimeo", "twitch", "netflix"]):
|
|
174
|
+
continue
|
|
172
175
|
if title_lower.startswith("meet -") or "meet.google.com" in title_lower:
|
|
173
176
|
return "Google Meet"
|
|
174
177
|
if " meeting" in title_lower and any(x in title_lower for x in ["zoom", "teams", "webex"]):
|