fabricatio_yue.capabilities.lyricize

Module containing the Lyricize capability for generating lyrics based on requirements.

Classes

Lyricize

A capability class for generating lyrics based on requirements.

Module Contents

class fabricatio_yue.capabilities.lyricize.Lyricize(/, **data: Any)

Bases: fabricatio_core.capabilities.propose.Propose, fabricatio_yue.capabilities.genre.SelectGenre

A capability class for generating lyrics based on requirements.

This class extends the Propose capability to provide lyric generation functionality. It supports both single requirement strings and batch processing of multiple requirements. Uses the configured lyricize template to generate contextually appropriate lyrics.

async lyricize(requirement: str, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_yue.models.segment.Song]]) fabricatio_yue.models.segment.Song | None
async lyricize(requirement: List[str], **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_yue.models.segment.Song]]) List[fabricatio_yue.models.segment.Song | None]

Generate lyrics based on requirements.

Parameters:
  • requirement (str | List[str]) – Single requirement string or list of requirements for lyric generation

  • **kwargs (Unpack[ValidateKwargs[Song]]) – Additional validation kwargs

Returns:

Generated lyrics as Song object, list of Song objects, or None based on input type

Return type:

Song | None | List[Song | None]