cjm-transcript-segment-align 0.0.1__tar.gz → 0.0.2__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.
Files changed (29) hide show
  1. {cjm_transcript_segment_align-0.0.1/cjm_transcript_segment_align.egg-info → cjm_transcript_segment_align-0.0.2}/PKG-INFO +8 -8
  2. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/README.md +7 -7
  3. cjm_transcript_segment_align-0.0.2/cjm_transcript_segment_align/__init__.py +1 -0
  4. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/components/step_renderer.py +14 -53
  5. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/html_ids.py +4 -0
  6. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/routes/forced_alignment.py +5 -4
  7. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2/cjm_transcript_segment_align.egg-info}/PKG-INFO +8 -8
  8. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/settings.ini +15 -23
  9. cjm_transcript_segment_align-0.0.1/cjm_transcript_segment_align/__init__.py +0 -1
  10. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/LICENSE +0 -0
  11. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/MANIFEST.in +0 -0
  12. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/_modidx.py +0 -0
  13. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/components/__init__.py +0 -0
  14. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/components/handlers.py +0 -0
  15. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/components/helpers.py +0 -0
  16. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/components/keyboard_config.py +0 -0
  17. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/routes/__init__.py +0 -0
  18. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/routes/chrome.py +0 -0
  19. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/services/__init__.py +0 -0
  20. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align/services/forced_alignment.py +0 -0
  21. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/SOURCES.txt +0 -0
  22. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/dependency_links.txt +0 -0
  23. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/entry_points.txt +0 -0
  24. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/not-zip-safe +0 -0
  25. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/requires.txt +0 -0
  26. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/cjm_transcript_segment_align.egg-info/top_level.txt +0 -0
  27. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/pyproject.toml +0 -0
  28. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/setup.cfg +0 -0
  29. {cjm_transcript_segment_align-0.0.1 → cjm_transcript_segment_align-0.0.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cjm-transcript-segment-align
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: FastHTML dual-column text segmentation & VAD alignment UI for transcript decomposition workflows with forced alignment-based text splitting for aligning text segments with VAD chunks.
5
5
  Home-page: https://github.com/cj-mills/cjm-transcript-segment-align
6
6
  Author: Christian J. Mills
@@ -74,18 +74,18 @@ graph LR
74
74
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
75
75
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
76
76
 
77
- components_handlers --> components_step_renderer
78
- components_handlers --> html_ids
79
77
  components_handlers --> components_keyboard_config
78
+ components_handlers --> html_ids
79
+ components_handlers --> components_step_renderer
80
80
  components_keyboard_config --> html_ids
81
- components_step_renderer --> html_ids
82
- components_step_renderer --> components_keyboard_config
83
81
  components_step_renderer --> components_helpers
82
+ components_step_renderer --> components_keyboard_config
83
+ components_step_renderer --> html_ids
84
84
  routes_chrome --> html_ids
85
85
  routes_chrome --> components_keyboard_config
86
86
  routes_chrome --> components_step_renderer
87
- routes_forced_alignment --> components_step_renderer
88
87
  routes_forced_alignment --> html_ids
88
+ routes_forced_alignment --> components_step_renderer
89
89
  routes_forced_alignment --> services_forced_alignment
90
90
  ```
91
91
 
@@ -249,8 +249,8 @@ def init_forced_alignment_routers(
249
249
  #### Variables
250
250
 
251
251
  ``` python
252
- FA_CONTAINER_ID = 'sd-fa-controls'
253
- FA_STATUS_ID = 'sd-fa-status'
252
+ FA_CONTAINER_ID
253
+ FA_STATUS_ID
254
254
  ```
255
255
 
256
256
  ### forced_alignment (`forced_alignment.ipynb`)
@@ -39,18 +39,18 @@ graph LR
39
39
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
40
40
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
41
41
 
42
- components_handlers --> components_step_renderer
43
- components_handlers --> html_ids
44
42
  components_handlers --> components_keyboard_config
43
+ components_handlers --> html_ids
44
+ components_handlers --> components_step_renderer
45
45
  components_keyboard_config --> html_ids
46
- components_step_renderer --> html_ids
47
- components_step_renderer --> components_keyboard_config
48
46
  components_step_renderer --> components_helpers
47
+ components_step_renderer --> components_keyboard_config
48
+ components_step_renderer --> html_ids
49
49
  routes_chrome --> html_ids
50
50
  routes_chrome --> components_keyboard_config
51
51
  routes_chrome --> components_step_renderer
52
- routes_forced_alignment --> components_step_renderer
53
52
  routes_forced_alignment --> html_ids
53
+ routes_forced_alignment --> components_step_renderer
54
54
  routes_forced_alignment --> services_forced_alignment
55
55
  ```
56
56
 
@@ -214,8 +214,8 @@ def init_forced_alignment_routers(
214
214
  #### Variables
215
215
 
216
216
  ``` python
217
- FA_CONTAINER_ID = 'sd-fa-controls'
218
- FA_STATUS_ID = 'sd-fa-status'
217
+ FA_CONTAINER_ID
218
+ FA_STATUS_ID
219
219
  ```
220
220
 
221
221
  ### forced_alignment (`forced_alignment.ipynb`)
@@ -0,0 +1 @@
1
+ __version__ = "0.0.2"
@@ -448,33 +448,26 @@ def render_combined_step(
448
448
  zone_change_js = None
449
449
 
450
450
  if is_seg_init:
451
- # Get values from extracted state
452
451
  segments = seg_state["segments"]
453
452
  focused_index = seg_state["focused_index"]
454
453
  history = seg_state["history"]
455
454
  visible_count = seg_state["visible_count"]
456
455
  card_width = seg_state["card_width"]
457
456
 
458
- # Always build combined KB system with both zones
459
- # (alignment zone will have no items until alignment init completes)
460
457
  if align_urls:
461
458
  kb_manager, kb_system = build_combined_kb_system(seg_urls, align_urls)
462
459
  zone_change_js = generate_zone_change_js(switch_chrome_url)
463
- if DEBUG_COMBINED_RENDER:
464
- print(f"[COMBINED_RENDER] built combined kb_system with both zones")
465
460
 
466
- # Render column body with viewport (kb_system=None, KB is in stable container)
467
461
  column_body = render_seg_column_body(
468
462
  segments=segments,
469
463
  focused_index=focused_index,
470
464
  visible_count=visible_count,
471
465
  card_width=card_width,
472
466
  urls=seg_urls,
473
- kb_system=None, # KB system is in stable container, not column body
467
+ kb_system=None,
474
468
  )
475
469
  mini_stats_text = render_seg_mini_stats_text(segments)
476
470
 
477
- # Shared chrome with real segmentation content (includes alignment status)
478
471
  hints, toolbar, controls, footer = _render_shared_chrome(
479
472
  seg_state=seg_state,
480
473
  align_state=align_state,
@@ -482,19 +475,15 @@ def render_combined_step(
482
475
  kb_manager=kb_manager,
483
476
  )
484
477
 
485
- # Left column with real content
486
478
  seg_col = _render_seg_column(
487
479
  is_active=True,
488
480
  column_body=column_body,
489
481
  mini_stats_text=mini_stats_text,
490
482
  )
491
483
  else:
492
- # Shared chrome with placeholders (includes alignment status)
493
484
  hints, toolbar, controls, footer = _render_shared_chrome(
494
485
  align_state=align_state,
495
486
  )
496
-
497
- # Left column with loading state + auto-trigger
498
487
  seg_col = _render_seg_column(
499
488
  is_active=True,
500
489
  init_url=seg_urls.init,
@@ -502,7 +491,6 @@ def render_combined_step(
502
491
 
503
492
  # --- Alignment column ---
504
493
  if is_align_init and align_urls:
505
- # Get values from extracted state
506
494
  chunks = align_state["vad_chunks"]
507
495
  align_focused = align_state["focused_index"]
508
496
  align_visible = align_state["visible_count"]
@@ -511,36 +499,30 @@ def render_combined_step(
511
499
  audio_src_url = align_urls.audio_src if align_urls else ""
512
500
  audio_urls = [f"{audio_src_url}?path={mp}" for mp in media_paths] if audio_src_url and media_paths else []
513
501
 
514
- if DEBUG_COMBINED_RENDER:
515
- print(f"[COMBINED_RENDER] media_paths: {len(media_paths)}, audio_urls: {len(audio_urls)}")
516
-
517
502
  align_body = render_align_column_body(
518
503
  chunks=chunks,
519
504
  focused_index=align_focused,
520
505
  visible_count=align_visible,
521
506
  card_width=align_width,
522
507
  urls=align_urls,
523
- kb_system=None, # KB system is in stable container
508
+ kb_system=None,
524
509
  audio_urls=audio_urls,
525
510
  )
526
511
  align_mini_text = render_align_mini_stats_text(chunks)
527
-
528
512
  align_col = _render_alignment_column(
529
513
  is_active=False,
530
514
  column_body=align_body,
531
515
  mini_stats_text=align_mini_text,
532
516
  )
533
517
  elif align_urls and align_urls.init:
534
- # Show loading state with auto-trigger
535
518
  align_col = _render_alignment_column(
536
519
  is_active=False,
537
520
  init_url=align_urls.init,
538
521
  )
539
522
  else:
540
- # No alignment URLs — show column with default placeholder
541
523
  align_col = _render_alignment_column(is_active=False)
542
524
 
543
- # Hidden input tracking active column (seg or align)
525
+ # Hidden input tracking active column
544
526
  active_column_input = Input(
545
527
  type="hidden",
546
528
  id=CombinedHtmlIds.ACTIVE_COLUMN_INPUT,
@@ -548,10 +530,10 @@ def render_combined_step(
548
530
  value="seg",
549
531
  )
550
532
 
551
- # Stable keyboard system container (outside columns)
533
+ # Stable keyboard system container
552
534
  kb_container = _render_keyboard_system_container(kb_system=kb_system)
553
535
 
554
- # Hidden button for chrome swap HTMX trigger (clicked by zone change JS)
536
+ # Hidden button for chrome swap HTMX trigger
555
537
  chrome_switch_btn = None
556
538
  if switch_chrome_url and align_urls:
557
539
  chrome_switch_btn = Button(
@@ -562,13 +544,13 @@ def render_combined_step(
562
544
  hx_swap="none",
563
545
  )
564
546
 
565
- if DEBUG_COMBINED_RENDER:
566
- print(f"[COMBINED_RENDER] kb_container rendered with kb_system={kb_system is not None}")
567
- print(f"[COMBINED_RENDER] zone_change_js present: {zone_change_js is not None}")
568
- print(f"[COMBINED_RENDER] chrome_switch_btn present: {chrome_switch_btn is not None}")
547
+ # FA controls container (empty initially, populated by seg init OOB swap)
548
+ fa_controls = Div(
549
+ id=CombinedHtmlIds.FA_CONTROLS,
550
+ cls=combine_classes(flex_display, items.center, gap(2)),
551
+ )
569
552
 
570
553
  return Div(
571
- # Header
572
554
  Div(
573
555
  H2("Segment & Align", cls=combine_classes(font_size._3xl, font_weight.bold)),
574
556
  P(
@@ -576,45 +558,24 @@ def render_combined_step(
576
558
  cls=combine_classes(text_dui.base_content.opacity(70), m.b(2))
577
559
  ),
578
560
  ),
579
-
580
- # Shared keyboard hints
581
561
  hints,
582
-
583
- # Shared toolbar and controls
584
562
  toolbar,
563
+ fa_controls,
585
564
  controls,
586
-
587
- # Dual-column content area
588
565
  Div(
589
566
  seg_col,
590
567
  align_col,
591
568
  cls=combine_classes(
592
- grow(),
593
- min_h(0),
594
- flex_display,
595
- flex_direction.col,
596
- flex_direction.row.lg,
597
- gap(4),
598
- overflow.hidden,
599
- p(1),
569
+ grow(), min_h(0),
570
+ flex_display, flex_direction.col, flex_direction.row.lg,
571
+ gap(4), overflow.hidden, p(1),
600
572
  )
601
573
  ),
602
-
603
- # Shared footer
604
574
  footer,
605
-
606
- # Stable keyboard system container (outside columns, won't be swapped)
607
575
  kb_container,
608
-
609
- # Zone change JavaScript (when align_urls available)
610
576
  zone_change_js,
611
-
612
- # Hidden chrome switch button (for HTMX-triggered chrome swaps)
613
577
  chrome_switch_btn,
614
-
615
- # Hidden active column state
616
578
  active_column_input,
617
-
618
579
  id=SegmentationHtmlIds.SEG_CONTAINER,
619
580
  cls=combine_classes(
620
581
  w.full, h.full,
@@ -42,3 +42,7 @@ class CombinedHtmlIds:
42
42
 
43
43
  # Keyboard System (stable container)
44
44
  KEYBOARD_SYSTEM = "sd-keyboard-system"
45
+
46
+ # Forced Alignment Controls
47
+ FA_CONTROLS = "sd-fa-controls"
48
+ FA_STATUS = "sd-fa-status"
@@ -31,16 +31,17 @@ from cjm_transcript_segmentation.components.card_stack_config import SEG_CS_CONF
31
31
  from cjm_transcript_vad_align.models import VADChunk
32
32
  from cjm_transcript_source_select.services.source import SourceService
33
33
 
34
- from ..html_ids import CombinedHtmlIds
35
34
  from cjm_transcript_segment_align.components.step_renderer import (
36
35
  render_alignment_status, render_seg_mini_stats_badge,
37
36
  )
38
37
  from ..services.forced_alignment import ForcedAlignmentService
39
38
 
40
39
  # %% ../../nbs/routes/forced_alignment.ipynb #cell-ids
41
- # Stable HTML IDs for forced alignment UI elements
42
- FA_CONTAINER_ID = "sd-fa-controls"
43
- FA_STATUS_ID = "sd-fa-status"
40
+ from ..html_ids import CombinedHtmlIds
41
+
42
+ # Convenience aliases for FA HTML IDs
43
+ FA_CONTAINER_ID = CombinedHtmlIds.FA_CONTROLS
44
+ FA_STATUS_ID = CombinedHtmlIds.FA_STATUS
44
45
 
45
46
  # %% ../../nbs/routes/forced_alignment.ipynb #cell-render-button
46
47
  def render_fa_trigger_button(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cjm-transcript-segment-align
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: FastHTML dual-column text segmentation & VAD alignment UI for transcript decomposition workflows with forced alignment-based text splitting for aligning text segments with VAD chunks.
5
5
  Home-page: https://github.com/cj-mills/cjm-transcript-segment-align
6
6
  Author: Christian J. Mills
@@ -74,18 +74,18 @@ graph LR
74
74
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
75
75
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
76
76
 
77
- components_handlers --> components_step_renderer
78
- components_handlers --> html_ids
79
77
  components_handlers --> components_keyboard_config
78
+ components_handlers --> html_ids
79
+ components_handlers --> components_step_renderer
80
80
  components_keyboard_config --> html_ids
81
- components_step_renderer --> html_ids
82
- components_step_renderer --> components_keyboard_config
83
81
  components_step_renderer --> components_helpers
82
+ components_step_renderer --> components_keyboard_config
83
+ components_step_renderer --> html_ids
84
84
  routes_chrome --> html_ids
85
85
  routes_chrome --> components_keyboard_config
86
86
  routes_chrome --> components_step_renderer
87
- routes_forced_alignment --> components_step_renderer
88
87
  routes_forced_alignment --> html_ids
88
+ routes_forced_alignment --> components_step_renderer
89
89
  routes_forced_alignment --> services_forced_alignment
90
90
  ```
91
91
 
@@ -249,8 +249,8 @@ def init_forced_alignment_routers(
249
249
  #### Variables
250
250
 
251
251
  ``` python
252
- FA_CONTAINER_ID = 'sd-fa-controls'
253
- FA_STATUS_ID = 'sd-fa-status'
252
+ FA_CONTAINER_ID
253
+ FA_STATUS_ID
254
254
  ```
255
255
 
256
256
  ### forced_alignment (`forced_alignment.ipynb`)
@@ -1,16 +1,10 @@
1
1
  [DEFAULT]
2
- # All sections below are required unless otherwise specified.
3
- # See https://github.com/AnswerDotAI/nbdev/blob/main/settings.ini for examples.
4
-
5
- ### Python library ###
6
2
  repo = cjm-transcript-segment-align
7
- lib_name = %(repo)s
8
- version = 0.0.1
3
+ lib_name = cjm-transcript-segment-align
4
+ version = 0.0.2
9
5
  min_python = 3.12
10
6
  license = apache2
11
7
  black_formatting = False
12
-
13
- ### nbdev ###
14
8
  doc_path = _docs
15
9
  lib_path = cjm_transcript_segment_align
16
10
  nbs_path = nbs
@@ -18,29 +12,27 @@ recursive = True
18
12
  tst_flags = notest
19
13
  put_version_in_init = True
20
14
  update_pyproject = True
21
-
22
- ### Docs ###
23
15
  branch = main
24
16
  custom_sidebar = False
25
- doc_host = https://%(user)s.github.io
26
- doc_baseurl = /%(repo)s
27
- git_url = https://github.com/%(user)s/%(repo)s
28
- title = %(lib_name)s
29
-
30
- ### PyPI ###
17
+ doc_host = https://cj-mills.github.io
18
+ doc_baseurl = /cjm-transcript-segment-align
19
+ git_url = https://github.com/cj-mills/cjm-transcript-segment-align
20
+ title = cjm-transcript-segment-align
31
21
  audience = Developers
32
22
  author = Christian J. Mills
33
23
  author_email = 9126128+cj-mills@users.noreply.github.com
34
- copyright = 2026 onwards, %(author)s
24
+ copyright = 2026 onwards, Christian J. Mills
35
25
  description = FastHTML dual-column text segmentation & VAD alignment UI for transcript decomposition workflows with forced alignment-based text splitting for aligning text segments with VAD chunks.
36
26
  keywords = nbdev jupyter notebook python
37
27
  language = English
38
28
  status = 3
39
29
  user = cj-mills
40
-
41
- ### Optional ###
42
30
  requirements = cjm-plugin-system cjm_transcription_plugin_system cjm_transcript_segmentation cjm_transcript_vad_align
43
- # dev_requirements =
44
- # console_scripts =
45
- # conda_user =
46
- # package_data =
31
+ readme_nb = index.ipynb
32
+ allowed_metadata_keys =
33
+ allowed_cell_metadata_keys =
34
+ jupyter_hooks = False
35
+ clean_ids = True
36
+ clear_all = False
37
+ skip_procs =
38
+
@@ -1 +0,0 @@
1
- __version__ = "0.0.1"