karaoke-gen 0.71.42__py3-none-any.whl → 0.75.53__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.
- karaoke_gen/__init__.py +32 -1
- karaoke_gen/audio_fetcher.py +1220 -67
- karaoke_gen/audio_processor.py +15 -3
- karaoke_gen/instrumental_review/server.py +154 -860
- karaoke_gen/instrumental_review/static/index.html +1529 -0
- karaoke_gen/karaoke_finalise/karaoke_finalise.py +87 -2
- karaoke_gen/karaoke_gen.py +131 -14
- karaoke_gen/lyrics_processor.py +172 -4
- karaoke_gen/utils/bulk_cli.py +3 -0
- karaoke_gen/utils/cli_args.py +7 -4
- karaoke_gen/utils/gen_cli.py +221 -5
- karaoke_gen/utils/remote_cli.py +786 -43
- {karaoke_gen-0.71.42.dist-info → karaoke_gen-0.75.53.dist-info}/METADATA +109 -4
- {karaoke_gen-0.71.42.dist-info → karaoke_gen-0.75.53.dist-info}/RECORD +37 -31
- lyrics_transcriber/core/controller.py +76 -2
- lyrics_transcriber/frontend/package.json +1 -1
- lyrics_transcriber/frontend/src/App.tsx +6 -4
- lyrics_transcriber/frontend/src/api.ts +25 -10
- lyrics_transcriber/frontend/src/components/Header.tsx +38 -12
- lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx +17 -3
- lyrics_transcriber/frontend/src/components/LyricsSynchronizer/SyncControls.tsx +185 -0
- lyrics_transcriber/frontend/src/components/LyricsSynchronizer/TimelineCanvas.tsx +704 -0
- lyrics_transcriber/frontend/src/components/LyricsSynchronizer/UpcomingWordsBar.tsx +80 -0
- lyrics_transcriber/frontend/src/components/LyricsSynchronizer/index.tsx +905 -0
- lyrics_transcriber/frontend/src/components/ModeSelectionModal.tsx +127 -0
- lyrics_transcriber/frontend/src/components/ReplaceAllLyricsModal.tsx +190 -542
- lyrics_transcriber/frontend/tsconfig.tsbuildinfo +1 -1
- lyrics_transcriber/frontend/web_assets/assets/{index-DdJTDWH3.js → index-BECn1o8Q.js} +1802 -553
- lyrics_transcriber/frontend/web_assets/assets/index-BECn1o8Q.js.map +1 -0
- lyrics_transcriber/frontend/web_assets/index.html +1 -1
- lyrics_transcriber/output/countdown_processor.py +39 -0
- lyrics_transcriber/review/server.py +5 -5
- lyrics_transcriber/transcribers/audioshake.py +96 -7
- lyrics_transcriber/types.py +14 -12
- lyrics_transcriber/frontend/web_assets/assets/index-DdJTDWH3.js.map +0 -1
- {karaoke_gen-0.71.42.dist-info → karaoke_gen-0.75.53.dist-info}/WHEEL +0 -0
- {karaoke_gen-0.71.42.dist-info → karaoke_gen-0.75.53.dist-info}/entry_points.txt +0 -0
- {karaoke_gen-0.71.42.dist-info → karaoke_gen-0.75.53.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react'
|
|
2
|
+
import { Box, Typography } from '@mui/material'
|
|
3
|
+
import { Word } from '../../types'
|
|
4
|
+
|
|
5
|
+
interface UpcomingWordsBarProps {
|
|
6
|
+
words: Word[]
|
|
7
|
+
syncWordIndex: number
|
|
8
|
+
isManualSyncing: boolean
|
|
9
|
+
maxWordsToShow?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const UpcomingWordsBar = memo(function UpcomingWordsBar({
|
|
13
|
+
words,
|
|
14
|
+
syncWordIndex,
|
|
15
|
+
isManualSyncing,
|
|
16
|
+
maxWordsToShow = 20
|
|
17
|
+
}: UpcomingWordsBarProps) {
|
|
18
|
+
// Get upcoming unsynced words
|
|
19
|
+
const upcomingWords = useMemo(() => {
|
|
20
|
+
if (!isManualSyncing || syncWordIndex < 0) return []
|
|
21
|
+
|
|
22
|
+
return words
|
|
23
|
+
.slice(syncWordIndex)
|
|
24
|
+
.filter(w => w.start_time === null)
|
|
25
|
+
.slice(0, maxWordsToShow)
|
|
26
|
+
}, [words, syncWordIndex, isManualSyncing, maxWordsToShow])
|
|
27
|
+
|
|
28
|
+
const totalRemaining = useMemo(() => {
|
|
29
|
+
if (!isManualSyncing || syncWordIndex < 0) return 0
|
|
30
|
+
return words.slice(syncWordIndex).filter(w => w.start_time === null).length
|
|
31
|
+
}, [words, syncWordIndex, isManualSyncing])
|
|
32
|
+
|
|
33
|
+
// Show empty placeholder when no upcoming words
|
|
34
|
+
if (upcomingWords.length === 0) {
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Box sx={{
|
|
40
|
+
height: 44,
|
|
41
|
+
bgcolor: 'grey.100',
|
|
42
|
+
borderRadius: 1,
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
px: 1,
|
|
46
|
+
gap: 0.5,
|
|
47
|
+
overflow: 'hidden',
|
|
48
|
+
boxSizing: 'border-box'
|
|
49
|
+
}}>
|
|
50
|
+
{upcomingWords.map((word, index) => (
|
|
51
|
+
<Box
|
|
52
|
+
key={word.id}
|
|
53
|
+
sx={{
|
|
54
|
+
px: 1,
|
|
55
|
+
py: 0.5,
|
|
56
|
+
borderRadius: 0.5,
|
|
57
|
+
bgcolor: index === 0 ? 'error.main' : 'grey.300',
|
|
58
|
+
color: index === 0 ? 'white' : 'text.primary',
|
|
59
|
+
fontWeight: index === 0 ? 'bold' : 'normal',
|
|
60
|
+
fontSize: '13px',
|
|
61
|
+
fontFamily: 'system-ui, -apple-system, sans-serif',
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
border: index === 0 ? '2px solid' : 'none',
|
|
64
|
+
borderColor: 'error.dark'
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
{word.text}
|
|
68
|
+
</Box>
|
|
69
|
+
))}
|
|
70
|
+
|
|
71
|
+
{totalRemaining > maxWordsToShow && (
|
|
72
|
+
<Typography variant="caption" color="text.secondary" sx={{ ml: 1 }}>
|
|
73
|
+
+{totalRemaining - maxWordsToShow} more
|
|
74
|
+
</Typography>
|
|
75
|
+
)}
|
|
76
|
+
</Box>
|
|
77
|
+
)
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
export default UpcomingWordsBar
|