feat: add inline timestamps STT output format #364
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
Adds a new Inline Timestamps text format option for speech-to-text output, allowing timestamps to be embedded directly within transcribed text as an alternative to SRT subtitle format.
Closes #222
Screenshots
Note: the TTS output at the bottom that strips the current timestamp template.
Motivation
When transcribing audio (podcasts, meetings, interviews), I want timestamps inline with text for:
Changes
New Settings (Settings → Speech to Text)
{hh},{mm},{ss},{ms},{text}tokensExample output:
[00:05] Hello world [00:12] This is a testImplementation
text_tools.cpp: Core functions for formatting, regex compilation, and stripping timestampsTests
format_segments_inline,compile_inline_timestamp_regex,strip_inline_timestampsTesting Done
text_tools_test)