Skip to content

traitimtrongvag/Karaoke-Lyric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karaoke-Lyric

Rust Terminal License

A lightweight terminal-based karaoke application built with Rust and Ratatui.

Features

  • Real-time lyric synchronization with color-coded progress
  • Smooth character-by-character highlighting
  • Progress bar with visual playback indicator
  • Pause/Resume playback control
  • Adjustable lyric timing with Up/Down arrows
  • Customizable song configuration

Installation

Prerequisites

  • Rust 1.70 or higher
  • Cargo package manager

Build from source

git clone https://github.com/traitimtrongvag/Karaoke-Lyric.git
cd Karaoke-Lyric
cargo build --release

Usage

Running the application

cargo run

Controls

Key Action
Space Pause/Resume playback
R Restart from beginning
Delay lyrics by +0.1s
Advance lyrics by -0.1s
Q Quit application

Configuration

Edit src/song_config.rs to customize your karaoke song:

let title = "Your Song Title".to_string();
let duration = 180.0;  // Total duration in seconds
let start_position = 0.0;  // Starting position in seconds

let lyrics = vec![
    LyricLine {
        text: "First line of lyrics".to_string(),
        start_time: 0.0,
        end_time: 3.0,
    },
    // Add more lines...
];

Time format conversion

Convert MM:SS to seconds:

  • 1:30 = 90.0 seconds
  • 2:45 = 165.0 seconds
  • 4:20 = 260.0 seconds

Project Structure

.
├── src/
│   ├── main.rs          # Core application logic
│   └── song_config.rs   # Song configuration (lyrics & timing)
├── Cargo.toml           # Project dependencies
└── README.md

Dependencies

  • crossterm - Terminal manipulation
  • ratatui - Terminal UI framework

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Example

Example

About

A lightweight terminal-based karaoke application built with Rust and Ratatui.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages