Token导航 LogoToken导航TokenDH.com
srt to obsidian notes logo
音视频stdio官方级别未说明来源级核验

srt to obsidian notes

MCP Server

一个智能代理,通过MCP服务器集成将SRT字幕文件转换为格式良好的Obsidian笔记。

工具数

4

提示词数

0

GitHub Stars

1

资源数

0
批量处理Python语音音频

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

pangwong

提供方

pangwong

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python3 run_srt_agent.py /path/to/your/video.srt

详细介绍

SRT转黑曜石代理商

一个智能代理,使用MCP(模型上下文协议)服务器集成将SRT字幕文件转换为格式良好的黑曜石笔记。

特性

  • 🎬 SRT解析:通过适当的时间戳处理自动解析SRT字幕文件
  • 📝 智能格式化:将字幕分组为带有时间戳的可读段落
  • 🏷️ 自动标记:智能内容分类和标签分配
  • 🔗 MCP集成:通过MCP服务器与Obsidian无缝集成
  • 📁 文件夹组织:自动创建和组织文件夹
  • 🎯 批处理:一次处理多个SRT文件
  • 🛡️ 错误处理:强大的错误处理和验证

文件概述

核心组件

  1. srt_to_obsidian_agent.py -具有SRT解析和格式化逻辑的主代理
  2. mcp_obsidian_integration.py -黑曜石增强MCP集成
  3. run_srt_agent.py -简单的CLI界面,易于使用
  4. README.md -此文档文件

安装

先决条件

  • Python 3.7+
  • 黑曜石,支持MCP服务器
  • 访问您的黑曜石保险库目录

设置

  1. 下载代理文件 到目录(例如。, /Users/pangwong/obsidian/WLB/tmp/)
  1. 使脚本可执行:
   chmod +x run_srt_agent.py
   chmod +x srt_to_obsidian_agent.py
  1. 验证您的黑曜石保险库路径 在配置中(默认值: /Users/pangwong/obsidian/WLB)

用法

快速开始

# Convert a single SRT file
python3 run_srt_agent.py /path/to/your/video.srt

# Convert with custom folder
python3 run_srt_agent.py /path/to/your/video.srt --folder "Projects/Transcripts"

# Convert with custom title and tags
python3 run_srt_agent.py /path/to/your/video.srt \
  --title "My Custom Title" \
  --tags "education" "ai" "lecture"

高级用法

自定义保险库

python3 run_srt_agent.py /path/to/video.srt --vault "MyVault"

禁用自动标记

python3 run_srt_agent.py /path/to/video.srt --no-auto-tags

详细输出

python3 run_srt_agent.py /path/to/video.srt --verbose

批处理

# Process all SRT files in a directory
python3 srt_to_obsidian_agent.py --batch /path/to/srt/directory --folder "Transcripts"

真实文件示例

# Convert the Stanford CS25 lecture
python3 run_srt_agent.py \
  "/Users/pangwong/obsidian/WLB/Projects/Transformers/stanford CS25/subtiles/[English (United States)] Stanford CS25_ V1 I Transformers United_ DL Models that have revolutionized NLP, CV, RL [DownSub.com].srt" \
  --folder "Projects/Transformers/stanford CS25/transcripts" \
  --tags "stanford" "cs25" "transformers" "education"

输出格式

代理通过以下方式创建结构良好的Markdown文件:

元数据部分

## Metadata

- **Source**: original-filename.srt
- **Duration**: ~45 minutes
- **Paragraphs**: 23
- **Created**: 2024-01-15 14:30

成绩单科

## Transcript

**00:15** Welcome to CS25, Transformers United. This course will cover the revolutionary deep learning models that have transformed natural language processing, computer vision, and reinforcement learning.

**02:30** Today we'll start with the history of attention mechanisms, beginning with RNNs and LSTMs, and then dive into the core concepts that make Transformers so powerful.

自动生成的标签

代理会自动对内容进行分类并添加相关标签:

  • 教育内容: education, learning
  • 技术内容: ai, machine-learning, transformers
  • 演示: presentation, conference
  • 特定内容: attention-mechanism, nlp等等。

配置

自定义代理

您可以通过编辑Python文件中的配置来修改行为:

段落分组

# In TranscriptFormatter class
time_gap_threshold = 2.0  # Seconds between paragraphs
max_paragraph_lines = 12  # Maximum lines per paragraph

保险库配置

# In MCPObsidianClient class
vault_path = "/Users/pangwong/obsidian/WLB"  # Your vault path

自动标记规则

# In _auto_categorize_content method
educational_keywords = ['cs25', 'stanford', 'lecture', 'course']
technical_keywords = ['transformer', 'ai', 'ml', 'deep learning']

MCP集成

代理使用MCP(模型上下文协议)服务器进行黑曜石集成:

可用的MCP工具

  1. 创建笔记:在vault中创建新注释
  2. 添加标签:向现有注释添加标记
  3. 搜索保险库:搜索vault内容
  4. 列出可用保管库:列出可用保管库

MCP服务器配置

代理需要以下MCP服务器:

  • 服务器名称: mcp.config.usrlocalmcp.obsidian
  • 工具:标准黑曜石MCP工具

故障排除

常见问题

“找不到文件”错误

❌ Error: SRT file not found: /path/to/file.srt

解决方案:检查文件路径并确保SRT文件存在。

“无法读取SRT文件”错误

❌ Error: Cannot read SRT file: UnicodeDecodeError

解决方案:代理将自动尝试不同的编码。如果仍然失败,请检查文件格式。

“MCP服务器不可用”错误

❌ Error: MCP server connection failed

解决方案:确保Obsidian正在运行,MCP服务器配置正确。

“权限被拒绝”错误

❌ Error: Permission denied writing to vault

解决方案:检查黑曜石保管库目录的文件权限。

调试模式

运行详细输出以查看详细的处理信息:

python3 run_srt_agent.py /path/to/file.srt --verbose

例子

处理教育内容

# Stanford CS25 lecture
python3 run_srt_agent.py \
  "stanford-cs25-transformers.srt" \
  --folder "Education/CS25" \
  --title "Transformers United - Introduction" \
  --tags "stanford" "transformers" "deep-learning"

处理会议谈话

# Conference presentation
python3 run_srt_agent.py \
  "neurips-2023-attention.srt" \
  --folder "Conferences/NeurIPS2023" \
  --tags "neurips" "attention" "research"

批处理

# Process entire course
python3 srt_to_obsidian_agent.py \
  --batch "/path/to/cs25/subtitles/" \
  --folder "Education/CS25/Transcripts" \
  --tags "stanford" "cs25" "education"

高级功能

自定义格式

您可以扩展 TranscriptFormatter 类以添加自定义格式:

class CustomTranscriptFormatter(TranscriptFormatter):
    def format_transcript(self, paragraphs, title):
        # Add custom formatting logic
        content = super().format_transcript(paragraphs, title)
        # Add table of contents, summary, etc.
        return content

与其他工具集成

该代理可以与其他工具集成:

  • YouTube下载器:处理下载视频中的字幕
  • 视频处理管道:批量处理教育内容
  • 记笔记工作流程:与现有的黑曜石工作流集成

贡献

要扩展代理:

  1. 添加新解析器:支持其他字幕格式(VTT、ASS等)
  2. 增强格式:添加更复杂的文本处理
  3. 改进分类:更好的自动标记算法
  4. 添加集成:支持其他笔记应用程序

许可证

这个项目是开源的。请根据您的需求自由修改和分发。

支持

对于问题或疑问:

  1. 检查故障排除部分
  2. 与一起跑步 --verbose 详细输出
  3. 验证您的黑曜石保险库配置
  4. 确保MCP服务器设置正确

______________________________________________________________________

记笔记快乐! 📝✨

目录标签

目录标签

批量处理Python语音音频字幕转换本地部署智能格式化自动标记Obsidian集成

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP