Whisper Obsidian 插件使用教程
1. 项目的目录结构及介绍
Whisper Obsidian 插件的目录结构如下:
whisper-obsidian-plugin/
├── manifest.json
├── main.js
├── styles.css
└── README.md
manifest.json
: 插件的元数据文件,包含插件的基本信息和版本号。main.js
: 插件的主逻辑文件,负责处理语音转文字的功能。styles.css
: 插件的样式文件,定义插件的外观和布局。README.md
: 项目的说明文档,包含插件的安装和使用说明。
2. 项目的启动文件介绍
插件的启动文件是 main.js
。这个文件负责初始化插件并处理用户的语音输入,将其转换为文字并生成 Markdown 文件。以下是 main.js
的主要功能:
- 初始化插件:加载必要的模块和资源。
- 处理语音输入:使用 OpenAI Whisper API 将语音转换为文字。
- 生成 Markdown 文件:将转换后的文字保存为 Markdown 文件。
3. 项目的配置文件介绍
插件的配置文件主要是 manifest.json
。这个文件包含了插件的基本信息和配置选项。以下是 manifest.json
的主要内容:
{
"id": "whisper-obsidian-plugin",
"name": "Whisper",
"version": "1.0.0",
"minAppVersion": "0.12.0",
"description": "Speech-to-text in Obsidian using OpenAI Whisper",
"author": "Nik Danilov",
"authorUrl": "https://github.com/nikdanilov",
"isDesktopOnly": false
}
id
: 插件的唯一标识符。name
: 插件的名称。version
: 插件的版本号。minAppVersion
: 插件支持的最低 Obsidian 版本。description
: 插件的描述信息。author
: 插件的作者。authorUrl
: 作者的 GitHub 主页。isDesktopOnly
: 插件是否仅支持桌面版 Obsidian。
以上是 Whisper Obsidian 插件的基本使用教程,希望对你有所帮助。