feat(pipeline): implement stage runner, cache, cli, and doctor command
This commit is contained in:
27
src/songsplit/pipeline/s3_lyrics.py
Normal file
27
src/songsplit/pipeline/s3_lyrics.py
Normal file
@ -0,0 +1,27 @@
|
||||
"""Stage 3: Lyrics transcription & alignment (Whisper + WhisperX + hyphenation)."""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from songsplit.pipeline.runner import PipelineContext, Stage
|
||||
|
||||
|
||||
class LyricsStage(Stage):
|
||||
name = "s3_lyrics"
|
||||
version = "1.0.0"
|
||||
model_name = "whisper-large-v3"
|
||||
model_version = "1.0.0"
|
||||
dependencies = ["s2_stems"]
|
||||
|
||||
def get_inputs(self, ctx: PipelineContext) -> list[Path]:
|
||||
return [ctx.stems_dir / "vocals.wav"]
|
||||
|
||||
def get_outputs(self, ctx: PipelineContext) -> list[Path]:
|
||||
return [ctx.output_dir / ".cache" / "lyrics_raw.json"]
|
||||
|
||||
def get_params(self, ctx: PipelineContext) -> dict[str, Any]:
|
||||
return {"lang": ctx.lang}
|
||||
|
||||
def run(self, ctx: PipelineContext) -> None:
|
||||
# Implementation in M2
|
||||
raise NotImplementedError("Stage s3_lyrics will be implemented in M2.")
|
||||
Reference in New Issue
Block a user