feat(cli): add word-level LRC output with UTF-8 fix#3619
Open
SakuzyPeng wants to merge 1 commit intoggml-org:masterfrom
Open
feat(cli): add word-level LRC output with UTF-8 fix#3619SakuzyPeng wants to merge 1 commit intoggml-org:masterfrom
SakuzyPeng wants to merge 1 commit intoggml-org:masterfrom
Conversation
Add new -olrcw/--output-lrc-word option for word-level LRC output with inline timestamps per token. Key changes: - Add output_lrc_word parameter and CLI option - Implement output_lrc_word() function with per-token timestamps - Fix UTF-8 multi-byte character handling (merge continuation bytes) - Enable token_timestamps when output_lrc_word is set - Handle diarize speaker prefix without breaking LRC format - Update README.md with new option The UTF-8 fix addresses issue ggml-org#1798 where CJK characters were split across tokens with timestamps inserted between bytes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add new
-olrcw/--output-lrc-wordoption for word-level LRC output with inline timestamps per token, and fix UTF-8 character handling issues.Changes
output_lrc_wordparameter and CLI option-olrcwoutput_lrc_word()function with per-token timestampstoken_timestampswhenoutput_lrc_wordis setUTF-8 Fix (addresses #1798)
CJK characters (3 bytes in UTF-8) were being split across tokens with timestamps inserted between bytes:
Before (broken):
After (fixed):
The fix detects UTF-8 continuation bytes (
10xxxxxx) and merges them with the previous token.Output Format
Test Plan