karaoke-gen 0.71.27__py3-none-any.whl → 0.75.16__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.
Files changed (39) hide show
  1. karaoke_gen/__init__.py +32 -1
  2. karaoke_gen/audio_fetcher.py +476 -56
  3. karaoke_gen/audio_processor.py +11 -3
  4. karaoke_gen/file_handler.py +192 -0
  5. karaoke_gen/instrumental_review/__init__.py +45 -0
  6. karaoke_gen/instrumental_review/analyzer.py +408 -0
  7. karaoke_gen/instrumental_review/editor.py +322 -0
  8. karaoke_gen/instrumental_review/models.py +171 -0
  9. karaoke_gen/instrumental_review/server.py +475 -0
  10. karaoke_gen/instrumental_review/static/index.html +1506 -0
  11. karaoke_gen/instrumental_review/waveform.py +409 -0
  12. karaoke_gen/karaoke_finalise/karaoke_finalise.py +62 -1
  13. karaoke_gen/karaoke_gen.py +114 -1
  14. karaoke_gen/lyrics_processor.py +81 -4
  15. karaoke_gen/utils/bulk_cli.py +3 -0
  16. karaoke_gen/utils/cli_args.py +9 -2
  17. karaoke_gen/utils/gen_cli.py +379 -2
  18. karaoke_gen/utils/remote_cli.py +1126 -77
  19. {karaoke_gen-0.71.27.dist-info → karaoke_gen-0.75.16.dist-info}/METADATA +7 -1
  20. {karaoke_gen-0.71.27.dist-info → karaoke_gen-0.75.16.dist-info}/RECORD +38 -26
  21. lyrics_transcriber/correction/anchor_sequence.py +226 -350
  22. lyrics_transcriber/frontend/package.json +1 -1
  23. lyrics_transcriber/frontend/src/components/Header.tsx +38 -12
  24. lyrics_transcriber/frontend/src/components/LyricsAnalyzer.tsx +17 -3
  25. lyrics_transcriber/frontend/src/components/LyricsSynchronizer/SyncControls.tsx +185 -0
  26. lyrics_transcriber/frontend/src/components/LyricsSynchronizer/TimelineCanvas.tsx +704 -0
  27. lyrics_transcriber/frontend/src/components/LyricsSynchronizer/UpcomingWordsBar.tsx +80 -0
  28. lyrics_transcriber/frontend/src/components/LyricsSynchronizer/index.tsx +905 -0
  29. lyrics_transcriber/frontend/src/components/ModeSelectionModal.tsx +127 -0
  30. lyrics_transcriber/frontend/src/components/ReplaceAllLyricsModal.tsx +190 -542
  31. lyrics_transcriber/frontend/tsconfig.tsbuildinfo +1 -1
  32. lyrics_transcriber/frontend/web_assets/assets/{index-DdJTDWH3.js → index-COYImAcx.js} +1722 -489
  33. lyrics_transcriber/frontend/web_assets/assets/index-COYImAcx.js.map +1 -0
  34. lyrics_transcriber/frontend/web_assets/index.html +1 -1
  35. lyrics_transcriber/review/server.py +5 -5
  36. lyrics_transcriber/frontend/web_assets/assets/index-DdJTDWH3.js.map +0 -1
  37. {karaoke_gen-0.71.27.dist-info → karaoke_gen-0.75.16.dist-info}/WHEEL +0 -0
  38. {karaoke_gen-0.71.27.dist-info → karaoke_gen-0.75.16.dist-info}/entry_points.txt +0 -0
  39. {karaoke_gen-0.71.27.dist-info → karaoke_gen-0.75.16.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