diff --git a/lyrics-analyzer/src/components/LyricsAnalyzer.tsx b/lyrics-analyzer/src/components/LyricsAnalyzer.tsx index 67fa875..8b8fe5d 100644 --- a/lyrics-analyzer/src/components/LyricsAnalyzer.tsx +++ b/lyrics-analyzer/src/components/LyricsAnalyzer.tsx @@ -216,7 +216,6 @@ export default function LyricsAnalyzer({ data, onFileLoad, apiClient, isReadOnly onWordClick={handleWordClick} flashingType={flashingType} corrected_segments={data.corrected_segments} - highlightInfo={highlightInfo} currentSource={currentSource} onSourceChange={setCurrentSource} onDebugInfoUpdate={setAnchorMatchInfo} diff --git a/lyrics-analyzer/src/components/ReferenceView.tsx b/lyrics-analyzer/src/components/ReferenceView.tsx index 1fc0260..6df37be 100644 --- a/lyrics-analyzer/src/components/ReferenceView.tsx +++ b/lyrics-analyzer/src/components/ReferenceView.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useRef } from 'react' -import { Paper, Typography, Box, Button, Tooltip } from '@mui/material' -import { AnchorMatchInfo, HighlightInfo, LyricsData, LyricsSegment } from '../types' +import { Paper, Typography, Box, Button } from '@mui/material' +import { AnchorMatchInfo, LyricsData, LyricsSegment } from '../types' import { FlashType, ModalContent } from './LyricsAnalyzer' import { COLORS } from './constants' import { HighlightedWord } from './styles' @@ -21,7 +21,6 @@ interface ReferenceViewProps { flashingType: FlashType corrected_segments: LyricsSegment[] highlightedWordIndex?: number - highlightInfo: HighlightInfo | null currentSource: 'genius' | 'spotify' onSourceChange: (source: 'genius' | 'spotify') => void onDebugInfoUpdate?: (info: AnchorMatchInfo[]) => void @@ -39,7 +38,6 @@ export default function ReferenceView({ flashingType, corrected_segments, highlightedWordIndex, - highlightInfo, currentSource, onSourceChange, onDebugInfoUpdate @@ -47,7 +45,7 @@ export default function ReferenceView({ // Create a ref to store debug info to avoid dependency cycles const debugInfoRef = useRef([]) - const { newlineInfo, newlineIndices } = useMemo(() => { + const { newlineIndices } = useMemo(() => { debugInfoRef.current = corrected_segments.map(segment => ({ segment: segment.text.trim(), lastWord: '', @@ -57,7 +55,6 @@ export default function ReferenceView({ debugLog: [] })); - const newlineInfo = new Map() const newlineIndices = new Set( corrected_segments.slice(0, -1).map((segment, segmentIndex) => { const segmentText = segment.text.trim() @@ -144,7 +141,6 @@ export default function ReferenceView({ } } - newlineInfo.set(position, segment.text.trim()) return position } } @@ -152,7 +148,7 @@ export default function ReferenceView({ return null }).filter((pos): pos is number => pos !== null && pos >= 0) ) - return { newlineInfo, newlineIndices } + return { newlineIndices } }, [corrected_segments, anchors, currentSource]) // Update debug info whenever it changes diff --git a/pyproject.toml b/pyproject.toml index daad527..d0df6c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "lyrics-transcriber" -version = "0.32.1" +version = "0.32.2" description = "Automatically create synchronised lyrics files in ASS and MidiCo LRC formats with word-level timestamps, using Whisper and lyrics from Genius and Spotify" authors = ["Andrew Beveridge "] license = "MIT" @@ -20,17 +20,17 @@ karaoke-lyrics-processor = ">=0.4" dropbox = ">=12" python-dotenv = ">=1" pydub = ">=0.25" -spacy = "^3.8.3" -tqdm = "^4.67.1" -python-levenshtein = "^0.26.1" -transformers = "^4.47.1" -torch = "^2.5.1" -metaphone = "^0.6" -nltk = "^3.9.1" -spacy-syllables = "^3.0.2" -syllables = "^1.0.9" -fastapi = "^0.115.6" -uvicorn = "^0.34.0" +spacy = ">=3.8" +tqdm = ">=4.67" +python-levenshtein = ">=0.26" +transformers = ">=4.47" +torch = ">=2" +metaphone = ">=0.6" +nltk = ">=3.9" +spacy-syllables = ">=3" +syllables = ">=1" +fastapi = ">=0.115" +uvicorn = ">=0.34" [tool.poetry.group.dev.dependencies] black = ">=23" @@ -52,6 +52,4 @@ build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py"] -filterwarnings = [ - "ignore:'audioop' is deprecated:DeprecationWarning" -] +filterwarnings = ["ignore:'audioop' is deprecated:DeprecationWarning"]