This skill is designed to safely and orderly process extremely long speech transcript texts with the aid of the file system. Through segmented processing, context maintenance (glossary, topic records), and state tracking, it ensures the sustainability and high quality of the processing. This skill is best used with the highest-performance model (rather than a fast model used for writing code) to ensure the best quality.
When to Use
When the user provides one or more long speech transcript files and requests:
- Proofreading and correction: Fix recognition errors, word repetition, interruptions, omissions, etc. The number of lines before and after proofreading must be consistent.
- Organization and formatting: Distinguish speakers and organize paragraphs.
- Long text processing: The text is too long to fit into the LLM context all at once.
- Need for interruption and resumption: The work may span multiple conversations.
Workflow
1. Initialization Phase (Initialization)
First, the workspace must be initialized. Ask the user whether the source file is ready.
Run the initialization script:
python3 .gemini/skills/long-audio-transcript-processor/scripts/setup_workspace.py "path/to/file1.txt" "path/to/file2.txt" ...
(Note: Please adjust the script path according to the actual skill installation path, usually .gemini/skills/...)
After initialization, the workspace structure is as follows:
语音转写处理_YYYY-MM-DD-HH-MM/
├── 0-工作日志.md # 进度追踪与计划
├── 1-原始文件/ # 存放用户提供的原始语音文本
├── 2-要求和信息/ # 存放活动背景、发言人等信息(用户补充)
├── 3-校对和术语表.md # 动态更新的术语库和错误模式
├── 4-分段主题.md # 记录已处理分段的主题脉络
└── 5-最终输出/ # 存放校对完成的分段文件
Key operations:
- Check the generated directories.
- Sync background knowledge: Make sure to copy any background documents provided by the user (such as MRD, PRD, meeting background, related emails, etc.) to the
2-要求和信息/directory, and also create a Markdown document in that directory to record the user's instructions. This is the cornerstone of ensuring the accuracy of subsequent processing.
2. Segmented Processing Loop (Processing Loop)
Before entering the loop,always first readthe following files to load context (ensuring information consistency across segments):
0-工作日志.md(check progress)2-要求和信息/underallbackground and requirement documents3-校对和术语表.md(load the latest accumulated terms and proofreading rules)4-分段主题.md(load existing context topics)5-最终输出/files under -- just list the file names
Steps:
- Determine the task: From
0-工作日志.mdfind the first incomplete ([ ]) segment. - Extract the segment and initialize the target file:
- Use the
sedcommand to extract the corresponding line range from1-原始文件/and redirect-write it to the corresponding file under5-最终输出/. - Command example:
sed -n '开始行,结束行p' "1-原始文件/文件名.txt" > "5-最终输出/文件名_开始行-结束行.txt" - Purpose: Ensure that all original lines have first entered the target file as the draft for subsequent rewriting, preventing content omission.
- Use the
- Perform proofreading and correction:
- Read: Use
read_fileto read the content of the file under5-最终输出/generated in the previous step. - Reference: glossary, background information, topics of preceding segments.
- Rewrite and proofread:
- Proofread the read content line by line/paragraph by paragraph.
- Correct typos, repetitions, homophone errors, and reduce redundant filler words.
- Mark uncertain content as
(...)。 - Maintain consistency: It must be ensured that the number of lines after proofreading is exactly the same as the original number of lines. If statements need to be merged, keep a line placeholder in place.
- Write back: Use
write_fileto write the complete proofread text back to5-最终输出/the corresponding file (overwriting the draft just created).
- Read: Use
- Update auxiliary documents:
- Update the glossary. If new proper nouns, specific error patterns, or confirmation of the correct spelling of an ambiguous term are found in this segment,append to
3-校对和术语表.md. Append only, and use line-number paragraphs to distinguish content from different segments. - Update the topic. Append the core topic of this segment append to
4-分段主题.md. Append only, and use line-number paragraphs to distinguish content from different segments.
- Update the glossary. If new proper nouns, specific error patterns, or confirmation of the correct spelling of an ambiguous term are found in this segment,append to
- Update status:
- Update log: In
0-工作日志.md, mark the segment as[x]。
- Update log: In
- Feedback and consolidation:
- Inform the user that this segment is complete, and briefly describe key changes, newly discovered terms, or uncertain points.
- Ask whether there are any new terms or error corrections.
- If there is feedback, update
3-校对和术语表.mdand correct5-最终输出the corresponding file in
3. Interruption Recovery (Resuming)
If the conversation is interrupted,do not reinitialize.
Directly execute the "before entering the loop" step of the segmented processing loop : by reading 2-要求和信息/ and 3-校对和术语表.md fully recover the memory.
Then continue with the next unfinished segment.
4. Derivative Tasks
In addition to standard transcription, the user may request the parallel generation of other outputs (such as a Q&A question-and-answer library, summaries, or to-do items).
- Definition: Under
2-要求和信息/, create a task description document (such as额外任务_问答积累.md)。 - Execution: After each "output result", check the derivative task requirements and extract relevant information from the current segment.
- Storage: Derivative files are stored under
5-最终输出/, and file naming should be clear (such as问题和回答-主题.md)。 - Principles: Updates to derivative files also follow **"append only"**, using line-number paragraphs to distinguish content from different segments.
5. Adjustment and Integration
After all segments have been processed, enter this stage.
-
Results summary and reminders:
- List all core output files (segmented text, glossary, summaries, derivative documents).
- Remind the user:
- a) They may make any additional organization, merging, or formatting adjustment requests (for example: merge into one document, extract a specific speaker's statements).
- b) The content may be sent to relevant personnel (such as the PM or technical lead) for review and correction.
-
Correction handling standards:
- When the user provides correction feedback, or when the user forwards someone else's corrections,mustuse the following Emoji to mark modification traces so that changes can be clearly tracked:
{🔴 原始内容}: Mark the original text that was modified or deleted.{🟢 新内容}: Marks newly added or corrected text.{‼️ 需特别留意,可能出错}: Marks places where the model believes there are contradictions, risks, or uncertainties, or points that the user specifically emphasizes.
- Update Actions: Based on the corrections, synchronously update
3-校对和术语表.mdand5-最终输出/the corresponding files to ensure that the correct version of the latest data is used in the next processing or merge.
- When the user provides correction feedback, or when the user forwards someone else's corrections,mustuse the following Emoji to mark modification traces so that changes can be clearly tracked:
Key File Descriptions
0-工作日志.md: Core state file.Must stay up to date.3-校对和术语表.md: A dynamically updated knowledge base. When new terminology or specific error patterns are discovered, this file must be updated to ensure consistency in subsequent segment processing. Edits to this file also follow the append-only principle.4-分段主题.md: Helps the LLM maintain an understanding of the overall context of long texts.
Notes
- File Operations: All generated files should be strictly stored in the initialized working directory.
- Line Number Correspondence: When reading the original file, be sure to ensure the line number range is accurate.
- Append-Only Principle: For
3-校对和术语表,4-分段主题.mdand any additional output files,strictly follow the append-only, no-modification principle to avoid overwriting existing content during the loop process. - Record Additional Requirements Immediately: If the user raises additional requirements during the process, especially if the processing method needs to be adjusted or information needs to be supplemented, immediately record them in
2-要求和信息/and notify subsequent processing steps. - Keep Line Counts Consistent: When generating proofread output, it is forbidden to change timestamp lines. If multiple speeches are merged, the merged speeches may be marked with (empty). This is to facilitate diff checking between the original transcript and the proofread result.
- Speaker Identification: Speakers in speech transcription are generally correct, unless the user points out that identification is needed. During identification, distinguish the true roles based on context (question vs answer, expert vs novice, differences in industry background), and explicitly mark the roles in the output (e.g.,
同行 (测试)、访客 (学生)). It is forbidden to change timestamp lines, and the identified role must be added at the beginning of the speech line.
发言人 2 01:30:00
这是一个验证。
发言人 2 01:30:00
(测试负责人-老张):这是一个验证。
- Background-Driven: It is forbidden to begin processing segments without reading the background document.