diff --git a/backend/api/routes/review.py b/backend/api/routes/review.py index dc9cacaa..0bf188ad 100644 --- a/backend/api/routes/review.py +++ b/backend/api/routes/review.py @@ -19,7 +19,7 @@ import json import os import tempfile from pathlib import Path -from typing import Dict, Any, List, Optional, Set, Tuple +from typing import Dict, Any, List, Literal, Optional, Set, Tuple from fastapi import APIRouter, HTTPException, Request, Depends, Form, File, UploadFile from fastapi.responses import RedirectResponse @@ -372,6 +372,15 @@ async def get_correction_data( raise HTTPException(status_code=500, detail=t("en", "review.correctionsLoadFailed", error=str(e))) +@router.get("/{job_id}/audio/vocals") +async def get_vocals_audio( + job_id: str, + auth_info: Tuple[str, str] = Depends(require_review_auth) +): + """Stream the vocals audio file for playback.""" + return await _stream_audio(job_id, stem="vocals") + + @router.get("/{job_id}/audio/{audio_hash}") async def get_audio_with_hash( job_id: str, @@ -392,7 +401,7 @@ async def get_audio_no_hash( return await _stream_audio(job_id) -async def _stream_audio(job_id: str): +async def _stream_audio(job_id: str, stem: Literal["input"] | Literal["vocals"] = "input"): """ Redirect to a signed GCS URL for audio playback in the review interface. @@ -407,7 +416,22 @@ async def _stream_audio(job_id: str): if not job: raise HTTPException(status_code=404, detail=t("en", "review.jobNotFound")) - audio_gcs_path = job.input_media_gcs_path + audio_gcs_path = None + if stem == "input": + audio_gcs_path = job.input_media_gcs_path + elif stem == "vocals": + stems = job.file_urls.get("stems", {}) if job.file_urls else {} + # Stem keys vary by separation model. We want the full vocal mix + # (lead + backing) so every word can be lined up against the waveform: + # - "vocals" : full vocal from a 2-stem split (rare) + # - "vocals_clean" : full vocal from the primary vocal/instrumental + # split (present on essentially all cloud jobs) + # - "lead_vocals" : last-resort fallback (misses backing lines) + # Use .get() so a missing key yields a clean 404 below, not a KeyError/500. + for key in ("vocals", "vocals_clean", "lead_vocals"): + if stems.get(key): + audio_gcs_path = stems[key] + break if not audio_gcs_path: raise HTTPException(status_code=404, detail=t("en", "review.audioNotFound")) diff --git a/backend/tests/test_routes_review.py b/backend/tests/test_routes_review.py index bbed73ca..3396743e 100644 --- a/backend/tests/test_routes_review.py +++ b/backend/tests/test_routes_review.py @@ -1132,3 +1132,71 @@ class TestGetPreviewVideoRedirect: self._call(mock_storage) assert exc_info.value.status_code == 404 mock_storage.generate_signed_url.assert_not_called() + + +class TestGetVocalsAudio: + """The vocals waveform endpoint streams the full vocal stem for the timeline. + + Real jobs never store a plain 'vocals' key — separation writes + 'vocals_clean' / 'lead_vocals' / 'backing_vocals'. The endpoint must select + the fullest vocal mix (vocals_clean) rather than KeyError on 'vocals'. + """ + + def _call(self, stems): + import asyncio + from backend.api.routes.review import _stream_audio + + job = MagicMock() + job.input_media_gcs_path = "jobs/j/input.flac" + job.file_urls = {"stems": stems} + + job_manager = MagicMock() + job_manager.get_job.return_value = job + + transcoding = MagicMock() + transcoding.get_review_audio_url_async = AsyncMock( + return_value="https://signed.example/vocals.ogg?sig=xyz" + ) + + with patch("backend.api.routes.review.JobManager", return_value=job_manager), patch( + "backend.services.audio_transcoding_service.AudioTranscodingService", + return_value=transcoding, + ): + resp = asyncio.run( + _stream_audio(job_id="j", stem="vocals") + ) + return resp, transcoding + + def test_selects_vocals_clean_when_no_plain_vocals_key(self): + from starlette.responses import RedirectResponse + + # The shape produced by real cloud jobs (no plain "vocals"). + resp, transcoding = self._call( + { + "instrumental_clean": "jobs/j/stems/instrumental_clean.flac", + "vocals_clean": "jobs/j/stems/vocals_clean.flac", + "lead_vocals": "jobs/j/stems/lead_vocals.flac", + "backing_vocals": "jobs/j/stems/backing_vocals.flac", + } + ) + + assert isinstance(resp, RedirectResponse) + assert resp.status_code == 302 + # Must pick the full vocal mix (vocals_clean), not lead_vocals or KeyError. + assert transcoding.get_review_audio_url_async.call_args[0][0] == "jobs/j/stems/vocals_clean.flac" + + def test_prefers_plain_vocals_then_falls_back_to_lead(self): + # 2-stem split exposes a plain "vocals" — preferred. + _, transcoding = self._call({"vocals": "jobs/j/stems/vocals.flac"}) + assert transcoding.get_review_audio_url_async.call_args[0][0] == "jobs/j/stems/vocals.flac" + + # Only lead_vocals available — last-resort fallback. + _, transcoding = self._call({"lead_vocals": "jobs/j/stems/lead_vocals.flac"}) + assert transcoding.get_review_audio_url_async.call_args[0][0] == "jobs/j/stems/lead_vocals.flac" + + def test_404_when_no_vocal_stem_present(self): + from fastapi import HTTPException + + with pytest.raises(HTTPException) as exc_info: + self._call({"instrumental_clean": "jobs/j/stems/instrumental_clean.flac"}) + assert exc_info.value.status_code == 404 diff --git a/frontend/components/lyrics-review/EditTimelineSection.tsx b/frontend/components/lyrics-review/EditTimelineSection.tsx index b5898f56..dcf78d03 100644 --- a/frontend/components/lyrics-review/EditTimelineSection.tsx +++ b/frontend/components/lyrics-review/EditTimelineSection.tsx @@ -1,8 +1,9 @@ 'use client' import { memo, useRef, useCallback } from 'react' +import { useTranslations } from 'next-intl' import { Button } from '@/components/ui/button' -import { Play, XCircle, Hand } from 'lucide-react' +import { Hand } from 'lucide-react' import { Word } from '@/lib/lyrics-review/types' import TimelineEditor from './TimelineEditor' import { cn } from '@/lib/utils' @@ -17,6 +18,7 @@ const TapButton = memo(function TapButton({ onTapStart: () => void onTapEnd: () => void }) { + const t = useTranslations('lyricsReview.editTimeline') const isPressedRef = useRef(false) const handleTapStart = useCallback(() => { @@ -51,7 +53,7 @@ const TapButton = memo(function TapButton({ )} > - {isSpacebarPressed ? 'HOLD...' : 'TAP'} + {isSpacebarPressed ? t('hold') : t('tap')} ) }) @@ -60,17 +62,12 @@ interface EditTimelineSectionProps { words: Word[] startTime: number endTime: number - originalStartTime: number | null - originalEndTime: number | null - currentStartTime: number | null - currentEndTime: number | null currentTime?: number isManualSyncing: boolean syncWordIndex: number isSpacebarPressed: boolean onWordUpdate: (index: number, updates: Partial) => void onPlaySegment?: (time: number) => void - startManualSync: () => void isGlobal?: boolean onTapStart?: () => void onTapEnd?: () => void @@ -80,21 +77,17 @@ export default function EditTimelineSection({ words, startTime, endTime, - originalStartTime, - originalEndTime, - currentStartTime, - currentEndTime, currentTime, isManualSyncing, syncWordIndex, isSpacebarPressed, onWordUpdate, onPlaySegment, - startManualSync, isGlobal = false, onTapStart, onTapEnd, }: EditTimelineSectionProps) { + const t = useTranslations('lyricsReview.editTimeline') // Simple mobile detection const isMobile = typeof window !== 'undefined' && window.innerWidth < 640 @@ -110,8 +103,9 @@ export default function EditTimelineSection({ return ( <> - {/* Timeline Editor */} -
+ {/* Timeline Editor — height hugs its content (ruler + word bars + waveform) + instead of a fixed min-height, to avoid dead vertical space. */} +
- {/* Time range info and controls */} -
- {/* Time range info - hidden on mobile to save space */} - {!isMobile && ( -
-
- Original Time Range: {originalStartTime?.toFixed(2) ?? 'N/A'} -{' '} - {originalEndTime?.toFixed(2) ?? 'N/A'} -
-
- Current Time Range: {currentStartTime?.toFixed(2) ?? 'N/A'} -{' '} - {currentEndTime?.toFixed(2) ?? 'N/A'} -
-
- )} - - {/* Controls */} + {/* Sync helper — only visible while manually syncing. The Tap To Sync + toggle and the time-range readout now live in the modal header to + reclaim the vertical space above the word list. */} + {(currentWordInfo || (isMobile && isManualSyncing)) && (
- {/* Tap To Sync button */} - - {/* Current word info during sync */} {currentWordInfo && (
- Word {currentWordInfo.index} of {currentWordInfo.total}:{' '} + {t('wordProgress', { + index: currentWordInfo.index, + total: currentWordInfo.total, + })}{' '} {currentWordInfo.text}
{isSpacebarPressed - ? 'Holding... Release when word ends' + ? t('holdingRelease') : isMobile - ? 'Tap the button when word starts' - : 'Press spacebar when word starts (tap for short words, hold for long words)'} + ? t('tapWhenStarts') + : t('pressSpacebarHint')}
)} @@ -199,7 +155,7 @@ export default function EditTimelineSection({ /> )}
-
+ )} ) } diff --git a/frontend/components/lyrics-review/LyricsAnalyzer.tsx b/frontend/components/lyrics-review/LyricsAnalyzer.tsx index 408b2b5f..4a235e70 100644 --- a/frontend/components/lyrics-review/LyricsAnalyzer.tsx +++ b/frontend/components/lyrics-review/LyricsAnalyzer.tsx @@ -62,6 +62,7 @@ import AutoCorrectPanel from './AutoCorrectPanel' import { useAutoCorrect } from '@/hooks/useAutoCorrect' import { getWordsFromIds } from '@/lib/lyrics-review/utils/wordUtils' import { applyOffsetToCorrectionData, applyOffsetToSegment } from '@/lib/lyrics-review/utils/timingUtils' +import { VocalsAudioDataLoader } from './VocalsAudioDataLoader' // Add type for window augmentation declare global { @@ -81,6 +82,7 @@ interface ApiClient { addLyrics: (source: string, lyrics: string) => Promise searchLyrics?: (artist: string, title: string, forceSources?: string[]) => Promise getAudioUrl: (hash: string) => string + getVocalsAudioUrl: () => string generatePreviewVideo: (data: CorrectionData, isDuet?: boolean) => Promise<{ status: string message?: string @@ -154,6 +156,8 @@ export default function LyricsAnalyzer({ const [reviewMode, setReviewMode] = useState(false) const [isSubmitting, setIsSubmitting] = useState(false) + const [vocalsAudioUrl, setVocalsAudioUrl] = useState(null) + // Success screen state (for auto-close after submission) const [showSuccess, setShowSuccess] = useState(false) const [countdown, setCountdown] = useState(2) @@ -570,6 +574,12 @@ export default function LyricsAnalyzer({ } }, [showInstrumentalReview, isLocalMode]) + useEffect(() => { + if (!apiClient) return + + setVocalsAudioUrl(apiClient.getVocalsAudioUrl()) + }, [apiClient]) + // Countdown effect for success screen (auto-close/redirect after submission) useEffect(() => { if (!showSuccess) return @@ -1352,330 +1362,332 @@ export default function LyricsAnalyzer({ } return ( -
-
setIsFindReplaceModalOpen(true)} - onEditAll={handleReplaceAllLyrics} - onTimingOffset={handleOpenTimingOffsetModal} - timingOffsetMs={timingOffsetMs} - onUndo={handleUndo} - onRedo={handleRedo} - canUndo={canUndo} - canRedo={canRedo} - onResetCorrections={handleResetCorrections} - statsVisible={statsVisible} - onStatsToggle={() => setStatsVisible((v) => !v)} - reviewMode={reviewMode} - onReviewModeToggle={setReviewMode} - onAcceptAllCorrections={handleAcceptAllCorrections} - onAcceptHighConfidenceCorrections={handleAcceptHighConfidenceCorrections} - onRevertAllCorrections={handleRevertAllCorrections} - isDuet={isDuet} - onToggleDuet={() => setIsDuet(d => !d)} - onAutoCorrect={ - !isLocalMode && jobId - ? () => - autoCorrect.acceptedCount > 0 - ? setAutoCorrectDetailsOpen((o) => !o) - : setIsAutoCorrectModalOpen(true) - : undefined - } - autoCorrectedCount={autoCorrect.acceptedCount} - /> - - setAutoCorrectDetailsOpen(false)} - onRerun={() => { - setAutoCorrectDetailsOpen(false) - setIsAutoCorrectModalOpen(true) - }} - /> - -
- { - updateDataWithHistory(updatedData, 'direct data change') - }} + +
+
setIsFindReplaceModalOpen(true)} + onEditAll={handleReplaceAllLyrics} + onTimingOffset={handleOpenTimingOffsetModal} + timingOffsetMs={timingOffsetMs} + onUndo={handleUndo} + onRedo={handleRedo} + canUndo={canUndo} + canRedo={canRedo} + onResetCorrections={handleResetCorrections} + statsVisible={statsVisible} + onStatsToggle={() => setStatsVisible((v) => !v)} reviewMode={reviewMode} - onRevertCorrection={handleRevertCorrection} - onEditCorrection={handleEditCorrection} - onAcceptCorrection={handleAcceptCorrection} - onShowCorrectionDetail={handleShowCorrectionDetail} - activeGapWordIds={activeGapWordIds} - advancedMode={advancedMode} - onAdvancedModeToggle={handleAdvancedModeToggle} - editedWordIds={editedWordIds} - aiCorrectedWordIds={aiCorrectedWordIds} - aiOriginalTextByWordId={aiOriginalTextByWordId} - aiEstimatedWordIds={aiEstimatedWordIds} + onReviewModeToggle={setReviewMode} + onAcceptAllCorrections={handleAcceptAllCorrections} + onAcceptHighConfidenceCorrections={handleAcceptHighConfidenceCorrections} + onRevertAllCorrections={handleRevertAllCorrections} isDuet={isDuet} - onSegmentSingerChange={(segmentIdx, next) => { - const segments = [...data.corrected_segments] - segments[segmentIdx] = { ...segments[segmentIdx], singer: next } - updateDataWithHistory({ ...data, corrected_segments: segments }, 'singer change') - }} - onSegmentFocus={setFocusedSegmentIndex} + onToggleDuet={() => setIsDuet(d => !d)} + onAutoCorrect={ + !isLocalMode && jobId + ? () => + autoCorrect.acceptedCount > 0 + ? setAutoCorrectDetailsOpen((o) => !o) + : setIsAutoCorrectModalOpen(true) + : undefined + } + autoCorrectedCount={autoCorrect.acceptedCount} /> - setIsAddLyricsModalOpen(true)} - onAddLyricsInline={handleAddLyrics} - onSearchLyrics={handleSearchLyrics} + + setAutoCorrectDetailsOpen(false)} + onRerun={() => { + setAutoCorrectDetailsOpen(false) + setIsAutoCorrectModalOpen(true) + }} + /> + +
+ { + updateDataWithHistory(updatedData, 'direct data change') + }} + reviewMode={reviewMode} + onRevertCorrection={handleRevertCorrection} + onEditCorrection={handleEditCorrection} + onAcceptCorrection={handleAcceptCorrection} + onShowCorrectionDetail={handleShowCorrectionDetail} + activeGapWordIds={activeGapWordIds} + advancedMode={advancedMode} + onAdvancedModeToggle={handleAdvancedModeToggle} + editedWordIds={editedWordIds} + aiCorrectedWordIds={aiCorrectedWordIds} + aiOriginalTextByWordId={aiOriginalTextByWordId} + aiEstimatedWordIds={aiEstimatedWordIds} + isDuet={isDuet} + onSegmentSingerChange={(segmentIdx, next) => { + const segments = [...data.corrected_segments] + segments[segmentIdx] = { ...segments[segmentIdx], singer: next } + updateDataWithHistory({ ...data, corrected_segments: segments }, 'singer change') + }} + onSegmentFocus={setFocusedSegmentIndex} + /> + setIsAddLyricsModalOpen(true)} + onAddLyricsInline={handleAddLyrics} + onSearchLyrics={handleSearchLyrics} + defaultArtist={data.metadata?.artist || ''} + defaultTitle={data.metadata?.title || ''} + /> +
+ + {/* Spacer for sticky footer */} + {!isReadOnly && apiClient &&
} + + {/* Sticky footer bar */} + {!isReadOnly && apiClient && ( +
+ + {data.gap_sequences.length > 0 && ( +
+
+
0 ? ((data.gap_sequences.length - uncorrectedGaps.length) / data.gap_sequences.length) * 100 : 0}%`, + }} + /> +
+ {uncorrectedGaps.length === 0 ? ( + + + All gaps reviewed + + ) : ( + + {data.gap_sequences.length - uncorrectedGaps.length}/{data.gap_sequences.length} gaps reviewed + + )} +
+ )} + {apiClient?.saveReviewSession && ( + <> + + + + )} + Lyrics look good? + +
+ )} + + {/* Modals */} + { + setEditModalSegment(null) + handleSetModalSpacebarHandler(undefined) + }} + segment={ + editModalSegment?.segment + ? timingOffsetMs !== 0 + ? applyOffsetToSegment(editModalSegment.segment, timingOffsetMs) + : editModalSegment.segment + : null + } + segmentIndex={editModalSegment?.index ?? null} + originalSegment={ + editModalSegment?.originalSegment + ? timingOffsetMs !== 0 + ? applyOffsetToSegment(editModalSegment.originalSegment, timingOffsetMs) + : editModalSegment.originalSegment + : null + } + onSave={handleUpdateSegment} + onDelete={handleDeleteSegment} + onAddSegment={handleAddSegment} + onSplitSegment={handleSplitSegment} + onMergeSegment={handleMergeSegment} + onPlaySegment={handlePlaySegment} + currentTime={currentAudioTime} + originalTranscribedSegment={ + editModalSegment?.segment && + editModalSegment?.index !== null && + originalData.original_segments + ? (() => { + const origSegment = + originalData.original_segments.find( + (s: LyricsSegment) => s.id === editModalSegment.segment.id + ) || null + return origSegment && timingOffsetMs !== 0 + ? applyOffsetToSegment(origSegment, timingOffsetMs) + : origSegment + })() + : null + } + /> + + setIsReviewModalOpen(false)} + data={data} + onSubmit={handleSubmitToServer} + isSubmitting={isSubmitting} + apiClient={apiClient} + timingOffsetMs={timingOffsetMs} + isDuet={isDuet} + /> + + setIsAddLyricsModalOpen(false)} + onAdd={handleAddLyrics} + onSearch={handleSearchLyrics} defaultArtist={data.metadata?.artist || ''} defaultTitle={data.metadata?.title || ''} /> -
- {/* Spacer for sticky footer */} - {!isReadOnly && apiClient &&
} + setIsFindReplaceModalOpen(false)} + onReplace={handleFindReplace} + data={data} + /> - {/* Sticky footer bar */} - {!isReadOnly && apiClient && ( -
- setIsTimingOffsetModalOpen(false)} + currentOffset={timingOffsetMs} + onApply={handleApplyTimingOffset} + /> + + setIsReplaceAllLyricsModalOpen(false)} + onSave={handleSaveReplaceAllLyrics} + onPlaySegment={handlePlaySegment} + currentTime={currentAudioTime} + setModalSpacebarHandler={handleSetModalSpacebarHandler} + existingSegments={data.corrected_segments} + jobId={jobId ?? ''} + artist={data.metadata?.artist} + title={data.metadata?.title} + authToken={getAccessToken() ?? undefined} + /> + + setIsAutoCorrectModalOpen(false)} + onRun={(settings) => void autoCorrect.run(settings)} + onCancelRun={autoCorrect.cancel} + status={autoCorrect.status} + error={autoCorrect.error} + hasReferences={autoCorrect.hasReferences} + /> + + setShowFeedbackBar(false)} + /> + + {selectedCorrection && ( + { + setCorrectionDetailOpen(false) + setSelectedCorrection(null) + }} + originalWord={selectedCorrection.originalWord} + correctedWord={selectedCorrection.correctedWord} + category={selectedCorrection.category} + confidence={selectedCorrection.confidence} + reason={selectedCorrection.reason} + handler={selectedCorrection.handler} + source={selectedCorrection.source} + onRevert={() => { + handleRevertCorrection(selectedCorrection.wordId) + setCorrectionDetailOpen(false) + setSelectedCorrection(null) + }} + onEdit={() => { + handleEditCorrection(selectedCorrection.wordId) + setCorrectionDetailOpen(false) + setSelectedCorrection(null) + }} + onAccept={() => { + handleAcceptCorrection(selectedCorrection.wordId) + setCorrectionDetailOpen(false) + setSelectedCorrection(null) + }} /> - {data.gap_sequences.length > 0 && ( -
-
-
0 ? ((data.gap_sequences.length - uncorrectedGaps.length) / data.gap_sequences.length) * 100 : 0}%`, - }} - /> -
- {uncorrectedGaps.length === 0 ? ( - - - All gaps reviewed - - ) : ( - - {data.gap_sequences.length - uncorrectedGaps.length}/{data.gap_sequences.length} gaps reviewed - - )} -
- )} - {apiClient?.saveReviewSession && ( - <> - - - - )} - Lyrics look good? - -
- )} + )} - {/* Modals */} - { - setEditModalSegment(null) - handleSetModalSpacebarHandler(undefined) - }} - segment={ - editModalSegment?.segment - ? timingOffsetMs !== 0 - ? applyOffsetToSegment(editModalSegment.segment, timingOffsetMs) - : editModalSegment.segment - : null - } - segmentIndex={editModalSegment?.index ?? null} - originalSegment={ - editModalSegment?.originalSegment - ? timingOffsetMs !== 0 - ? applyOffsetToSegment(editModalSegment.originalSegment, timingOffsetMs) - : editModalSegment.originalSegment - : null - } - onSave={handleUpdateSegment} - onDelete={handleDeleteSegment} - onAddSegment={handleAddSegment} - onSplitSegment={handleSplitSegment} - onMergeSegment={handleMergeSegment} - onPlaySegment={handlePlaySegment} - currentTime={currentAudioTime} - originalTranscribedSegment={ - editModalSegment?.segment && - editModalSegment?.index !== null && - originalData.original_segments - ? (() => { - const origSegment = - originalData.original_segments.find( - (s: LyricsSegment) => s.id === editModalSegment.segment.id - ) || null - return origSegment && timingOffsetMs !== 0 - ? applyOffsetToSegment(origSegment, timingOffsetMs) - : origSegment - })() - : null - } - /> - - setIsReviewModalOpen(false)} - data={data} - onSubmit={handleSubmitToServer} - isSubmitting={isSubmitting} - apiClient={apiClient} - timingOffsetMs={timingOffsetMs} - isDuet={isDuet} - /> - - setIsAddLyricsModalOpen(false)} - onAdd={handleAddLyrics} - onSearch={handleSearchLyrics} - defaultArtist={data.metadata?.artist || ''} - defaultTitle={data.metadata?.title || ''} - /> - - setIsFindReplaceModalOpen(false)} - onReplace={handleFindReplace} - data={data} - /> - - setIsTimingOffsetModalOpen(false)} - currentOffset={timingOffsetMs} - onApply={handleApplyTimingOffset} - /> - - setIsReplaceAllLyricsModalOpen(false)} - onSave={handleSaveReplaceAllLyrics} - onPlaySegment={handlePlaySegment} - currentTime={currentAudioTime} - setModalSpacebarHandler={handleSetModalSpacebarHandler} - existingSegments={data.corrected_segments} - jobId={jobId ?? ''} - artist={data.metadata?.artist} - title={data.metadata?.title} - authToken={getAccessToken() ?? undefined} - /> - - setIsAutoCorrectModalOpen(false)} - onRun={(settings) => void autoCorrect.run(settings)} - onCancelRun={autoCorrect.cancel} - status={autoCorrect.status} - error={autoCorrect.error} - hasReferences={autoCorrect.hasReferences} - /> - - setShowFeedbackBar(false)} - /> - - {selectedCorrection && ( - { - setCorrectionDetailOpen(false) - setSelectedCorrection(null) - }} - originalWord={selectedCorrection.originalWord} - correctedWord={selectedCorrection.correctedWord} - category={selectedCorrection.category} - confidence={selectedCorrection.confidence} - reason={selectedCorrection.reason} - handler={selectedCorrection.handler} - source={selectedCorrection.source} - onRevert={() => { - handleRevertCorrection(selectedCorrection.wordId) - setCorrectionDetailOpen(false) - setSelectedCorrection(null) - }} - onEdit={() => { - handleEditCorrection(selectedCorrection.wordId) - setCorrectionDetailOpen(false) - setSelectedCorrection(null) - }} - onAccept={() => { - handleAcceptCorrection(selectedCorrection.wordId) - setCorrectionDetailOpen(false) - setSelectedCorrection(null) - }} - /> - )} - - {!isReadOnly && ( - setSessionRestoreOpen(false)} - onRestore={handleSessionRestore} - sessions={savedSessions} - apiClient={sessionClient as LyricsReviewApiClient} - isLoading={sessionsLoading} - /> - )} -
+ {!isReadOnly && ( + setSessionRestoreOpen(false)} + onRestore={handleSessionRestore} + sessions={savedSessions} + apiClient={sessionClient as LyricsReviewApiClient} + isLoading={sessionsLoading} + /> + )} +
+ ) } diff --git a/frontend/components/lyrics-review/TimelineEditor.tsx b/frontend/components/lyrics-review/TimelineEditor.tsx index d1374c98..148fff64 100644 --- a/frontend/components/lyrics-review/TimelineEditor.tsx +++ b/frontend/components/lyrics-review/TimelineEditor.tsx @@ -3,6 +3,8 @@ import { useRef, useState } from 'react' import { Word } from '@/lib/lyrics-review/types' import { cn } from '@/lib/utils' +import { WaveformVisualizer } from './WaveformVisualizer' +import { VocalsAudioDataLoaderContext } from './VocalsAudioDataLoader' interface TimelineEditorProps { words: Word[] @@ -241,14 +243,14 @@ export default function TimelineEditor({ return (
{/* Timeline ruler */}
{generateTimelineMarks()} @@ -263,52 +265,65 @@ export default function TimelineEditor({ )} {/* Word blocks */} - {words.map((word, index) => { - if (word.start_time === null || word.end_time === null) return null +
+ {words.map((word, index) => { + if (word.start_time === null || word.end_time === null) return null - const leftPosition = timeToPosition(word.start_time) - const rightPosition = timeToPosition(word.end_time) - const width = rightPosition - leftPosition + const leftPosition = timeToPosition(word.start_time) + const rightPosition = timeToPosition(word.end_time) + const width = rightPosition - leftPosition - return ( -
{ - e.stopPropagation() - handleMouseDown(e, index, 'move') - }} - onContextMenu={(e) => handleContextMenu(e, index)} - > - {/* Left resize handle */} + return (
{ e.stopPropagation() - handleMouseDown(e, index, 'resize-left') + handleMouseDown(e, index, 'move') }} - /> - {word.text} - {/* Right resize handle */} -
{ - e.stopPropagation() - handleMouseDown(e, index, 'resize-right') - }} - /> -
- ) - })} + onContextMenu={(e) => handleContextMenu(e, index)} + > + {/* Left resize handle */} +
{ + e.stopPropagation() + handleMouseDown(e, index, 'resize-left') + }} + /> + {word.text} + {/* Right resize handle */} +
{ + e.stopPropagation() + handleMouseDown(e, index, 'resize-right') + }} + /> +
+ ) + })} +
+ + + {({ audioData: vocalsAudioData }) => ( + vocalsAudioData && + )} +
) } diff --git a/frontend/components/lyrics-review/VocalsAudioDataLoader.tsx b/frontend/components/lyrics-review/VocalsAudioDataLoader.tsx new file mode 100644 index 00000000..3ac517db --- /dev/null +++ b/frontend/components/lyrics-review/VocalsAudioDataLoader.tsx @@ -0,0 +1,43 @@ +import { AudioData, fetchAudioData } from '@/lib/audio-data' +import { createContext, PropsWithChildren, useEffect, useState } from 'react' + +export const VocalsAudioDataLoaderContext = createContext<{ audioData: AudioData | null }>({ audioData: null }) + +export interface AudioDataLoaderProps extends PropsWithChildren { + audioUrl: string | null +} + +export const VocalsAudioDataLoader = ({ audioUrl, children }: AudioDataLoaderProps) => { + const [audioData, setAudioData] = useState(null) + + useEffect(() => { + if (!audioUrl) return + + // Guard against (a) an unhandled rejection when the endpoint 404s (no vocal + // stem for this job) and (b) a stale in-flight fetch resolving after a newer + // audioUrl has already been set. + let cancelled = false + + fetchAudioData(audioUrl) + .then((audioData) => { + if (!cancelled) setAudioData(audioData) + }) + .catch((error) => { + if (!cancelled) { + console.error('Failed to load vocals audio data', error) + setAudioData(null) + } + }) + + return () => { + cancelled = true + setAudioData(null) + } + }, [audioUrl]) + + return ( + + {children} + + ) +} diff --git a/frontend/components/lyrics-review/WaveformVisualizer.tsx b/frontend/components/lyrics-review/WaveformVisualizer.tsx new file mode 100644 index 00000000..60302e72 --- /dev/null +++ b/frontend/components/lyrics-review/WaveformVisualizer.tsx @@ -0,0 +1,113 @@ +import { HTMLProps, useCallback, useEffect, useRef, useState } from 'react' +import colors from 'tailwindcss/colors' +import { AudioData } from '@/lib/audio-data' +import { useAudioReady } from '@/lib/lyrics-review/hooks/useAudioReady' + +export interface WaveformVisualizerProps extends Omit, 'width' | 'height'> { + startTime: number + endTime: number + audioData: AudioData | null + barColor?: string +} + +export const WaveformVisualizer = ({ + startTime, + endTime, + audioData, + className, + barColor = colors.yellow['500'], + ... canvasProps +}: WaveformVisualizerProps) => { + const containerRef = useRef(null) + const canvasCtxRef = useRef(null) + const audioReady = useAudioReady() + const [canvasSize, setCanvasSize] = useState<{ width: number; height: number; }>({ width: 0, height: 0 }) + + useEffect(() => { + if (!containerRef.current) return + + const resizeObserver = new ResizeObserver((entries) => { + const size = entries.at(-1)!.contentBoxSize[0] + setCanvasSize({ + width: size.inlineSize, + height: size.blockSize + }) + }) + resizeObserver.observe(containerRef.current, { + box: 'content-box' + }) + + return () => { + resizeObserver.disconnect() + } + }, [containerRef.current]) + + const readAudioData = useCallback((startTime: number, endTime: number) => { + if (audioData == null) return null + + // Index directly into the time-based peak envelope (peaksPerSecond buckets + // per second) so we only ever touch the window being drawn, never the whole + // track. + const startIndex = Math.max(0, Math.floor(startTime * audioData.peaksPerSecond)) + const endIndex = Math.min(audioData.peaks.length, Math.ceil(endTime * audioData.peaksPerSecond)) + return audioData.peaks.slice(startIndex, endIndex) + }, [audioData]) + + const render = useCallback((startTime: number, endTime: number) => { + const ctx = canvasCtxRef.current + if (!ctx) return + + ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height) + + ctx.fillStyle = barColor + + const audioData = readAudioData(startTime, endTime) + if (!audioData) return + + for (let x = 0; x < ctx.canvas.width; x++) { + // Clamp the first pixel: (x - 0.5) is negative at x=0, and a negative + // slice start would sample peaks from the end of the window instead. + const dataPointIndex = Math.max(0, Math.floor((x - 0.5) / ctx.canvas.width * audioData.length)) + // When fewer peaks than pixels are visible (zoomed in), adjacent columns + // floor to the same index; force at least one peak per column so the + // waveform doesn't render zero-height gaps. + const nextDataPointIndex = Math.max( + dataPointIndex + 1, + Math.floor((x + 0.5) / ctx.canvas.width * audioData.length) + ) + + const amplitude = audioData + .slice(dataPointIndex, nextDataPointIndex) + .reduce((maxAmplitude, point) => Math.max(maxAmplitude, Math.abs(point)), 0) + + const barHeight = amplitude * ctx.canvas.height + + ctx.fillRect(x, (ctx.canvas.height - barHeight) / 2, 1, barHeight) + } + }, [readAudioData, barColor]) + + // Re-render when the data (readAudioData is memoized on audioData), the window, + // the canvas size, or the colour changes. audioData arrives asynchronously, so + // omitting `render` here would leave the canvas blank until an unrelated prop + // changed. + useEffect(() => { + render(startTime, endTime) + }, [render, startTime, endTime, canvasSize, audioReady.ready]) + + return ( +
+ { + canvasCtxRef.current = el?.getContext('2d') ?? null + }} + className={"w-[100%] h-[100%]"} + width={canvasSize.width} + height={canvasSize.height} + {... canvasProps} + > +
+ ) +} diff --git a/frontend/components/lyrics-review/modals/EditModal.tsx b/frontend/components/lyrics-review/modals/EditModal.tsx index e283b445..eb9ce17c 100644 --- a/frontend/components/lyrics-review/modals/EditModal.tsx +++ b/frontend/components/lyrics-review/modals/EditModal.tsx @@ -5,7 +5,8 @@ import { useState, useEffect, useCallback, useRef } from 'react' import { toast } from 'sonner' import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' -import { Loader2, Play, Square, RotateCcw, Trash2, History } from 'lucide-react' +import { Loader2, Play, Square, RotateCcw, Trash2, History, XCircle } from 'lucide-react' +import { cn } from '@/lib/utils' import { LyricsSegment, Word } from '@/lib/lyrics-review/types' import { nanoid } from 'nanoid' import EditWordList from '../EditWordList' @@ -56,6 +57,7 @@ export default function EditModal({ const t = useTranslations('lyricsReview.modals.editAll') const tActions = useTranslations('lyricsReview.editActionBar') const tHeader = useTranslations('lyricsReview.header') + const tTimeline = useTranslations('lyricsReview.editTimeline') const { ready: audioReady } = useAudioReady() const [editedSegment, setEditedSegment] = useState(segment) const [timingFixCount, setTimingFixCount] = useState(0) @@ -383,23 +385,65 @@ export default function EditModal({ return ( !isOpen && handleClose()}> - + - - {isGlobal ? t('title') : t('editSegment', { index: segmentIndex ?? 0 })} - {segment && segment.start_time !== null && onPlaySegment && ( + {/* Left: title (with the segment's time range folded into the heading) + + play. Right: Tap To Sync, moved up here to reclaim vertical space + above the word list. pr-10 keeps it clear of the dialog close button. */} +
+ + + {isGlobal ? t('title') : t('editSegment', { index: segmentIndex ?? 0 })} + {!isGlobal && + editedSegment && + editedSegment.start_time !== null && + editedSegment.end_time !== null && ( + + {' '} + ({editedSegment.start_time.toFixed(2)} - {editedSegment.end_time.toFixed(2)}) + + )} + + {segment && segment.start_time !== null && onPlaySegment && ( + + )} + + + {/* Tap To Sync toggle (relocated from EditTimelineSection) */} + {editedSegment && editedSegment.words.some((w) => w.start_time !== null) && ( )} - +
{isLoading ? ( @@ -410,7 +454,7 @@ export default function EditModal({

) : editedSegment ? ( -
+
{timingFixCount > 0 && (
Promise searchLyrics: (artist: string, title: string, forceSources?: string[]) => Promise getAudioUrl: (hash: string) => string + getVocalsAudioUrl: () => string generatePreviewVideo: (data: CorrectionData, isDuet?: boolean) => Promise<{ status: string message?: string @@ -3627,6 +3628,15 @@ export function createLyricsReviewApiClient(jobId: string): LyricsReviewApiClien return token ? `${base}?token=${encodeURIComponent(token)}` : base }, + /** + * Get vocals audio URL for playback + */ + getVocalsAudioUrl(): string { + const token = getAccessToken() + const base = `${API_BASE_URL}/api/review/${jobId}/audio/vocals` + return token ? `${base}?token=${encodeURIComponent(token)}` : base + }, + /** * Generate a preview video from the current correction data */ diff --git a/frontend/lib/audio-data.ts b/frontend/lib/audio-data.ts new file mode 100644 index 00000000..2a732106 --- /dev/null +++ b/frontend/lib/audio-data.ts @@ -0,0 +1,67 @@ +export interface AudioData { + duration: number + // Downsampled absolute-amplitude envelope: one peak per bucket. Storing the + // envelope instead of the raw PCM keeps a whole vocal track in ~hundreds of KB + // (peaksPerSecond * duration * 4 bytes) rather than the tens of MB a full + // Float32Array of decoded samples would occupy, which noticeably slows the app. + peaks: Float32Array + peaksPerSecond: number +} + +// Resolution of the precomputed peak envelope. High enough to stay crisp when a +// short segment is zoomed across the full timeline width, low enough to keep the +// whole track tiny in memory. 400/s over a 4-minute song ≈ 96k floats (~384 KB). +const PEAKS_PER_SECOND = 400 + +export async function fetchAudioData(url: string): Promise { + // fetch() resolves even for 4xx/5xx; the vocals endpoint 404s when a job has + // no vocal stem. Fail explicitly so the caller sees "no vocals" rather than an + // opaque decodeAudioData error on the JSON/HTML error body. + const response = await fetch(url) + if (!response.ok) { + throw new Error(`Failed to fetch vocals audio: ${response.status}`) + } + const arrayBuffer = await response.arrayBuffer() + + const context = new AudioContext() + + try { + const decoded = await context.decodeAudioData(arrayBuffer) + + const { duration, numberOfChannels, length } = decoded + const bucketCount = Math.max(1, Math.ceil(duration * PEAKS_PER_SECOND)) + const samplesPerBucket = Math.max(1, Math.floor(length / bucketCount)) + const peaks = new Float32Array(bucketCount) + + // Collapse all channels into a single envelope by taking the maximum + // absolute sample value in each bucket. Iterate per bucket (not per sample) + // so we avoid a division + Math.floor on every one of the ~millions of + // samples, which would otherwise freeze the main thread while loading. + // The raw decoded buffer is released when this function returns; only the + // compact `peaks` array is retained. + for (let channelIdx = 0; channelIdx < numberOfChannels; channelIdx++) { + const channelData = decoded.getChannelData(channelIdx) + for (let bucket = 0; bucket < bucketCount; bucket++) { + const start = bucket * samplesPerBucket + if (start >= length) break + const end = bucket === bucketCount - 1 ? length : Math.min(length, start + samplesPerBucket) + let peak = peaks[bucket] + for (let i = start; i < end; i++) { + const amplitude = Math.abs(channelData[i]) + if (amplitude > peak) { + peak = amplitude + } + } + peaks[bucket] = peak + } + } + + return { + duration, + peaks, + peaksPerSecond: PEAKS_PER_SECOND + } + } finally { + context.close() + } +} diff --git a/frontend/messages/ar.json b/frontend/messages/ar.json index 3b4eded5..db9a3783 100644 --- a/frontend/messages/ar.json +++ b/frontend/messages/ar.json @@ -1389,6 +1389,16 @@ "rerun": "إعادة التنفيذ", "revertAllAuto": "التراجع عن الكل", "showDetails": "عرض التفاصيل" + }, + "editTimeline": { + "holdingRelease": "جاري الضغط... أفلت عندما تنتهي الكلمة", + "pressSpacebarHint": "اضغط على زر المسافة عندما تبدأ الكلمة (انقر للكلمات القصيرة، واستمر بالضغط للكلمات الطويلة)", + "tapToSync": "انقر للمزامنة", + "tapWhenStarts": "انقر على الزر عندما تبدأ الكلمة", + "wordProgress": "الكلمة {index} من {total}:", + "cancelSync": "إلغاء", + "hold": "اضغط مطولاً...", + "tap": "انقر" } }, "instrumentalReview": { diff --git a/frontend/messages/ca.json b/frontend/messages/ca.json index af8b6fe7..64766815 100644 --- a/frontend/messages/ca.json +++ b/frontend/messages/ca.json @@ -1389,6 +1389,16 @@ "rerun": "Torna a executar", "revertAllAuto": "Reverteix-ho tot", "showDetails": "Mostra els detalls" + }, + "editTimeline": { + "holdingRelease": "Mantenint premut... Deixa anar quan acabi la paraula", + "pressSpacebarHint": "Prem la barra espaiadora quan comenci la paraula (toca per a paraules curtes, mantén premut per a paraules llargues)", + "tapToSync": "Toca per sincronitzar", + "tapWhenStarts": "Toca el botó quan comenci la paraula", + "wordProgress": "Paraula {index} de {total}:", + "cancelSync": "Cancel·la", + "hold": "MANTÉN...", + "tap": "TOCA" } }, "instrumentalReview": { diff --git a/frontend/messages/cs.json b/frontend/messages/cs.json index 07fb7fa9..5f0d08ea 100644 --- a/frontend/messages/cs.json +++ b/frontend/messages/cs.json @@ -1389,6 +1389,16 @@ "rerun": "Spustit znovu", "revertAllAuto": "Vrátit vše", "showDetails": "Zobrazit podrobnosti" + }, + "editTimeline": { + "holdingRelease": "Držíš... Pusť, když slovo skončí", + "pressSpacebarHint": "Stiskni mezerník, když slovo začne (ťukni pro krátká slova, podrž pro dlouhá slova)", + "tapToSync": "Ťukni pro synchronizaci", + "tapWhenStarts": "Ťukni na tlačítko, když slovo začne", + "wordProgress": "Slovo {index} z {total}:", + "cancelSync": "Zrušit", + "hold": "DRŽ...", + "tap": "KLEPNI" } }, "instrumentalReview": { diff --git a/frontend/messages/da.json b/frontend/messages/da.json index 75d63b85..e17530a0 100644 --- a/frontend/messages/da.json +++ b/frontend/messages/da.json @@ -1389,6 +1389,16 @@ "rerun": "Kør igen", "revertAllAuto": "Fortryd alle", "showDetails": "Vis detaljer" + }, + "editTimeline": { + "holdingRelease": "Holder nede... Slip, når ordet slutter", + "pressSpacebarHint": "Tryk på mellemrumstasten, når ordet starter (tryk for korte ord, hold nede for lange ord)", + "tapToSync": "Tryk for at synkronisere", + "tapWhenStarts": "Tryk på knappen, når ordet starter", + "wordProgress": "Ord {index} af {total}:", + "cancelSync": "Annuller", + "hold": "HOLD...", + "tap": "TRYK" } }, "instrumentalReview": { diff --git a/frontend/messages/de.json b/frontend/messages/de.json index f2adf59c..648178d8 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -1389,6 +1389,16 @@ "rerun": "Erneut ausführen", "revertAllAuto": "Alle rückgängig machen", "showDetails": "Details anzeigen" + }, + "editTimeline": { + "holdingRelease": "Gedrückt halten... Loslassen, wenn das Wort endet", + "pressSpacebarHint": "Drücke die Leertaste, wenn das Wort beginnt (tippen für kurze Wörter, gedrückt halten für lange Wörter)", + "tapToSync": "Tippen zum Synchronisieren", + "tapWhenStarts": "Tippe auf den Button, wenn das Wort beginnt", + "wordProgress": "Wort {index} von {total}:", + "cancelSync": "Abbrechen", + "hold": "HALTEN...", + "tap": "TIPPEN" } }, "instrumentalReview": { diff --git a/frontend/messages/el.json b/frontend/messages/el.json index db3ac181..578493f5 100644 --- a/frontend/messages/el.json +++ b/frontend/messages/el.json @@ -1389,6 +1389,16 @@ "rerun": "Επανεκτέλεση", "revertAllAuto": "Αναίρεση όλων", "showDetails": "Εμφάνιση λεπτομερειών" + }, + "editTimeline": { + "holdingRelease": "Κρατάς πατημένο... Άφησέ το όταν τελειώσει η λέξη", + "pressSpacebarHint": "Πάτησε το spacebar όταν ξεκινάει η λέξη (πάτησε στιγμιαία για μικρές λέξεις, κράτα πατημένο για μεγάλες λέξεις)", + "tapToSync": "Πάτησε για συγχρονισμό", + "tapWhenStarts": "Πάτησε το κουμπί όταν ξεκινάει η λέξη", + "wordProgress": "Λέξη {index} από {total}:", + "cancelSync": "Ακύρωση", + "hold": "ΚΡΑΤΑ...", + "tap": "ΠΑΤΑ" } }, "instrumentalReview": { diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 72929775..31b767c9 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1337,6 +1337,16 @@ }, "upcomingMore": "+{count} more" }, + "editTimeline": { + "tapToSync": "Tap To Sync", + "cancelSync": "Cancel", + "wordProgress": "Word {index} of {total}:", + "holdingRelease": "Holding... Release when word ends", + "tapWhenStarts": "Tap the button when word starts", + "pressSpacebarHint": "Press spacebar when word starts (tap for short words, hold for long words)", + "tap": "TAP", + "hold": "HOLD..." + }, "duet": { "markAsDuet": "Duet Mode", "duetOn": "Duet: ON", diff --git a/frontend/messages/es.json b/frontend/messages/es.json index d1f11bb9..2fb8e202 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -1389,6 +1389,16 @@ "rerun": "Volver a ejecutar", "revertAllAuto": "Revertir todo", "showDetails": "Mostrar detalles" + }, + "editTimeline": { + "holdingRelease": "Manteniendo presionado... Suelta cuando termine la palabra", + "pressSpacebarHint": "Presiona la barra espaciadora cuando empiece la palabra (toca para palabras cortas, mantén presionado para palabras largas)", + "tapToSync": "Toca para sincronizar", + "tapWhenStarts": "Toca el botón cuando empiece la palabra", + "wordProgress": "Palabra {index} de {total}:", + "cancelSync": "Cancelar", + "hold": "MANTÉN...", + "tap": "TOCA" } }, "instrumentalReview": { diff --git a/frontend/messages/fi.json b/frontend/messages/fi.json index 9fa7084d..cd294d54 100644 --- a/frontend/messages/fi.json +++ b/frontend/messages/fi.json @@ -1389,6 +1389,16 @@ "rerun": "Suorita uudelleen", "revertAllAuto": "Kumoa kaikki", "showDetails": "Näytä tiedot" + }, + "editTimeline": { + "holdingRelease": "Pidä painettuna... Vapauta, kun sana päättyy", + "pressSpacebarHint": "Paina välilyöntiä, kun sana alkaa (napauta lyhyiden sanojen kohdalla, pidä painettuna pitkien kohdalla)", + "tapToSync": "Napauta synkronoidaksesi", + "tapWhenStarts": "Napauta painiketta, kun sana alkaa", + "wordProgress": "Sana {index}/{total}:", + "cancelSync": "Peruuta", + "hold": "PIDÄ...", + "tap": "NAPAUTA" } }, "instrumentalReview": { diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index 18907436..74139d85 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -1389,6 +1389,16 @@ "rerun": "Relancer", "revertAllAuto": "Tout rétablir", "showDetails": "Afficher les détails" + }, + "editTimeline": { + "holdingRelease": "Maintiens... Relâche quand le mot se termine", + "pressSpacebarHint": "Appuie sur la barre d'espace quand le mot commence (appuie brièvement pour les mots courts, maintiens pour les mots longs)", + "tapToSync": "Appuie pour synchroniser", + "tapWhenStarts": "Appuie sur le bouton quand le mot commence", + "wordProgress": "Mot {index} sur {total} :", + "cancelSync": "Annuler", + "hold": "MAINTIENS...", + "tap": "APPUIE" } }, "instrumentalReview": { diff --git a/frontend/messages/he.json b/frontend/messages/he.json index e271d32b..1f8e55e3 100644 --- a/frontend/messages/he.json +++ b/frontend/messages/he.json @@ -1389,6 +1389,16 @@ "rerun": "הפעל מחדש", "revertAllAuto": "בטל הכל", "showDetails": "הצג פרטים" + }, + "editTimeline": { + "holdingRelease": "לחוץ... שחרר כשהמילה מסתיימת", + "pressSpacebarHint": "לחץ על מקש הרווח כשהמילה מתחילה (הקש למילים קצרות, החזק למילים ארוכות)", + "tapToSync": "הקש לסנכרון", + "tapWhenStarts": "הקש על הכפתור כשהמילה מתחילה", + "wordProgress": "מילה {index} מתוך {total}:", + "cancelSync": "ביטול", + "hold": "החזק...", + "tap": "הקש" } }, "instrumentalReview": { diff --git a/frontend/messages/hi.json b/frontend/messages/hi.json index c32a792d..9fbee833 100644 --- a/frontend/messages/hi.json +++ b/frontend/messages/hi.json @@ -1389,6 +1389,16 @@ "rerun": "फिर से चलाओ", "revertAllAuto": "सब पहले जैसा करो", "showDetails": "विवरण दिखाओ" + }, + "editTimeline": { + "holdingRelease": "दबाए हुए... शब्द खत्म होने पर छोड़ दो", + "pressSpacebarHint": "शब्द शुरू होने पर स्पेसबार दबाओ (छोटे शब्दों के लिए टैप करो, लंबे शब्दों के लिए दबाए रखो)", + "tapToSync": "सिंक करने के लिए टैप करो", + "tapWhenStarts": "शब्द शुरू होने पर बटन टैप करो", + "wordProgress": "{total} में से {index} शब्द:", + "cancelSync": "कैंसल", + "hold": "दबाए रखो...", + "tap": "टैप करो" } }, "instrumentalReview": { diff --git a/frontend/messages/hr.json b/frontend/messages/hr.json index a5e6aa2c..dcdbbed3 100644 --- a/frontend/messages/hr.json +++ b/frontend/messages/hr.json @@ -1389,6 +1389,16 @@ "rerun": "Pokreni ponovno", "revertAllAuto": "Poništi sve", "showDetails": "Prikaži detalje" + }, + "editTimeline": { + "holdingRelease": "Drži... Otpusti kada riječ završi", + "pressSpacebarHint": "Pritisni razmaknicu kada riječ počne (dodirni za kratke riječi, drži za duge riječi)", + "tapToSync": "Dodirni za sinkronizaciju", + "tapWhenStarts": "Dodirni gumb kada riječ počne", + "wordProgress": "Riječ {index} od {total}:", + "cancelSync": "Odustani", + "hold": "DRŽI...", + "tap": "TAPNI" } }, "instrumentalReview": { diff --git a/frontend/messages/hu.json b/frontend/messages/hu.json index 29f8cfce..de14b5f1 100644 --- a/frontend/messages/hu.json +++ b/frontend/messages/hu.json @@ -1389,6 +1389,16 @@ "rerun": "Újrafuttatás", "revertAllAuto": "Összes visszavonása", "showDetails": "Részletek megjelenítése" + }, + "editTimeline": { + "holdingRelease": "Nyomva tartva... Engedd fel, amikor a szó véget ér", + "pressSpacebarHint": "Nyomd meg a szóköz billentyűt, amikor a szó elkezdődik (rövid szavaknál röviden nyomd meg, hosszú szavaknál tartsd nyomva)", + "tapToSync": "Koppints a szinkronizáláshoz", + "tapWhenStarts": "Koppints a gombra, amikor a szó elkezdődik", + "wordProgress": "{index}. szó a(z) {total} közül:", + "cancelSync": "Mégse", + "hold": "TARTSD...", + "tap": "KOPPINTS" } }, "instrumentalReview": { diff --git a/frontend/messages/id.json b/frontend/messages/id.json index db19d81a..ad6e9d40 100644 --- a/frontend/messages/id.json +++ b/frontend/messages/id.json @@ -1389,6 +1389,16 @@ "rerun": "Jalankan ulang", "revertAllAuto": "Kembalikan semua", "showDetails": "Tampilkan detail" + }, + "editTimeline": { + "holdingRelease": "Menahan... Lepaskan saat kata selesai", + "pressSpacebarHint": "Tekan spasi saat kata dimulai (ketuk untuk kata pendek, tahan untuk kata panjang)", + "tapToSync": "Ketuk Untuk Sinkronisasi", + "tapWhenStarts": "Ketuk tombol saat kata dimulai", + "wordProgress": "Kata {index} dari {total}:", + "cancelSync": "Batal", + "hold": "TAHAN...", + "tap": "KETUK" } }, "instrumentalReview": { diff --git a/frontend/messages/it.json b/frontend/messages/it.json index 2f547709..83128512 100644 --- a/frontend/messages/it.json +++ b/frontend/messages/it.json @@ -1389,6 +1389,16 @@ "rerun": "Riesegui", "revertAllAuto": "Ripristina tutto", "showDetails": "Mostra dettagli" + }, + "editTimeline": { + "holdingRelease": "Stai premendo... Rilascia quando la parola finisce", + "pressSpacebarHint": "Premi la barra spaziatrice quando inizia la parola (premi brevemente per le parole brevi, tieni premuto per quelle lunghe)", + "tapToSync": "Tocca per sincronizzare", + "tapWhenStarts": "Tocca il pulsante quando inizia la parola", + "wordProgress": "Parola {index} di {total}:", + "cancelSync": "Annulla", + "hold": "TIENI PREMUTO...", + "tap": "TOCCA" } }, "instrumentalReview": { diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json index d1c097d6..fbaa474a 100644 --- a/frontend/messages/ja.json +++ b/frontend/messages/ja.json @@ -1389,6 +1389,16 @@ "rerun": "再実行", "revertAllAuto": "すべて元に戻す", "showDetails": "詳細を表示" + }, + "editTimeline": { + "holdingRelease": "長押し中... 単語が終わったら離してください", + "pressSpacebarHint": "単語が始まったらスペースキーを押してください(短い単語はタップ、長い単語は長押し)", + "tapToSync": "タップして同期", + "tapWhenStarts": "単語が始まったらボタンをタップしてください", + "wordProgress": "単語 {index} / {total}:", + "cancelSync": "キャンセル", + "hold": "長押し...", + "tap": "タップ" } }, "instrumentalReview": { diff --git a/frontend/messages/ko.json b/frontend/messages/ko.json index 2f373e7b..e3402006 100644 --- a/frontend/messages/ko.json +++ b/frontend/messages/ko.json @@ -1389,6 +1389,16 @@ "rerun": "다시 실행", "revertAllAuto": "모두 되돌리기", "showDetails": "세부 정보 보기" + }, + "editTimeline": { + "holdingRelease": "누르는 중... 단어가 끝나면 떼세요", + "pressSpacebarHint": "단어가 시작될 때 스페이스바를 누르세요 (짧은 단어는 짧게, 긴 단어는 길게 누르세요)", + "tapToSync": "탭하여 동기화", + "tapWhenStarts": "단어가 시작될 때 버튼을 탭하세요", + "wordProgress": "단어 {index} / {total}:", + "cancelSync": "취소", + "hold": "길게 누르기...", + "tap": "탭" } }, "instrumentalReview": { diff --git a/frontend/messages/ms.json b/frontend/messages/ms.json index 6ba83cb1..f4a1bc27 100644 --- a/frontend/messages/ms.json +++ b/frontend/messages/ms.json @@ -1389,6 +1389,16 @@ "rerun": "Jalankan semula", "revertAllAuto": "Kembalikan semua", "showDetails": "Papar butiran" + }, + "editTimeline": { + "holdingRelease": "Sedang ditahan... Lepaskan apabila perkataan tamat", + "pressSpacebarHint": "Tekan bar ruang apabila perkataan bermula (ketik untuk perkataan pendek, tahan untuk perkataan panjang)", + "tapToSync": "Ketik Untuk Segerakkan", + "tapWhenStarts": "Ketik butang apabila perkataan bermula", + "wordProgress": "Perkataan {index} daripada {total}:", + "cancelSync": "Batal", + "hold": "TAHAN...", + "tap": "TEKAN" } }, "instrumentalReview": { diff --git a/frontend/messages/nb.json b/frontend/messages/nb.json index 006629d6..ac0b8619 100644 --- a/frontend/messages/nb.json +++ b/frontend/messages/nb.json @@ -1389,6 +1389,16 @@ "rerun": "Kjør på nytt", "revertAllAuto": "Tilbakestill alle", "showDetails": "Vis detaljer" + }, + "editTimeline": { + "holdingRelease": "Holder inne... Slipp når ordet slutter", + "pressSpacebarHint": "Trykk på mellomromstasten når ordet starter (trykk kort for korte ord, hold inne for lange ord)", + "tapToSync": "Trykk for å synkronisere", + "tapWhenStarts": "Trykk på knappen når ordet starter", + "wordProgress": "Ord {index} av {total}:", + "cancelSync": "Avbryt", + "hold": "HOLD...", + "tap": "TRYKK" } }, "instrumentalReview": { diff --git a/frontend/messages/nl.json b/frontend/messages/nl.json index 3c085ad8..ae400f2a 100644 --- a/frontend/messages/nl.json +++ b/frontend/messages/nl.json @@ -1389,6 +1389,16 @@ "rerun": "Opnieuw uitvoeren", "revertAllAuto": "Alles ongedaan maken", "showDetails": "Details tonen" + }, + "editTimeline": { + "holdingRelease": "Vasthouden... Laat los wanneer het woord eindigt", + "pressSpacebarHint": "Druk op de spatiebalk wanneer het woord begint (tik voor korte woorden, houd ingedrukt voor lange woorden)", + "tapToSync": "Tik om te synchroniseren", + "tapWhenStarts": "Tik op de knop wanneer het woord begint", + "wordProgress": "Woord {index} van {total}:", + "cancelSync": "Annuleren", + "hold": "HOUD VAST...", + "tap": "TIK" } }, "instrumentalReview": { diff --git a/frontend/messages/pl.json b/frontend/messages/pl.json index a7123e08..4cb84b22 100644 --- a/frontend/messages/pl.json +++ b/frontend/messages/pl.json @@ -1389,6 +1389,16 @@ "rerun": "Uruchom ponownie", "revertAllAuto": "Cofnij wszystko", "showDetails": "Pokaż szczegóły" + }, + "editTimeline": { + "holdingRelease": "Przytrzymujesz... Puść, gdy słowo się skończy", + "pressSpacebarHint": "Naciśnij spację, gdy zaczyna się słowo (naciśnij krótko przy krótkich słowach, przytrzymaj przy długich)", + "tapToSync": "Stuknij, aby zsynchronizować", + "tapWhenStarts": "Stuknij przycisk, gdy zaczyna się słowo", + "wordProgress": "Słowo {index} z {total}:", + "cancelSync": "Anuluj", + "hold": "PRZYTRZYMAJ...", + "tap": "STUKNIJ" } }, "instrumentalReview": { diff --git a/frontend/messages/pt.json b/frontend/messages/pt.json index 5032cd5d..2190c12c 100644 --- a/frontend/messages/pt.json +++ b/frontend/messages/pt.json @@ -1389,6 +1389,16 @@ "rerun": "Executar novamente", "revertAllAuto": "Reverter tudo", "showDetails": "Mostrar detalhes" + }, + "editTimeline": { + "holdingRelease": "Segurando... Solte quando a palavra terminar", + "pressSpacebarHint": "Pressione a barra de espaço quando a palavra começar (toque para palavras curtas, segure para palavras longas)", + "tapToSync": "Toque para sincronizar", + "tapWhenStarts": "Toque no botão quando a palavra começar", + "wordProgress": "Palavra {index} de {total}:", + "cancelSync": "Cancelar", + "hold": "SEGURE...", + "tap": "TOQUE" } }, "instrumentalReview": { diff --git a/frontend/messages/ro.json b/frontend/messages/ro.json index 4350f463..8f326547 100644 --- a/frontend/messages/ro.json +++ b/frontend/messages/ro.json @@ -1389,6 +1389,16 @@ "rerun": "Rulează din nou", "revertAllAuto": "Anulează tot", "showDetails": "Arată detaliile" + }, + "editTimeline": { + "holdingRelease": "Ții apăsat... Eliberează când se termină cuvântul", + "pressSpacebarHint": "Apasă tasta Space când începe cuvântul (apasă scurt pentru cuvinte scurte, ține apăsat pentru cuvinte lungi)", + "tapToSync": "Apasă pentru a sincroniza", + "tapWhenStarts": "Apasă butonul când începe cuvântul", + "wordProgress": "Cuvântul {index} din {total}:", + "cancelSync": "Anulează", + "hold": "ȚINE...", + "tap": "APASĂ" } }, "instrumentalReview": { diff --git a/frontend/messages/ru.json b/frontend/messages/ru.json index 993a488f..a2296ee3 100644 --- a/frontend/messages/ru.json +++ b/frontend/messages/ru.json @@ -1389,6 +1389,16 @@ "rerun": "Перезапустить", "revertAllAuto": "Отменить все", "showDetails": "Показать подробности" + }, + "editTimeline": { + "holdingRelease": "Удерживай... Отпусти, когда слово закончится", + "pressSpacebarHint": "Нажми пробел, когда начнется слово (нажми коротко для коротких слов, удерживай для длинных)", + "tapToSync": "Нажми для синхронизации", + "tapWhenStarts": "Нажми кнопку, когда начнется слово", + "wordProgress": "Слово {index} из {total}:", + "cancelSync": "Отмена", + "hold": "УДЕРЖИВАЙ...", + "tap": "НАЖМИ" } }, "instrumentalReview": { diff --git a/frontend/messages/sk.json b/frontend/messages/sk.json index 32d92cf3..fc830d56 100644 --- a/frontend/messages/sk.json +++ b/frontend/messages/sk.json @@ -1389,6 +1389,16 @@ "rerun": "Spustiť znova", "revertAllAuto": "Vrátiť všetko", "showDetails": "Zobraziť podrobnosti" + }, + "editTimeline": { + "holdingRelease": "Držíš... Uvoľni, keď sa slovo skončí", + "pressSpacebarHint": "Stlač medzerník, keď sa slovo začne (ťukni pre krátke slová, podrž pre dlhé slová)", + "tapToSync": "Ťukni pre synchronizáciu", + "tapWhenStarts": "Ťukni na tlačidlo, keď sa slovo začne", + "wordProgress": "Slovo {index} z {total}:", + "cancelSync": "Zrušiť", + "hold": "DRŽ...", + "tap": "ŤUKNI" } }, "instrumentalReview": { diff --git a/frontend/messages/sv.json b/frontend/messages/sv.json index 3a1c7386..9b5ff6eb 100644 --- a/frontend/messages/sv.json +++ b/frontend/messages/sv.json @@ -1389,6 +1389,16 @@ "rerun": "Kör igen", "revertAllAuto": "Återställ alla", "showDetails": "Visa detaljer" + }, + "editTimeline": { + "holdingRelease": "Håller in... Släpp när ordet slutar", + "pressSpacebarHint": "Tryck på mellanslag när ordet börjar (tryck snabbt för korta ord, håll in för långa ord)", + "tapToSync": "Tryck för att synka", + "tapWhenStarts": "Tryck på knappen när ordet börjar", + "wordProgress": "Ord {index} av {total}:", + "cancelSync": "Avbryt", + "hold": "HÅLL IN...", + "tap": "TRYCK" } }, "instrumentalReview": { diff --git a/frontend/messages/th.json b/frontend/messages/th.json index 63e8f430..7546f89f 100644 --- a/frontend/messages/th.json +++ b/frontend/messages/th.json @@ -1389,6 +1389,16 @@ "rerun": "รันอีกครั้ง", "revertAllAuto": "คืนค่าทั้งหมด", "showDetails": "แสดงรายละเอียด" + }, + "editTimeline": { + "holdingRelease": "กำลังกดค้าง... ปล่อยเมื่อจบคำ", + "pressSpacebarHint": "กดสเปซบาร์เมื่อเริ่มคำ (แตะสำหรับคำสั้นๆ กดค้างสำหรับคำยาวๆ)", + "tapToSync": "แตะเพื่อซิงค์", + "tapWhenStarts": "แตะปุ่มเมื่อเริ่มคำ", + "wordProgress": "คำที่ {index} จาก {total}:", + "cancelSync": "ยกเลิก", + "hold": "กดค้าง...", + "tap": "แตะ" } }, "instrumentalReview": { diff --git a/frontend/messages/tl.json b/frontend/messages/tl.json index de2a1848..998322d5 100644 --- a/frontend/messages/tl.json +++ b/frontend/messages/tl.json @@ -1389,6 +1389,16 @@ "rerun": "Patakbuhin muli", "revertAllAuto": "Ibalik lahat", "showDetails": "Ipakita ang mga detalye" + }, + "editTimeline": { + "holdingRelease": "Naka-hold... Bitawan kapag tapos na ang salita", + "pressSpacebarHint": "Pindutin ang spacebar kapag nagsimula ang salita (i-tap para sa maiikling salita, i-hold para sa mahahabang salita)", + "tapToSync": "I-tap Para I-sync", + "tapWhenStarts": "I-tap ang button kapag nagsimula ang salita", + "wordProgress": "Salita {index} ng {total}:", + "cancelSync": "Kanselahin", + "hold": "I-HOLD...", + "tap": "I-TAP" } }, "instrumentalReview": { diff --git a/frontend/messages/tr.json b/frontend/messages/tr.json index 561c3fce..9d1101ce 100644 --- a/frontend/messages/tr.json +++ b/frontend/messages/tr.json @@ -1389,6 +1389,16 @@ "rerun": "Yeniden çalıştır", "revertAllAuto": "Tümünü geri al", "showDetails": "Detayları göster" + }, + "editTimeline": { + "holdingRelease": "Basılı tutuluyor... Kelime bittiğinde bırak", + "pressSpacebarHint": "Kelime başladığında boşluk tuşuna bas (kısa kelimeler için dokun, uzun kelimeler için basılı tut)", + "tapToSync": "Senkronize Etmek İçin Dokun", + "tapWhenStarts": "Kelime başladığında düğmeye dokun", + "wordProgress": "Kelime {index} / {total}:", + "cancelSync": "İptal", + "hold": "BASILI TUT...", + "tap": "DOKUN" } }, "instrumentalReview": { diff --git a/frontend/messages/uk.json b/frontend/messages/uk.json index 61ff9c3f..e0e3a72b 100644 --- a/frontend/messages/uk.json +++ b/frontend/messages/uk.json @@ -1389,6 +1389,16 @@ "rerun": "Перезапустити", "revertAllAuto": "Скасувати все", "showDetails": "Показати деталі" + }, + "editTimeline": { + "holdingRelease": "Тримай... Відпусти, коли слово закінчиться", + "pressSpacebarHint": "Натисни пробіл, коли починається слово (натисни для коротких слів, утримуй для довгих)", + "tapToSync": "Натисни для синхронізації", + "tapWhenStarts": "Натисни кнопку, коли починається слово", + "wordProgress": "Слово {index} з {total}:", + "cancelSync": "Скасувати", + "hold": "УТРИМУЙ...", + "tap": "НАТИСНИ" } }, "instrumentalReview": { diff --git a/frontend/messages/vi.json b/frontend/messages/vi.json index 8839cd02..1ba3a673 100644 --- a/frontend/messages/vi.json +++ b/frontend/messages/vi.json @@ -1389,6 +1389,16 @@ "rerun": "Chạy lại", "revertAllAuto": "Hoàn tác tất cả", "showDetails": "Hiện chi tiết" + }, + "editTimeline": { + "holdingRelease": "Đang giữ... Thả ra khi từ kết thúc", + "pressSpacebarHint": "Nhấn phím cách khi từ bắt đầu (nhấn thả cho từ ngắn, nhấn giữ cho từ dài)", + "tapToSync": "Nhấn để đồng bộ", + "tapWhenStarts": "Nhấn nút khi từ bắt đầu", + "wordProgress": "Từ {index} trên {total}:", + "cancelSync": "Hủy", + "hold": "GIỮ...", + "tap": "CHẠM" } }, "instrumentalReview": { diff --git a/frontend/messages/zh.json b/frontend/messages/zh.json index 2f6ccc0a..0664a1f8 100644 --- a/frontend/messages/zh.json +++ b/frontend/messages/zh.json @@ -1389,6 +1389,16 @@ "rerun": "重新运行", "revertAllAuto": "全部还原", "showDetails": "显示详情" + }, + "editTimeline": { + "holdingRelease": "按住... 在字词结束时松开", + "pressSpacebarHint": "在字词开始时按空格键(短词轻按,长词按住)", + "tapToSync": "点击同步", + "tapWhenStarts": "在字词开始时点击按钮", + "wordProgress": "第 {index} 个词,共 {total} 个:", + "cancelSync": "取消", + "hold": "按住...", + "tap": "点击" } }, "instrumentalReview": { diff --git a/karaoke_gen/lyrics_transcriber/review/server.py b/karaoke_gen/lyrics_transcriber/review/server.py index 45237ace..908184a2 100644 --- a/karaoke_gen/lyrics_transcriber/review/server.py +++ b/karaoke_gen/lyrics_transcriber/review/server.py @@ -73,6 +73,11 @@ class ReviewServer: output_config: OutputConfig, audio_filepath: str, logger: logging.Logger, + # Optional vocals stem powering the timeline waveform. May be absent when a + # separation produced no vocals stem; the vocals endpoint 404s and the + # frontend hides the waveform. Keyword-only in practice (callers pass it by + # name), so relocating it here from before `logger` is safe. + vocals_filepath: Optional[str] = None, # Instrumental review data (optional - for combined review flow) instrumental_options: Optional[List[Dict[str, Any]]] = None, backing_vocals_analysis: Optional[Dict[str, Any]] = None, @@ -85,7 +90,8 @@ class ReviewServer: Args: correction_result: The lyrics correction result to review output_config: Output configuration - audio_filepath: Path to the main audio file (vocals) + audio_filepath: Path to the main audio file + vocals_filepath: Path the vocals (lead & backing) audio file logger: Logger instance instrumental_options: List of instrumental options for selection Each option: {"id": str, "label": str, "audio_path": str} @@ -97,6 +103,7 @@ class ReviewServer: self.correction_result = correction_result self.output_config = output_config self.audio_filepath = audio_filepath + self.vocals_filepath = vocals_filepath self.logger = logger or logging.getLogger(__name__) self.review_completed = False self.corrections_saved = False # Flag for intermediate save (before instrumental review) @@ -416,6 +423,8 @@ class ReviewServer: async def get_audio_with_job_id(job_id: str, audio_hash: str): if audio_hash in _stem_names: return await self.get_instrumental_audio(audio_hash) + elif audio_hash == "vocals": + return await self.get_vocals_audio() return await self.get_audio(audio_hash) self.app.add_api_route("/api/review/{job_id}/audio/{audio_hash}", get_audio_with_job_id, methods=["GET"]) @@ -1072,6 +1081,25 @@ class ReviewServer: return FileResponse(audio_path, media_type=content_type, filename=os.path.basename(audio_path)) + async def get_vocals_audio(self): + """Stream the vocals audio file.""" + + audio_path = self.vocals_filepath + if not audio_path or not os.path.exists(audio_path): + raise HTTPException(status_code=404, detail="Vocals audio not found") + + # Determine content type based on file extension + ext = os.path.splitext(audio_path)[1].lower() + content_types = { + ".flac": "audio/flac", + ".mp3": "audio/mpeg", + ".wav": "audio/wav", + ".m4a": "audio/mp4", + } + content_type = content_types.get(ext, "application/octet-stream") + + return FileResponse(audio_path, media_type=content_type, filename=os.path.basename(audio_path)) + async def generate_preview_video(self, updated_data: Dict[str, Any] = Body(...)): """Generate a preview video with the current corrections.""" # Check if preview video generation is allowed (disabled with --no-video) diff --git a/karaoke_gen/utils/gen_cli.py b/karaoke_gen/utils/gen_cli.py index e6702798..2d503702 100644 --- a/karaoke_gen/utils/gen_cli.py +++ b/karaoke_gen/utils/gen_cli.py @@ -213,11 +213,20 @@ def run_combined_review( backing_vocals_path = None clean_instrumental_path = None + vocals_path = None clean_result = separated.get("clean_instrumental", {}) - if isinstance(clean_result, dict) and clean_result.get("instrumental"): - clean_instrumental_path = _resolve_path_for_cwd(clean_result["instrumental"], track_dir) - if not os.path.exists(clean_instrumental_path): - clean_instrumental_path = None + if isinstance(clean_result, dict): + if clean_result.get("instrumental"): + clean_instrumental_path = _resolve_path_for_cwd(clean_result["instrumental"], track_dir) + if not os.path.exists(clean_instrumental_path): + clean_instrumental_path = None + # Vocals stem drives the (optional) timeline waveform. A partial separation + # may have an instrumental but no "vocals" key — use .get() and never crash + # the review over a missing waveform; the frontend tolerates its absence. + vocals_source = clean_result.get("vocals") + if vocals_source: + candidate = _resolve_path_for_cwd(vocals_source, track_dir) + vocals_path = candidate if os.path.exists(candidate) else None with_backing_path = None combined_result = separated.get("combined_instrumentals", {}) @@ -303,6 +312,7 @@ def run_combined_review( correction_result=correction_result, output_config=output_config, audio_filepath=resolved_audio or "", + vocals_filepath=vocals_path, logger=logger, # Instrumental review data instrumental_options=instrumental_options, diff --git a/pyproject.toml b/pyproject.toml index e0ce95ac..3e40c9ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "karaoke-gen" -version = "0.197.0" +version = "0.197.1" description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens." authors = ["Andrew Beveridge "] license = "MIT"