feat(editor): Add spectrogram visualizer - #362
Conversation
6d0aea6 to
5295dde
Compare
361223c to
cc7a938
Compare
cc7a938 to
1889fbe
Compare
|
#349 related |
|
Thank you for working on this, this is something I previously mentioned in #51 (comment), but then didn't pursue further getting busy with other things. I'm not sure what library is used for rendering of the spectrogram, but it would be nice if there was an adjustment for the color palette. I'm used to the Aegisub default, so having it match would be ideal. |
Hey, thanks for the feature requests. I'm open to doing a little more work on this branch but I think I'd like more signal that the maintainer is open to merging in the feature before making more changes. I would imagine a maintainer might be concerned with adding too many configuration knobs in the lrcget UI (where would a color palette go, what granularity of custom palette control is appropriate, is it worth having a color palette that is separate from the overall app theme, etc). Getting some answers to those concerns, and specifying the precise palette and intensity scaling behavior that you want would make implementation more likely. You can also always make a PR into this branch and I can take a look at it. |
Obviously I'm no maintainer, but I think taking the same approach that Aegisub does would work just fine, i.e. putting the controls right next to the spectrometer. Since color wouldn't be a slider, I'd probably put it in a separate options menu opened right there too. That way everything regarding the spectrometer would be condensed into the same area instead of spreading it across menus.
Again I'm not sure what this is using for the rendering, but if it happens to be using Wavesurfer, it comes with 3 presets.
Aegisub's 2 color palettes seem to be defined here: I don't think exposing every possible color is necessary, just some handpicked presets. |



Background
Manual edits of word-level timings require a bit more precision than line-level timings for normal lrc files.
This PR adds an audio spectrogram, which is a visualization of frequencies that can be used to help identify word boundaries. This is a feature found in dedicated timing utilities like Aegisub. I also made some UX improvements for the editor, especially around nudging timings of lines and words.
Implementation
Notes
This PR description is entirely human-authored, but the code for this change was written by Claude Opus. As part of development, I manually tested changes, reviewed the changeset for sanity, and trimmed comments for concision.
I apologize if this PR's scope is too large and am happy to split it up if you prefer.
I made these changes while using lrcget to manually adjust output from a whisper-based wrapper I wrote to add word-level timings to line-level lyrics. Like most of this type of tool, it gets things kind-of-approximately-sometimes right, but it may still be useful to maintainers and lrclib contributors if you considered backporting word-level timings to existing lrclib entries.