transcribe-so 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/SKILL.md +168 -0
- package/dist/index.js +919 -0
- package/dist/index.js.map +1 -0
- package/examples/batch-transcribe.sh +46 -0
- package/examples/heartbeat-openclaw.json +14 -0
- package/examples/upload-flow.md +42 -0
- package/examples/youtube.json +6 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 transcribe.so
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# transcribe-agent
|
|
2
|
+
|
|
3
|
+
Make any agent transcribe. One repo with three ways in: a pure-JSON CLI
|
|
4
|
+
(`transcribe-so`), an agent skill for `npx skills add`, and a Claude Code
|
|
5
|
+
plugin bundling the transcribe.so remote MCP server.
|
|
6
|
+
|
|
7
|
+
transcribe.so turns YouTube videos, podcasts, direct media URLs, and local
|
|
8
|
+
files into speaker-labelled transcripts with timestamped segments, chapters,
|
|
9
|
+
sections, cited Q&A, and subtitle files (SRT, VTT, karaoke VTT).
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
### 1. Agent skill (Claude Code, OpenClaw, any skills.sh-compatible agent)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx skills add shsunmoonlee/transcribe-agent
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This installs [SKILL.md](SKILL.md), which teaches the agent the CLI workflow,
|
|
20
|
+
hard rules, and exit codes.
|
|
21
|
+
|
|
22
|
+
### 2. Claude Code plugin (remote MCP server + skills + /transcribe command)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/plugin marketplace add shsunmoonlee/transcribe-agent
|
|
26
|
+
/plugin install transcribe-so@transcribe-agent
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The plugin connects Claude to the remote MCP server at
|
|
30
|
+
`https://transcribe.so/mcp` (21 tools) and bundles the `transcribe-audio` and
|
|
31
|
+
`get-transcript` skills plus a one-shot `/transcribe` command. First tool call
|
|
32
|
+
triggers the OAuth browser flow; alternatively authenticate with a
|
|
33
|
+
`tsk_live_*` API key via `/mcp`.
|
|
34
|
+
|
|
35
|
+
### 3. CLI (any script, cron job, or agent with a shell)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g transcribe-so # or: pnpm install -g transcribe-so
|
|
39
|
+
export TRANSCRIBE_API_KEY=tsk_live_... # https://transcribe.so/settings/api-keys
|
|
40
|
+
transcribe-so me
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## CLI in 30 seconds
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Price it (free), then transcribe under an explicit budget
|
|
47
|
+
transcribe-so quote --source youtube --url "https://www.youtube.com/watch?v=..."
|
|
48
|
+
transcribe-so run --source youtube --url "https://www.youtube.com/watch?v=..." --max-usd 2
|
|
49
|
+
|
|
50
|
+
# Local file
|
|
51
|
+
transcribe-so upload ./interview.mp3 # prints upload_id (+ ffprobe duration)
|
|
52
|
+
transcribe-so run --source upload --upload-id <id> --duration <s> --max-usd 5
|
|
53
|
+
|
|
54
|
+
# Artifacts
|
|
55
|
+
transcribe-so result <id> | jq '.chapters[]'
|
|
56
|
+
transcribe-so subtitles <id> --format srt > out.srt
|
|
57
|
+
transcribe-so ask <id> -q "What did the guest say about pricing?"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Design contract, made for agents:
|
|
61
|
+
|
|
62
|
+
- stdout is pure JSON (the one exception: `subtitles` prints the raw subtitle
|
|
63
|
+
body). All progress goes to stderr, so `| jq .` always works.
|
|
64
|
+
- Exit codes are meaningful: 0 ok, 1 API error, 2 usage, 3 auth, 4 payment,
|
|
65
|
+
5 transient, 6 local `--max-usd` budget refusal.
|
|
66
|
+
- `create`/`run`/`quote` always send an `Idempotency-Key`; retries are safe.
|
|
67
|
+
- `run` refuses to spend more than `--max-usd` (required, no default).
|
|
68
|
+
- The CLI refuses to send your API key to a non-default host unless you pass
|
|
69
|
+
`--allow-custom-host`.
|
|
70
|
+
|
|
71
|
+
Full command reference and workflow rules: [SKILL.md](SKILL.md). Worked
|
|
72
|
+
examples: [examples/](examples/).
|
|
73
|
+
|
|
74
|
+
## Pricing
|
|
75
|
+
|
|
76
|
+
Transcription is billed per minute from your transcribe.so wallet; quotes are
|
|
77
|
+
free (`quote` before committing). Clip renders are $0.05 per started 60 s.
|
|
78
|
+
Live Q&A uses a daily allowance, never the wallet. Details:
|
|
79
|
+
<https://transcribe.so/pricing>
|
|
80
|
+
|
|
81
|
+
## Privacy Policy
|
|
82
|
+
|
|
83
|
+
This tooling sends the media URLs, uploaded files, and questions you provide
|
|
84
|
+
to transcribe.so for processing. See the transcribe.so privacy policy at
|
|
85
|
+
<https://transcribe.so/privacy-policy> for data collection, usage, storage,
|
|
86
|
+
retention, and contact information. No data is collected by the CLI or plugin
|
|
87
|
+
itself beyond what the API and MCP tools transmit.
|
|
88
|
+
|
|
89
|
+
## Links
|
|
90
|
+
|
|
91
|
+
- Agent landing page: <https://transcribe.so/agent>
|
|
92
|
+
- Docs: <https://transcribe.so/developers/docs>
|
|
93
|
+
- OpenAPI: <https://transcribe.so/openapi.json>
|
|
94
|
+
- MCP server card: <https://transcribe.so/.well-known/mcp/server-card.json>
|
|
95
|
+
- Auth guide: <https://transcribe.so/auth.md>
|
|
96
|
+
- Support: support@transcribe.so
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transcribe-so
|
|
3
|
+
description: Transcribe audio and video with the transcribe.so CLI. Turns YouTube videos, podcasts (Apple Podcasts, Spotify, SoundCloud, Vimeo, Twitch, Loom), direct media URLs, and local audio or video files into speaker-labelled transcripts with timestamped segments, chapters, sections, cited Q&A, and subtitle files (SRT, VTT, karaoke VTT). Use when the user wants a transcript, show notes, chapters, subtitles, quotes, or answers grounded in a recording. 52 languages and dialects.
|
|
4
|
+
homepage: https://transcribe.so/agent
|
|
5
|
+
metadata: {"openclaw":{"emoji":"🎙️","requires":{"bins":["transcribe-so"],"env":["TRANSCRIBE_API_KEY"]}}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Install transcribe-so if it doesn't exist
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g transcribe-so
|
|
12
|
+
# or
|
|
13
|
+
pnpm install -g transcribe-so
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
npm package: https://www.npmjs.com/package/transcribe-so
|
|
17
|
+
github: https://github.com/shsunmoonlee/transcribe-agent
|
|
18
|
+
official website: https://transcribe.so
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
| Property | Value |
|
|
23
|
+
|----------|-------|
|
|
24
|
+
| **name** | transcribe-so |
|
|
25
|
+
| **description** | Speech-to-text CLI: media in, speaker-labelled transcript + chapters + cited Q&A out |
|
|
26
|
+
| **allowed-tools** | Bash(transcribe-so:*) |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Hard Rules (Read First)
|
|
31
|
+
|
|
32
|
+
**Rule 1 - Quote before create.** `quote` is free; `create` charges the wallet. Show the user the price for anything non-trivial. The quote's `transcription_id` is NOT the job id - never pass it to `wait` or `result`. Only the id in the `create` (or `run`) 202 response is the job.
|
|
33
|
+
|
|
34
|
+
**Rule 2 - Local files go through `upload` first.** `create` never accepts a filesystem path. Run `transcribe-so upload <file>`, then pass the returned `upload_id` plus `--duration` with `--source upload`. URL sources (`youtube`, `platform_url`, `external_url`) must be publicly fetchable without auth.
|
|
35
|
+
|
|
36
|
+
**Rule 3 - `status: "queued"` on create is SUCCESS, not an error.** It means the account's concurrency cap is reached and the job waits FIFO for a slot. Never re-submit a queued job. A GET showing `quoted` is different: that row is a quote that was never started (see Rule 1) and will never progress. Exception: `source=upload` is REJECTED at the cap with a fair-use error instead of being queued - wait for a running job to finish; do not hammer retry.
|
|
37
|
+
|
|
38
|
+
**Rule 4 - Never hand-roll polling.** Use `wait <id>` or `run`; they drive the server's long-poll endpoint in capped windows. A `waiting for a concurrency slot` line on stderr is normal.
|
|
39
|
+
|
|
40
|
+
**Rule 5 - stdout is pure JSON, except `subtitles`.** `subtitles <id>` prints the raw SRT/VTT body so it can be piped to a file; every other command prints one JSON document. All progress and chatter goes to stderr, so `| jq .` always works.
|
|
41
|
+
|
|
42
|
+
**Rule 6 - `delete` and `retry` require `--yes`.** Deletion is irreversible (row, derived data, stored media). Retry re-charges from scratch; the original failed charge is not refunded.
|
|
43
|
+
|
|
44
|
+
**Rule 7 - Know which budget you hit.** Transcription bills per minute from the wallet; `ask` uses a daily Q&A allowance (never the wallet); `me` shows the balance. Exit 4 means the account needs funds (top up or raise the key's spend cap). Exit 6 means the CLI's own `--max-usd` refused - raise `--max-usd`, do NOT top up.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Authentication
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
export TRANSCRIBE_API_KEY=tsk_live_... # https://transcribe.so/settings/api-keys
|
|
52
|
+
transcribe-so auth:status
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
New accounts start with free credit. The CLI refuses to send the key to a non-default or non-https `TRANSCRIBE_API_URL` unless `--allow-custom-host` is passed.
|
|
56
|
+
|
|
57
|
+
## Exit codes
|
|
58
|
+
|
|
59
|
+
| Code | Meaning | What to do |
|
|
60
|
+
|------|---------|------------|
|
|
61
|
+
| 0 | success | parse stdout |
|
|
62
|
+
| 1 | API or generic error (including `not_ready`, `qna_quota_exceeded`) | read `error.code`; `not_ready` means run `wait <id>` first; a used-up Q&A allowance frees on a rolling 24h window |
|
|
63
|
+
| 2 | usage error / custom-host refusal | fix the flags |
|
|
64
|
+
| 3 | auth (401, `scope_forbidden`, missing key) | check TRANSCRIBE_API_KEY and its scopes |
|
|
65
|
+
| 4 | payment (`insufficient_funds`, `spend_cap_exceeded`) | top up or raise the key's cap |
|
|
66
|
+
| 5 | transient (rate limit, wait timeout, 5xx) | retry later; per-minute rate limits are already auto-retried with Retry-After |
|
|
67
|
+
| 6 | local budget refusal (`max_usd_exceeded`) | raise `--max-usd`; do not top up |
|
|
68
|
+
|
|
69
|
+
Non-2xx API responses print the API's JSON error envelope verbatim on stdout: `{"error": {"code", "message", "request_id", "doc_url"}}`.
|
|
70
|
+
|
|
71
|
+
## Core Workflow
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 1. Check auth and balance
|
|
75
|
+
transcribe-so me | jq '{email, wallet_balance_usd}'
|
|
76
|
+
|
|
77
|
+
# 2. Price it (free)
|
|
78
|
+
transcribe-so quote --source youtube --url "https://www.youtube.com/watch?v=..." | jq .retail_usd
|
|
79
|
+
|
|
80
|
+
# 3. One command end to end (quote -> budget gate -> create -> wait -> result)
|
|
81
|
+
transcribe-so run --source youtube --url "https://www.youtube.com/watch?v=..." --max-usd 2
|
|
82
|
+
|
|
83
|
+
# Or step by step:
|
|
84
|
+
ID=$(transcribe-so create --source youtube --url "https://..." | jq -r .id)
|
|
85
|
+
transcribe-so wait "$ID"
|
|
86
|
+
transcribe-so result "$ID" | jq '.chapters[] | {title, start_seconds, url}'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`run` requires an explicit `--max-usd` budget; there is no default. The request body the CLI sends for a YouTube job looks like [examples/youtube.json](examples/youtube.json).
|
|
90
|
+
|
|
91
|
+
## Essential Commands
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
transcribe-so auth:status # is the key valid?
|
|
95
|
+
transcribe-so me # account, wallet, limits, key scopes
|
|
96
|
+
transcribe-so pipelines # per-minute pricing + supported languages
|
|
97
|
+
transcribe-so quote --source ... --url ... # free price preview
|
|
98
|
+
transcribe-so create --source ... --url ... # submit (202: {id, retail_usd, ...})
|
|
99
|
+
transcribe-so wait <id> [--timeout 1800] # long-poll to terminal state
|
|
100
|
+
transcribe-so result <id> [--include all] # chapters,sections,qna by default
|
|
101
|
+
transcribe-so run --source ... --max-usd <n> # the whole flow, budget-gated
|
|
102
|
+
transcribe-so list [--limit 50] [--api-only] # newest first, cursor-paginated
|
|
103
|
+
transcribe-so get <id> # status/stage/progress snapshot
|
|
104
|
+
transcribe-so upload <file> [--duration <s>] # presigned PUT; prints upload_id
|
|
105
|
+
transcribe-so subtitles <id> [--format srt] # RAW body to stdout (pipe to file)
|
|
106
|
+
transcribe-so ask <id> -q "..." # cited Q&A (daily allowance)
|
|
107
|
+
transcribe-so delete <id> --yes # irreversible
|
|
108
|
+
transcribe-so retry <id> --yes # re-charges from scratch
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Sources: `--source youtube|platform_url|external_url|upload`. `youtube` for any youtube.com or youtu.be URL; `platform_url` for hosted pages (Apple Podcasts, Spotify episodes, SoundCloud, Vimeo, Twitch VODs, Loom); `external_url` for direct public media URLs; `upload` for files sent with `upload` (needs `--upload-id` and `--duration`).
|
|
112
|
+
|
|
113
|
+
## Common Patterns
|
|
114
|
+
|
|
115
|
+
**Local file, start to finish** - full walk-through in [examples/upload-flow.md](examples/upload-flow.md):
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
UP=$(transcribe-so upload ./interview.mp3) # duration probed with ffprobe if installed
|
|
119
|
+
transcribe-so run --source upload \
|
|
120
|
+
--upload-id "$(echo "$UP" | jq -r .upload_id)" \
|
|
121
|
+
--duration "$(echo "$UP" | jq -r .duration_seconds)" \
|
|
122
|
+
--max-usd 5
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Batch a folder** - see [examples/batch-transcribe.sh](examples/batch-transcribe.sh). Submit sequentially and let the server queue at the concurrency cap; remember Rule 3's upload exception.
|
|
126
|
+
|
|
127
|
+
**Podcast to chapters/show notes:**
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
transcribe-so run --source platform_url --url "https://podcasts.apple.com/..." --max-usd 3 \
|
|
131
|
+
| jq -r '.chapters[] | "\(.start_seconds | floor)s \(.title)"'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Watch-folder heartbeat (OpenClaw)** - [examples/heartbeat-openclaw.json](examples/heartbeat-openclaw.json) runs the batch script on a schedule so anything dropped into a folder gets transcribed.
|
|
135
|
+
|
|
136
|
+
**Subtitles for vertical video:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
transcribe-so subtitles "$ID" --format vtt --preset tiktok-shorts > clip.vtt
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Fire-and-forget with a webhook** - pass `--callback-url https://your-endpoint` to `create`; the 202's `callback.secret` is the HMAC key for the signed `transcription.completed` / `transcription.failed` POST. No polling needed.
|
|
143
|
+
|
|
144
|
+
## Gotchas
|
|
145
|
+
|
|
146
|
+
- The quote's `transcription_id` is not the job id (Rule 1). `run` handles this for you.
|
|
147
|
+
- `create` responses are slim 202 acks; `billed_minutes` and `retail_usd` appear there but NOT on later GETs.
|
|
148
|
+
- `result` has no single full-text field: join `segments[].text` (pass `--include segments` or `all`).
|
|
149
|
+
- `--include segments` can be large; the default `chapters,sections,qna` is usually what you want.
|
|
150
|
+
- Chapters, sections, and citations carry a pre-computed `url` deep link - use it VERBATIM; never rebuild timestamp URLs yourself.
|
|
151
|
+
- `ask` needs `status=completed` (409 `not_ready` otherwise) and consumes the daily allowance; cached pairs via `result --include qna` are free - read those first.
|
|
152
|
+
- Uploads over 50 MB warn (single-shot presigned PUT, 900s expiry); over 500 MB the CLI refuses and points at the resumable tus flow or the web app.
|
|
153
|
+
- Rate limit is 60 requests/min per key, shared with the MCP server. Per-minute limits auto-retry; fair-use and allowance exhaustion never do.
|
|
154
|
+
- `--idempotency-key` makes create/retry retries safe; the CLI always sends one (auto-generated UUID by default).
|
|
155
|
+
|
|
156
|
+
## Quick Reference
|
|
157
|
+
|
|
158
|
+
| Task | Command |
|
|
159
|
+
|------|---------|
|
|
160
|
+
| Price a video | `quote --source youtube --url <u>` |
|
|
161
|
+
| Transcribe under budget | `run --source youtube --url <u> --max-usd 2` |
|
|
162
|
+
| Full text | `result <id> --include segments \| jq -r '.segments[].text'` |
|
|
163
|
+
| Chapter list | `result <id> \| jq '.chapters[] \| {title, start_seconds}'` |
|
|
164
|
+
| SRT file | `subtitles <id> > out.srt` |
|
|
165
|
+
| Cited answer | `ask <id> -q "..."` |
|
|
166
|
+
| Local file | `upload <file>` then `run --source upload --upload-id ... --duration ...` |
|
|
167
|
+
|
|
168
|
+
Also available as a remote MCP server (https://transcribe.so/mcp) and a Claude Code plugin (`/plugin marketplace add shsunmoonlee/transcribe-agent`, then `/plugin install transcribe-so@transcribe-agent`). REST reference: https://transcribe.so/openapi.json and https://transcribe.so/developers/docs.
|