Initial commit: AuroraMusic monorepo
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@dataclass
|
||||
class GenerationRequest:
|
||||
prompt: str
|
||||
mode: str # "instrumental" | "vocals"
|
||||
lyrics: str | None
|
||||
duration_seconds: int
|
||||
|
||||
|
||||
@dataclass
|
||||
class GenerationResult:
|
||||
audio_path: Path
|
||||
duration_seconds: float
|
||||
sample_rate: int
|
||||
|
||||
|
||||
class MusicGenerationProvider(ABC):
|
||||
"""Pluggable backend for turning a prompt (+ optional lyrics) into a song.
|
||||
|
||||
Swap implementations (mock, local model, remote GPU endpoint) without
|
||||
touching the worker or API — the worker only depends on this interface.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def generate(self, request: GenerationRequest, output_dir: Path) -> GenerationResult:
|
||||
...
|
||||
Reference in New Issue
Block a user