lyrics-transcriber 0.47.0__py3-none-any.whl → 0.48.0__py3-none-any.whl

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.
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Lyrics Transcriber Analyzer</title>
8
- <script type="module" crossorigin src="/assets/index-2vK-qVJS.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BvRLUQmZ.js"></script>
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -80,6 +80,7 @@ interface MemoizedTranscriptionViewProps {
80
80
  currentTime: number
81
81
  anchors: AnchorSequence[]
82
82
  disableHighlighting: boolean
83
+ onDataChange?: (updatedData: CorrectionData) => void
83
84
  }
84
85
 
85
86
  // Create a memoized TranscriptionView component
@@ -94,7 +95,8 @@ const MemoizedTranscriptionView = memo(function MemoizedTranscriptionView({
94
95
  onPlaySegment,
95
96
  currentTime,
96
97
  anchors,
97
- disableHighlighting
98
+ disableHighlighting,
99
+ onDataChange
98
100
  }: MemoizedTranscriptionViewProps) {
99
101
  return (
100
102
  <TranscriptionView
@@ -108,6 +110,7 @@ const MemoizedTranscriptionView = memo(function MemoizedTranscriptionView({
108
110
  onPlaySegment={onPlaySegment}
109
111
  currentTime={disableHighlighting ? undefined : currentTime}
110
112
  anchors={anchors}
113
+ onDataChange={onDataChange}
111
114
  />
112
115
  );
113
116
  });
@@ -923,6 +926,9 @@ export default function LyricsAnalyzer({ data: initialData, onFileLoad, apiClien
923
926
  currentTime={currentAudioTime}
924
927
  anchors={data.anchor_sequences}
925
928
  disableHighlighting={isAnyModalOpenMemo}
929
+ onDataChange={(updatedData) => {
930
+ setData(updatedData)
931
+ }}
926
932
  />
927
933
  {!isReadOnly && apiClient && (
928
934
  <Box sx={{
@@ -6,6 +6,8 @@ import { styled } from '@mui/material/styles'
6
6
  import SegmentDetailsModal from './SegmentDetailsModal'
7
7
  import { TranscriptionWordPosition } from './shared/types'
8
8
  import PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline'
9
+ import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline'
10
+ import { deleteSegment } from './shared/utils/segmentOperations'
9
11
 
10
12
  const SegmentIndex = styled(Typography)(({ theme }) => ({
11
13
  color: theme.palette.text.secondary,
@@ -48,10 +50,18 @@ export default function TranscriptionView({
48
50
  mode,
49
51
  onPlaySegment,
50
52
  currentTime = 0,
51
- anchors = []
53
+ anchors = [],
54
+ onDataChange
52
55
  }: TranscriptionViewProps) {
53
56
  const [selectedSegmentIndex, setSelectedSegmentIndex] = useState<number | null>(null)
54
57
 
58
+ const handleDeleteSegment = (segmentIndex: number) => {
59
+ if (onDataChange) {
60
+ const updatedData = deleteSegment(data, segmentIndex)
61
+ onDataChange(updatedData)
62
+ }
63
+ }
64
+
55
65
  return (
56
66
  <Paper sx={{ p: 0.8 }}>
57
67
  <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 0.5 }}>
@@ -125,6 +135,20 @@ export default function TranscriptionView({
125
135
  >
126
136
  {segmentIndex}
127
137
  </SegmentIndex>
138
+ <IconButton
139
+ size="small"
140
+ onClick={() => handleDeleteSegment(segmentIndex)}
141
+ sx={{
142
+ padding: '1px',
143
+ height: '18px',
144
+ width: '18px',
145
+ minHeight: '18px',
146
+ minWidth: '18px'
147
+ }}
148
+ title="Delete segment"
149
+ >
150
+ <DeleteOutlineIcon sx={{ fontSize: '0.9rem', color: 'error.main' }} />
151
+ </IconButton>
128
152
  {segment.start_time !== null && (
129
153
  <IconButton
130
154
  size="small"
@@ -136,6 +160,7 @@ export default function TranscriptionView({
136
160
  minHeight: '18px',
137
161
  minWidth: '18px'
138
162
  }}
163
+ title="Play segment"
139
164
  >
140
165
  <PlayCircleOutlineIcon sx={{ fontSize: '0.9rem' }} />
141
166
  </IconButton>
@@ -83,6 +83,7 @@ export interface TranscriptionViewProps {
83
83
  currentTime?: number
84
84
  anchors?: AnchorSequence[]
85
85
  flashingHandler?: string | null
86
+ onDataChange?: (updatedData: CorrectionData) => void
86
87
  }
87
88
 
88
89
  // Add LinePosition type here since it's used in multiple places
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lyrics-transcriber
3
- Version: 0.47.0
3
+ Version: 0.48.0
4
4
  Summary: Automatically create synchronised lyrics files in ASS and MidiCo LRC formats with word-level timestamps, using Whisper and lyrics from Genius and Spotify
5
5
  License: MIT
6
6
  Author: Andrew Beveridge
@@ -26,9 +26,9 @@ lyrics_transcriber/frontend/.yarn/install-state.gz,sha256=kcgQ-S9HvdNHexkXQVt18L
26
26
  lyrics_transcriber/frontend/.yarn/releases/yarn-4.7.0.cjs,sha256=KTYy2KCV2OpHhussV5jIPDdUSr7RftMRhqPsRUmgfAY,2765465
27
27
  lyrics_transcriber/frontend/.yarnrc.yml,sha256=0hZQ1OTcPqTUNBqQeme4VFkIzrsabHNzLtc_M-wSgIM,66
28
28
  lyrics_transcriber/frontend/README.md,sha256=-D6CAfKTT7Y0V3EjlZ2fMy7fyctFQ4x2TJ9vx6xtccM,1607
29
- lyrics_transcriber/frontend/dist/assets/index-2vK-qVJS.js,sha256=SS1ChOzktQ9Npxy8NkAKCzMzMCTdsgaPnTftnnfQyyU,1228902
30
- lyrics_transcriber/frontend/dist/assets/index-2vK-qVJS.js.map,sha256=zNnvzYNn1snMzTDmpvWlsub21-JXih9pBP5uJQrJhmU,2616065
31
- lyrics_transcriber/frontend/dist/index.html,sha256=kt0XrQu0BoyMJq92TbIQxxD8U2963a-X4_GHxf5oqe4,400
29
+ lyrics_transcriber/frontend/dist/assets/index-BvRLUQmZ.js,sha256=3akGaBOgucoh5DcEciZsigZY_W63wSITtGcGUAbCWl0,1230045
30
+ lyrics_transcriber/frontend/dist/assets/index-BvRLUQmZ.js.map,sha256=pLFjgGWRyykfiuvKv-i9EvM_tKH8iVma8-A54rlPvlM,2618510
31
+ lyrics_transcriber/frontend/dist/index.html,sha256=CD308I_i01AYU345UgtZmtDMVdOtuoIeENjGBv81U70,400
32
32
  lyrics_transcriber/frontend/dist/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
33
33
  lyrics_transcriber/frontend/eslint.config.js,sha256=3ADH23ANA4NNBKFy6nCVk65e8bx1DrVd_FIaYNnhuqA,734
34
34
  lyrics_transcriber/frontend/index.html,sha256=KfqJVONzpUyPIwV73nZRiCWlwLnFWeB3z0vzxDPNudU,376
@@ -46,14 +46,14 @@ lyrics_transcriber/frontend/src/components/EditWordList.tsx,sha256=atl-9Z-24U-KW
46
46
  lyrics_transcriber/frontend/src/components/FileUpload.tsx,sha256=fwn2rMWtMLPTZLREMb3ps4prSf9nzxGwnjmeC6KYsJA,2383
47
47
  lyrics_transcriber/frontend/src/components/FindReplaceModal.tsx,sha256=U7duKns4IqNXwbWFbQfdyaswnvkSRpfsU0UG__-Serc,20192
48
48
  lyrics_transcriber/frontend/src/components/Header.tsx,sha256=PKFMDITEyC77ndk0emOsU6LFbPTLkWmkTLxEcndKPJY,11657
49
- lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx,sha256=csAR7ku2FXZmw11DfSDDHSX_3Lu4W_EnnBy9G3KlLVw,41357
49
+ lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx,sha256=EPCq1B8lZGXqrdcDj33YhWFfoJc7Jh3ULW_mEmc22mE,41605
50
50
  lyrics_transcriber/frontend/src/components/ModeSelector.tsx,sha256=HnBAK_gFgNBJLtMC_ESMVdUapDjmqmoLX8pQeyHfpOw,2651
51
51
  lyrics_transcriber/frontend/src/components/PreviewVideoSection.tsx,sha256=-9_ljoaadHjAAvia_vhEUgCajPv2jFnRDVR6VWN_a0w,4166
52
52
  lyrics_transcriber/frontend/src/components/ReferenceView.tsx,sha256=thpf2ojge9pvZojUnGaiQroeHfBmxhUesO7945RGSfk,9499
53
53
  lyrics_transcriber/frontend/src/components/ReviewChangesModal.tsx,sha256=zcGoIu5Iqs4ZXpGr3yeMIEKPf8FRLCP2i1TzNOmKzg0,13048
54
54
  lyrics_transcriber/frontend/src/components/SegmentDetailsModal.tsx,sha256=6ME02FkFwCgDAxW49yW260N4vbr80eAJ332Ex811GOo,1643
55
55
  lyrics_transcriber/frontend/src/components/TimelineEditor.tsx,sha256=Aa6ykDRVhWUNHcJ14KGzmUCPDCAltw9gXpdR5ogVQpc,12842
56
- lyrics_transcriber/frontend/src/components/TranscriptionView.tsx,sha256=It9alDqvlp3zu9ceEjFpqBOKDa2BFxP4AHm7v2K4AI0,7399
56
+ lyrics_transcriber/frontend/src/components/TranscriptionView.tsx,sha256=uXSZcsiMsrxKhgbGUdZEfYTwjwpJbnxRl7AXGfMC0Q8,8607
57
57
  lyrics_transcriber/frontend/src/components/WordDivider.tsx,sha256=tOs_4WZGlJQ1o7sZFGLhwUoyX2jSKMa6vLZqa-1vzKY,6590
58
58
  lyrics_transcriber/frontend/src/components/shared/components/HighlightedText.tsx,sha256=Iopa2n7ANnPtHFu2zq7vnfwQ4SOgmBUHUfNKwBQHBxY,16203
59
59
  lyrics_transcriber/frontend/src/components/shared/components/SourceSelector.tsx,sha256=FpMn-0i1NFxdIHZN0dxHkWzIIsOEi9CJc_rQMpLyxVw,2031
@@ -62,7 +62,7 @@ lyrics_transcriber/frontend/src/components/shared/constants.ts,sha256=25q1qjCwzV
62
62
  lyrics_transcriber/frontend/src/components/shared/hooks/useWordClick.ts,sha256=eEgBHiKIWOzFK8eBzBgcQRv7StKpaPchqh3k2kFlwgY,6253
63
63
  lyrics_transcriber/frontend/src/components/shared/styles.ts,sha256=J1jCSuRqpk1mOFYAqJudhxeozH-q1bi-dsOibLukBJU,411
64
64
  lyrics_transcriber/frontend/src/components/shared/types.js,sha256=1DqoH1vIn6o1ng-XyBS6JRVVkf8Hj7ub_UD4x8loMjA,77
65
- lyrics_transcriber/frontend/src/components/shared/types.ts,sha256=TUjxwXxiahw0JrRUTUFk_ucUo-G16hB0Jpt8OgVULoU,3892
65
+ lyrics_transcriber/frontend/src/components/shared/types.ts,sha256=HFbYnfWhejMAmAU3v-Jrf_Lm5t7WU25L83UP9rvG3M8,3949
66
66
  lyrics_transcriber/frontend/src/components/shared/utils/keyboardHandlers.ts,sha256=m9vob5KWp4_8kgB7FUXbWztYTSonkNZyz5hoHXvlRUk,5832
67
67
  lyrics_transcriber/frontend/src/components/shared/utils/localStorage.ts,sha256=jpLT65Rk_toaB-8X2lRGyYZ9EoMQDI45GviUT7N9Bp0,3240
68
68
  lyrics_transcriber/frontend/src/components/shared/utils/referenceLineCalculator.ts,sha256=TJ2oHDitFFVxm83eFEhdlwvhx--mIt3054YbET2RiXs,2575
@@ -148,8 +148,8 @@ lyrics_transcriber/transcribers/base_transcriber.py,sha256=T3m4ZCwZ9Bpv6Jvb2hNcn
148
148
  lyrics_transcriber/transcribers/whisper.py,sha256=YcCB1ic9H6zL1GS0jD0emu8-qlcH0QVEjjjYB4aLlIQ,13260
149
149
  lyrics_transcriber/types.py,sha256=d73cDstrEI_tVgngDYYYFwjZNs6OVBuAB_QDkga7dWA,19841
150
150
  lyrics_transcriber/utils/word_utils.py,sha256=-cMGpj9UV4F6IsoDKAV2i1aiqSO8eI91HMAm_igtVMk,958
151
- lyrics_transcriber-0.47.0.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
152
- lyrics_transcriber-0.47.0.dist-info/METADATA,sha256=puMd0GdnGW5VD1Uub1ZI-3Ryn6y_Ty4IT_S6cUemtSU,6017
153
- lyrics_transcriber-0.47.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
154
- lyrics_transcriber-0.47.0.dist-info/entry_points.txt,sha256=kcp-bSFkCACAEA0t166Kek0HpaJUXRo5SlF5tVrqNBU,216
155
- lyrics_transcriber-0.47.0.dist-info/RECORD,,
151
+ lyrics_transcriber-0.48.0.dist-info/LICENSE,sha256=BiPihPDxhxIPEx6yAxVfAljD5Bhm_XG2teCbPEj_m0Y,1069
152
+ lyrics_transcriber-0.48.0.dist-info/METADATA,sha256=WtzJ53EgshfdtuUw-lhOWZqfXbKEsqmKIkqrkaSP7_8,6017
153
+ lyrics_transcriber-0.48.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
154
+ lyrics_transcriber-0.48.0.dist-info/entry_points.txt,sha256=kcp-bSFkCACAEA0t166Kek0HpaJUXRo5SlF5tVrqNBU,216
155
+ lyrics_transcriber-0.48.0.dist-info/RECORD,,