transcribe-so 0.1.0 → 0.3.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/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
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.
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, subtitle files (SRT, VTT, karaoke VTT), full transcript exports, segment search ("who said X, and when"), and paste-ready captions for Instagram, X, Threads, LinkedIn, YouTube, Spotify and Apple Podcasts. Use when the user wants a transcript, show notes, chapters, subtitles, captions, quotes, or answers grounded in a recording. 52 languages and dialects.
4
4
  homepage: https://transcribe.so/agent
5
5
  metadata: {"openclaw":{"emoji":"🎙️","requires":{"bins":["transcribe-so"],"env":["TRANSCRIBE_API_KEY"]}}}
6
6
  ---
@@ -29,6 +29,8 @@ official website: https://transcribe.so
29
29
 
30
30
  ## Hard Rules (Read First)
31
31
 
32
+ **Rule 0 - Money.** Check the price before creating a job. Stay within the user's authorized budget; ask before exceeding it or starting another paid attempt. `quote` is free and tells you the price. `--max-charge-usd` makes the ceiling binding server-side. After a refusal, report the real price and ask - never raise a ceiling on your own, and never re-run `retry` to "see if it works".
33
+
32
34
  **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
35
 
34
36
  **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.
@@ -37,11 +39,15 @@ official website: https://transcribe.so
37
39
 
38
40
  **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
41
 
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.
42
+ **Rule 5 - stdout is JSON everywhere except three raw-output commands.** `subtitles`, `transcript`, and `captions` (without `--json`) print a raw body so it can be piped to a file; every other command prints one JSON document, and so does every error from every command. All progress and chatter goes to stderr, so `| jq .` always works on the JSON commands and `> file` always works on the raw ones.
43
+
44
+ **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. A retry is a NEW paid attempt: pass `--max-charge-usd` again, because the create call's ceiling does not carry over.
45
+
46
+ **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 before anything was sent - raise `--max-usd`, do NOT top up. Exit 7 means the SERVER refused against `--max-charge-usd`: nothing was held or charged and no job started, so the account is fine - report the real price (`error.charge_usd`) and ask.
41
47
 
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.
48
+ **Rule 8 - A 409 `not_ready` carries a `reason`, and only ONE of them resolves by waiting.** `transcription_processing` -> wait (`transcript --wait-seconds N` does this for you, honouring `Retry-After`). `transcription_failed` / `transcription_cancelled` -> terminal, there is nothing to wait for. `not_started` -> the row is a quote that was never started. `artifact_missing` -> completed but the artifact was never generated; for `captions` the fix is ONE `POST /timestamps/regenerate` (`--regenerate`), and for `transcript` nothing helps. Never poll a reason that is not `transcription_processing`.
43
49
 
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.
50
+ **Rule 9 - A windowed transcript is not the transcript.** `result --include segments` returns one window and a `segments_meta {offset, limit, total, has_more}`. If `has_more` is true you are holding a PARTIAL transcript - page with `--segments-offset`, or use `transcript <id>`, which returns every segment and is never capped.
45
51
 
46
52
  ---
47
53
 
@@ -59,14 +65,15 @@ New accounts start with free credit. The CLI refuses to send the key to a non-de
59
65
  | Code | Meaning | What to do |
60
66
  |------|---------|------------|
61
67
  | 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 |
68
+ | 1 | API or generic error (including `not_ready`, `qna_quota_exceeded`) | read `error.code`, then `error.reason` for `not_ready` (Rule 8); a used-up Q&A allowance frees on a rolling 24h window |
63
69
  | 2 | usage error / custom-host refusal | fix the flags |
64
70
  | 3 | auth (401, `scope_forbidden`, missing key) | check TRANSCRIBE_API_KEY and its scopes |
65
71
  | 4 | payment (`insufficient_funds`, `spend_cap_exceeded`) | top up or raise the key's cap |
66
72
  | 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 |
73
+ | 6 | local budget refusal (`max_usd_exceeded`) | the free quote exceeded `--max-usd`; nothing was sent. Raise `--max-usd`; do not top up |
74
+ | 7 | server charge ceiling (`max_charge_exceeded`) | the API refused `--max-charge-usd` before any hold; nothing charged, no job. Report `error.charge_usd` and ask - do not raise the ceiling yourself |
68
75
 
69
- Non-2xx API responses print the API's JSON error envelope verbatim on stdout: `{"error": {"code", "message", "request_id", "doc_url"}}`.
76
+ Non-2xx API responses print the API's JSON error envelope verbatim on stdout: `{"error": {"code", "message", "request_id", "doc_url"}}` - plus `reason` on `not_ready`, and `charge_usd` / `max_charge_usd` on `max_charge_exceeded`. Codes 0-6 are unchanged from 0.1.x; 7 is new in 0.2.0.
70
77
 
71
78
  ## Core Workflow
72
79
 
@@ -103,13 +110,80 @@ transcribe-so list [--limit 50] [--api-only] # newest first, cursor-paginated
103
110
  transcribe-so get <id> # status/stage/progress snapshot
104
111
  transcribe-so upload <file> [--duration <s>] # presigned PUT; prints upload_id
105
112
  transcribe-so subtitles <id> [--format srt] # RAW body to stdout (pipe to file)
113
+ transcribe-so transcript <id> [--format md] # RAW full transcript, never capped
114
+ transcribe-so captions <id> --for instagram # RAW paste-ready caption (--json for the envelope)
115
+ transcribe-so search "<q>" [--id <id>] # who said X, and when
116
+ transcribe-so capabilities # account + pipelines + every enum, one JSON object
106
117
  transcribe-so ask <id> -q "..." # cited Q&A (daily allowance)
107
118
  transcribe-so delete <id> --yes # irreversible
108
- transcribe-so retry <id> --yes # re-charges from scratch
119
+ transcribe-so retry <id> --yes --max-charge-usd <n> # re-charges from scratch
109
120
  ```
110
121
 
122
+ Budget flags: `run --max-usd <n>` is LOCAL (the free quote is checked before anything is created; exit 6). `--max-charge-usd <n>` on `create` / `run` / `retry` is the SERVER ceiling, enforced at the wallet hold (exit 7). `run` sends its `--max-usd` as the server ceiling too, unless you pass `--no-server-ceiling`. A plan-covered job is charged $0 and passes any ceiling, including `0`.
123
+
111
124
  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
125
 
126
+ ## Recipes by intent
127
+
128
+ Six things people actually ask for. Pick by intent, not by endpoint.
129
+
130
+ **1. "Transcribe this."** Price it, then run it under a budget that is enforced on both sides.
131
+
132
+ ```bash
133
+ transcribe-so quote --source youtube --url "$URL" | jq '{billed_minutes, retail_usd}'
134
+ transcribe-so run --source youtube --url "$URL" --max-usd 2 # also sent as max_charge_usd
135
+ ```
136
+
137
+ **2. "Give me the transcript."** Not `result --include segments` (that is one window) - `transcript`, which is never capped.
138
+
139
+ ```bash
140
+ transcribe-so transcript "$ID" > talk.txt # plain text
141
+ transcribe-so transcript "$ID" --format md --out talk.md # title + chapters + turns
142
+ transcribe-so transcript "$ID" --no-timestamps --no-speaker-labels # prose only
143
+ transcribe-so transcript "$ID" --wait-seconds 300 # if it may still be processing
144
+ ```
145
+
146
+ **3. "Who said X, and when?"** Segment search, library-wide or scoped. Each hit carries its own speaker and a deep link. Full script: [examples/who-said-what.sh](examples/who-said-what.sh).
147
+
148
+ ```bash
149
+ transcribe-so search "pricing" --limit 20 \
150
+ | jq -r '.hits[] | "\(.speaker // "unknown") @\(.start_ms/1000|floor)s: \(.text)\n \(.url)"'
151
+ transcribe-so search "pricing" --id "$ID" # within one transcription
152
+ ```
153
+
154
+ Speaker labels are RECORDING-LOCAL: `SPEAKER_00` in one transcription is not the same person as `SPEAKER_00` in another, and `null` means unknown. Say "unknown speaker" rather than attributing the line.
155
+
156
+ **4. "Write the Instagram caption / YouTube chapters / LinkedIn post."** One command per destination. Full script: [examples/ig-caption.sh](examples/ig-caption.sh).
157
+
158
+ ```bash
159
+ transcribe-so captions "$ID" --for youtube # chapter list, paste-ready
160
+ transcribe-so captions "$ID" --for instagram --variant highlights
161
+ transcribe-so captions "$ID" --for linkedin # one 3,000-char post, no links
162
+ transcribe-so captions "$ID" --for x --variant quoted_sections --json | jq -r '.thread[]'
163
+ ```
164
+
165
+ Destinations: `instagram` (maps to the API's `instagram_caption`), `x`, `threads`, `linkedin`, `youtube`, `spotify`, `apple_podcasts`, `markdown`, `plain`. Variants: `standard` (chapter list), `highlights` (5-item text outline), `clips` (3 video ideas), `quoted_sections` (verbatim pull quotes), `show_notes`, `original`. `--cta` adds the transcribe.so footer and is OFF by default - the caption belongs to the user. Warnings print on stderr; surface them, because a silently shortened quote is a misquote. `artifact_missing` -> re-run with `--regenerate` (one 30-90s regeneration, then it retries); it regenerates and REPLACES all four cached caption/chapter variants and burns 1 of the 10 regenerations allowed per transcription, and once they are gone only a re-transcribe resets the count.
166
+
167
+ **5. "Subtitles for this video."**
168
+
169
+ ```bash
170
+ transcribe-so subtitles "$ID" --format srt > talk.srt
171
+ transcribe-so subtitles "$ID" --format vtt --preset tiktok-shorts > clip.vtt
172
+ ```
173
+
174
+ **6. "What did they say about X?"** Cited Q&A - read the free cached pairs first.
175
+
176
+ ```bash
177
+ transcribe-so result "$ID" --include qna | jq '.qna' # free, already generated
178
+ transcribe-so ask "$ID" -q "What did the guest say about pricing?" # daily allowance
179
+ ```
180
+
181
+ **Don't know what the account or the CLI supports?** One call, no guessing:
182
+
183
+ ```bash
184
+ transcribe-so capabilities | jq '{wallet: .account.wallet_balance_usd, captions: .formats.captions}'
185
+ ```
186
+
113
187
  ## Common Patterns
114
188
 
115
189
  **Local file, start to finish** - full walk-through in [examples/upload-flow.md](examples/upload-flow.md):
@@ -145,13 +219,14 @@ transcribe-so subtitles "$ID" --format vtt --preset tiktok-shorts > clip.vtt
145
219
 
146
220
  - The quote's `transcription_id` is not the job id (Rule 1). `run` handles this for you.
147
221
  - `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`).
222
+ - `result` has no single full-text field: for the whole transcript use `transcript <id>`. `--include segments` returns ONE window plus `segments_meta`; check `has_more` before treating it as complete (Rule 9), and page with `--segments-offset` / `--segments-limit`.
149
223
  - `--include segments` can be large; the default `chapters,sections,qna` is usually what you want.
150
224
  - Chapters, sections, and citations carry a pre-computed `url` deep link - use it VERBATIM; never rebuild timestamp URLs yourself.
151
225
  - `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
226
  - 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
227
  - 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).
228
+ - `search` never returns a count: `total` is always `null` by design. Page on `has_more`; `offset` is capped at 1000, so narrow the query or pass `--id` instead of deep-paging.
229
+ - `--idempotency-key` is what makes a retry safe ACROSS PROCESSES. The CLI auto-generates a fresh UUID per invocation, which protects a retry inside one run but NOT a re-run of the same command: that is a second key and therefore a second charge. If a `create` or `run` dies without printing an id (network drop, killed shell, timeout), re-run it with the SAME explicit `--idempotency-key` and the API returns the original job instead of creating and charging a new one. Pick the key before the first attempt; it is your only handle on an in-flight charge.
155
230
 
156
231
  ## Quick Reference
157
232
 
@@ -159,10 +234,16 @@ transcribe-so subtitles "$ID" --format vtt --preset tiktok-shorts > clip.vtt
159
234
  |------|---------|
160
235
  | Price a video | `quote --source youtube --url <u>` |
161
236
  | Transcribe under budget | `run --source youtube --url <u> --max-usd 2` |
162
- | Full text | `result <id> --include segments \| jq -r '.segments[].text'` |
237
+ | Hard server-side cap | `create --source youtube --url <u> --max-charge-usd 2` (exit 7 if higher) |
238
+ | Full text | `transcript <id> > out.txt` (never capped) |
239
+ | Markdown export | `transcript <id> --format md --out out.md` |
163
240
  | Chapter list | `result <id> \| jq '.chapters[] \| {title, start_seconds}'` |
241
+ | Paste-ready chapters | `captions <id> --for youtube` |
242
+ | IG caption | `captions <id> --for instagram --variant highlights` |
243
+ | Who said X | `search "x" \| jq -r '.hits[] \| "\(.speaker): \(.text)"'` |
164
244
  | SRT file | `subtitles <id> > out.srt` |
165
245
  | Cited answer | `ask <id> -q "..."` |
246
+ | What can I ask for? | `capabilities` |
166
247
  | Local file | `upload <file>` then `run --source upload --upload-id ... --duration ...` |
167
248
 
168
249
  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.