- 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
- Rust 1.70 or higher
- Cargo package manager
git clone https://github.com/traitimtrongvag/Karaoke-Lyric.git
cd Karaoke-Lyric
cargo build --releasecargo run| Key | Action |
|---|---|
Space |
Pause/Resume playback |
R |
Restart from beginning |
↑ |
Delay lyrics by +0.1s |
↓ |
Advance lyrics by -0.1s |
Q |
Quit application |
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...
];Convert MM:SS to seconds:
- 1:30 = 90.0 seconds
- 2:45 = 165.0 seconds
- 4:20 = 260.0 seconds
.
├── src/
│ ├── main.rs # Core application logic
│ └── song_config.rs # Song configuration (lyrics & timing)
├── Cargo.toml # Project dependencies
└── README.md
crossterm- Terminal manipulationratatui- Terminal UI framework
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
