lyrics

package
v1.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("no lyrics found")

ErrNotFound is returned when no lyrics could be found from any source.

Functions

This section is empty.

Types

type Line

type Line struct {
	Start time.Duration
	Text  string
}

Line represents a single timestamped lyrical line.

func Fetch

func Fetch(artist, title string) ([]Line, error)

Fetch requests lyrics for the given artist and title. It tries LRCLIB first, then falls back to NetEase Cloud Music. Returns ErrNotFound if neither source has lyrics.

For YouTube/SoundCloud tracks where Artist is the uploader and Title contains "Artist - Song", the title is split to build a better query.

func ParseEmbedded

func ParseEmbedded(data string) []Line

ParseEmbedded converts lyrics read from local file tags into display lines. Timestamped LRC data remains synced; plain text is returned as scrollable lines at timestamp 0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL