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/CHANGELOG.md +223 -0
- package/LICENSE +1 -1
- package/README.md +231 -11
- package/SKILL.md +92 -11
- package/dist/index.js +2430 -166
- package/dist/index.js.map +1 -1
- package/examples/ig-caption.sh +35 -0
- package/examples/who-said-what.sh +33 -0
- package/package.json +5 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Instagram caption from a finished transcription.
|
|
3
|
+
# Usage: ./ig-caption.sh <transcription-id> [variant]
|
|
4
|
+
# Requires: transcribe-so on PATH, TRANSCRIBE_API_KEY exported.
|
|
5
|
+
#
|
|
6
|
+
# `captions` prints the caption text RAW (like `subtitles` and `transcript`),
|
|
7
|
+
# so it pipes straight to a file. Warnings go to stderr — read them: a
|
|
8
|
+
# silently shortened quote is a misquote.
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
ID="${1:?usage: ig-caption.sh <transcription-id> [variant]}"
|
|
13
|
+
# highlights = a 5-item text outline, the right shape for an IG caption.
|
|
14
|
+
# clips = 3 video clip ideas; quoted_sections = verbatim pull quotes.
|
|
15
|
+
VARIANT="${2:-highlights}"
|
|
16
|
+
|
|
17
|
+
# instagram maps to the API's `instagram_caption` format: no URLs, because
|
|
18
|
+
# Instagram does not make them clickable.
|
|
19
|
+
transcribe-so captions "$ID" --for instagram --variant "$VARIANT" > "ig-$ID.txt"
|
|
20
|
+
|
|
21
|
+
echo "wrote ig-$ID.txt" >&2
|
|
22
|
+
cat "ig-$ID.txt"
|
|
23
|
+
|
|
24
|
+
# If this exits non-zero with reason=artifact_missing, the curated cache was
|
|
25
|
+
# never generated for this transcription. One regeneration fixes it (30-90s):
|
|
26
|
+
#
|
|
27
|
+
# transcribe-so captions "$ID" --for instagram --variant "$VARIANT" --regenerate
|
|
28
|
+
#
|
|
29
|
+
# Other destinations, same command: x, threads, linkedin, youtube, spotify,
|
|
30
|
+
# apple_podcasts, markdown, plain. For X and Threads with
|
|
31
|
+
# --variant quoted_sections, --json gives you `thread[]` already split into
|
|
32
|
+
# per-post chunks:
|
|
33
|
+
#
|
|
34
|
+
# transcribe-so captions "$ID" --for x --variant quoted_sections --json \
|
|
35
|
+
# | jq -r '.thread[]'
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# "Who said X, and when" across every completed transcription in the library.
|
|
3
|
+
# Usage: ./who-said-what.sh "<query>" [transcription-id]
|
|
4
|
+
# Requires: transcribe-so on PATH, TRANSCRIBE_API_KEY exported, jq.
|
|
5
|
+
#
|
|
6
|
+
# Each hit is the SEGMENT containing the match, with its own speaker label and
|
|
7
|
+
# a deep-link url, so a quote is attributed to the line it came from rather
|
|
8
|
+
# than to the recording as a whole.
|
|
9
|
+
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
|
|
12
|
+
QUERY="${1:?usage: who-said-what.sh \"<query>\" [transcription-id]}"
|
|
13
|
+
ID="${2:-}"
|
|
14
|
+
|
|
15
|
+
# Speaker labels are RECORDING-LOCAL: "SPEAKER_00" in one transcription is not
|
|
16
|
+
# the same person as "SPEAKER_00" in another, and null means unknown. Say
|
|
17
|
+
# "unknown speaker" rather than attributing the line.
|
|
18
|
+
fmt='.hits[] | "\(.transcription_id) \(.start_ms/1000 | floor)s \(.speaker // "unknown"): \(.text)\n \(.url)"'
|
|
19
|
+
|
|
20
|
+
if [ -n "$ID" ]; then
|
|
21
|
+
transcribe-so search "$QUERY" --id "$ID" --limit 20 | jq -r "$fmt"
|
|
22
|
+
else
|
|
23
|
+
transcribe-so search "$QUERY" --limit 20 | jq -r "$fmt"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Paging: there is no total count on purpose (counting every match is the
|
|
27
|
+
# expensive half of the query). Page on has_more:
|
|
28
|
+
#
|
|
29
|
+
# transcribe-so search "$QUERY" --limit 20 --offset 20
|
|
30
|
+
#
|
|
31
|
+
# offset is capped at 1000 — narrow the query or pass --id instead of deep
|
|
32
|
+
# paging. For the full text of one recording, `transcribe-so transcript <id>`
|
|
33
|
+
# returns every segment and is never capped.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "transcribe-so",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "transcribe.so CLI for agents and scripts: transcribe YouTube videos, podcasts, media URLs, and local files into speaker-labelled transcripts with chapters, sections, cited Q&A, and subtitles. Pure-JSON stdout.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"build": "tsup",
|
|
12
12
|
"start": "node ./dist/index.js",
|
|
13
13
|
"check:coverage": "npx -y tsx scripts/check-api-coverage.ts",
|
|
14
|
+
"check:version": "node scripts/check-version.mjs",
|
|
15
|
+
"test": "npx -y tsx scripts/test-units.ts",
|
|
16
|
+
"build:openai-plugin": "node scripts/build-openai-plugin.mjs",
|
|
14
17
|
"prepublishOnly": "pnpm run build"
|
|
15
18
|
},
|
|
16
19
|
"files": [
|
|
@@ -18,6 +21,7 @@
|
|
|
18
21
|
"examples",
|
|
19
22
|
"README.md",
|
|
20
23
|
"SKILL.md",
|
|
24
|
+
"CHANGELOG.md",
|
|
21
25
|
"LICENSE"
|
|
22
26
|
],
|
|
23
27
|
"keywords": [
|