介绍
# Voicenotes Integration
将语音笔记从 [voicenotes.com](https://voicenotes.com) 同步到工作区。
## 设置
1. 从以下地址获取访问令牌:https://voicenotes.com/app?obsidian=true#settings 2. 设置环境变量:`export VOICENOTES_TOKEN="your-token-here"`
## 快速开始
```bash # Verify connection ./scripts/get-user.sh | jq .
# Fetch recent notes (JSON) ./scripts/fetch-notes.sh | jq '.data[:3]'
# Sync all notes to markdown files ./scripts/sync-to-markdown.sh --output-dir ./voicenotes ```
## 脚本
### fetch-notes.sh 以 JSON 格式获取语音笔记。 ```bash ./scripts/fetch-notes.sh # All notes ./scripts/fetch-notes.sh --limit 10 # Last 10 notes ./scripts/fetch-notes.sh --since 2024-01-01 # Notes since date ```
### get-user.sh 验证令牌并获取用户信息。 ```bash ./scripts/get-user.sh | jq '{name, email}' ```
### sync-to-markdown.sh 将笔记同步为带有 frontmatter 的 Markdown 文件。 ```bash ./scripts/sync-to-markdown.sh --output-dir ./voicenotes ```
输出格式: ```markdown --- voicenotes_id: abc123 created: 2024-01-15T10:30:00Z tags: [idea, project] ---
# Note Title
## Transcript The transcribed content...
## Summary AI-generated summary... ```
## API 参考
基础 URL:`https://api.voicenotes.com/api/integrations/obsidian-sync`
所需的请求头: - `Authorization: Bearer {token}` - `X-API-KEY: {token}`
端点: - `GET /user/info` - 用户详细信息 - `GET /recordings` - 列出语音笔记(分页) - `GET /recordings/{id}/signed-url` - 音频下载 URL
## 数据结构
每条语音笔记包含: - `recording_id` - 唯一标识符 - `title` - 笔记标题 - `transcript` - 完整的转录文本 - `creations[]` - AI 摘要、行动项等 - `tags[]` - 用户标签 - `created_at` / `updated_at` - 时间戳 - `duration` - 录音时长(秒)
## 提示
- 笔记是分页的;检查 `links.next` 以获取更多页面 - 使用 `--since` 仅获取自上次同步以来新增的笔记 - AI 生成的内容包含摘要、待办事项和自定义提示词 - 速率限制约为每分钟 60 次请求