feat(pipeline): implement stage runner, cache, cli, and doctor command
This commit is contained in:
30
src/songsplit/pipeline/s6_chords.py
Normal file
30
src/songsplit/pipeline/s6_chords.py
Normal file
@ -0,0 +1,30 @@
|
||||
"""Stage 6: Chord recognition -> chords.json."""
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from songsplit.pipeline.runner import PipelineContext, Stage
|
||||
|
||||
|
||||
class ChordsStage(Stage):
|
||||
name = "s6_chords"
|
||||
version = "1.0.0"
|
||||
model_name = "chordino"
|
||||
model_version = "1.0.0"
|
||||
dependencies = ["s5_tempo"]
|
||||
|
||||
def get_inputs(self, ctx: PipelineContext) -> list[Path]:
|
||||
return [
|
||||
ctx.stems_dir / "instrumental.wav",
|
||||
ctx.output_dir / "tempo.json",
|
||||
]
|
||||
|
||||
def get_outputs(self, ctx: PipelineContext) -> list[Path]:
|
||||
return [ctx.output_dir / "chords.json"]
|
||||
|
||||
def get_params(self, ctx: PipelineContext) -> dict[str, Any]:
|
||||
return {"backend": "chordino"}
|
||||
|
||||
def run(self, ctx: PipelineContext) -> None:
|
||||
# Implementation in M4
|
||||
raise NotImplementedError("Stage s6_chords will be implemented in M4.")
|
||||
Reference in New Issue
Block a user