Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
aca94c4
test(transcription): send OpenAI diarization no part over 1400 s
chhoumann Nov 13, 2026
217b040
fix(transcription): cap OpenAI diarization chunks at 1400 s
chhoumann Nov 13, 2026
61c8c52
test(transcription): send a rejected OpenAI request once
chhoumann Nov 13, 2026
44947b5
fix(transcription): send a rejected OpenAI request once
chhoumann Nov 13, 2026
a9a3b07
fix(transcription): keep OpenAI diarization requests inside the timeout
chhoumann Nov 13, 2026
6958e09
test(credentials): pin key handling a credentials table will derive
chhoumann Nov 13, 2026
ff81dbd
refactor(credentials): derive API key handling from one table
chhoumann Nov 13, 2026
f128d4c
refactor(transcription): keep the speaker label format in the renderer
chhoumann Nov 13, 2026
6887b5a
feat(transcription): add one engine for transcription providers
chhoumann Nov 13, 2026
42b55a3
feat(transcription): transcribe through the engine with current models
chhoumann Nov 13, 2026
2f9cd67
test(verify): answer OpenAI and Deepgram as the engine reads them
chhoumann Nov 13, 2026
989185f
test(e2e): read the abort rejection through waitForLifecycle
chhoumann Nov 13, 2026
7d46678
fix(transcription): stop sooner after an abort or a long Retry-After
chhoumann Nov 13, 2026
d34a410
Merge remote-tracking branch 'origin/refactor/credentials-table' into…
chhoumann Nov 13, 2026
fcb830e
refactor(transcription): name providers from the credentials table
chhoumann Nov 13, 2026
f79a09a
feat(transcription): choose the provider and model in settings
chhoumann Nov 13, 2026
e1e9b29
feat(transcription): add ElevenLabs Scribe v3 and make it the default
chhoumann Nov 13, 2026
0b796cf
test(e2e): transcribe through the provider the settings choose
chhoumann Nov 13, 2026
b31e544
test(verify): answer ElevenLabs as the engine reads it
chhoumann Nov 13, 2026
8cae654
refactor(settings): read the provider and speaker labels through the …
chhoumann Nov 13, 2026
77201f7
test(settings): find the Transcripts rows by role and name
chhoumann Nov 13, 2026
19a96c5
build(size): raise the gzip budget by the 866 bytes the provider sett…
chhoumann Nov 13, 2026
4c09afa
fix(settings): export Deepgram to 2.24.0 importers only for a Deepgra…
chhoumann Nov 14, 2026
1eef3e6
fix(settings): let speaker labels be turned off for a model without them
chhoumann Nov 14, 2026
ccc2439
test(transcription): name a provider no PodNotes plans as the unknown…
chhoumann Nov 14, 2026
4b18cee
feat(transcription): transcribe with OpenRouter
chhoumann Nov 14, 2026
cb3b63d
feat(transcription): say when speaker labels are missing or restart a…
chhoumann Nov 14, 2026
d9886c9
feat(transcription): offer only the OpenRouter models its catalog sti…
chhoumann Nov 14, 2026
bfe28e5
test(e2e): transcribe through OpenRouter's Scribe v2 and Grok STT 2.0
chhoumann Nov 14, 2026
9764051
test(verify): answer OpenRouter and its model catalog as the engine r…
chhoumann Nov 14, 2026
a844ca7
build(size): raise the gzip budget by the 1,296 bytes OpenRouter meas…
chhoumann Nov 14, 2026
c46f215
fix(transcription): time words in a later part to the millisecond
chhoumann Nov 14, 2026
23a4d86
fix(transcription): ask OpenRouter for word times and upload when it …
chhoumann Nov 14, 2026
4b94a94
test(transcription): number each voice once across the parts of an ep…
chhoumann Nov 14, 2026
cefa1fe
feat(transcription): one speaker label per voice across the parts of …
chhoumann Nov 14, 2026
8b82f9a
build(size): raise the gzip budget by the 808 bytes the speaker reel …
chhoumann Nov 14, 2026
5eebf37
test(verify): hear Grok's MP3 uploads, so the speaker reel answers as…
chhoumann Nov 14, 2026
3cbd5d1
fix(transcription): name the model that does not label speakers
chhoumann Nov 14, 2026
df8361b
test(transcription): Voxtral Mini Transcribe 3 and Qwen3 ASR on OpenR…
chhoumann Nov 14, 2026
7e62c77
feat(transcription): offer Voxtral Mini Transcribe 3 and Qwen3 ASR on…
chhoumann Nov 14, 2026
0b032d8
test(e2e): Voxtral Mini Transcribe 3 and Qwen3 ASR upload as multipar…
chhoumann Nov 14, 2026
41089b7
build(size): raise the gzip budget by the 211 bytes Voxtral and Qwen3…
chhoumann Nov 14, 2026
979f2bb
test(verify): answer Voxtral Mini Transcribe 3 and Qwen3 ASR as they …
chhoumann Nov 14, 2026
7d08923
feat(network): let a request reach a private host when the caller asks
chhoumann Nov 14, 2026
8842b6c
fix(transcription): punctuate Qwen3 ASR words from its text
chhoumann Nov 14, 2026
92b5a19
build(size): raise the gzip budget by the 100 bytes Qwen3 ASR punctua…
chhoumann Nov 14, 2026
947f917
docs(transcripts): capture provider, model and transcript note screen…
chhoumann Nov 14, 2026
6931423
docs(transcripts): choose a provider, set up keys and read transcripts
chhoumann Nov 14, 2026
444938f
feat(transcription): transcribe with any OpenAI-compatible server
chhoumann Nov 14, 2026
325c115
test(e2e): transcribe through an OpenAI-compatible server on this mac…
chhoumann Nov 14, 2026
ed3bfa4
test(verify): serve an OpenAI-compatible transcription route from the…
chhoumann Nov 14, 2026
0140c5f
build(size): raise both budgets by the bytes the OpenAI-compatible pr…
chhoumann Nov 14, 2026
4b04909
Merge branch 'feat/transcription-openrouter-models' into feat/transcr…
chhoumann Nov 14, 2026
c78a331
fix(transcription): read verbose_json one way and fall back to json o…
chhoumann Nov 14, 2026
3fe2dab
build(size): set both budgets to the merged branch's size plus the ke…
chhoumann Nov 14, 2026
8997d44
fix(transcription): join Whisper word pieces back into words
chhoumann Nov 14, 2026
a891aa0
Merge remote-tracking branch 'origin/feat/transcription-openai-compat…
chhoumann Nov 14, 2026
6b374af
docs(transcripts): document OpenAI-compatible server and new OpenRout…
chhoumann Nov 14, 2026
a96df75
docs(transcripts): state only what the code shows about models and se…
chhoumann Nov 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .claude/skills/verify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ its profile. It keeps the vault and `.obsidian-e2e-artifacts/`. Delete

- `.claude/skills/verify/net.mjs` runs as `watch`, `log` or `unwatch`. It logs
every `fetch` and `requestUrl` call PodNotes makes, without query strings,
and answers OpenAI and Deepgram with a fixture provider while it watches.
and answers ElevenLabs, Deepgram, OpenRouter and OpenAI with a fixture
provider while it watches. It decodes Grok's MP3 uploads with Chromium's
decoder and hears a tone under 500 Hz as one speaker and a higher tone as
another, and logs each upload's `decodedSeconds` and `heardSpeakers`. Audio
it cannot decode is answered with a 400. It answers Voxtral with segments, or
a 400 when asked for word times, and Qwen3 ASR with words and no speakers.

- `.claude/skills/verify/ui.mjs` sends trusted input through
`obsidian dev:cdp`. Its verbs are `click <css> [--text <s>] [--right]`,
Expand Down Expand Up @@ -266,7 +271,17 @@ its profile. It keeps the vault and `.obsidian-e2e-artifacts/`. Delete
live in `screens/scenes.mjs`, the instance calls in `screens/instance.mjs`,
and the contact sheet in `screens/sheet.mjs`.
- `.claude/skills/verify/fixtures.mjs` runs as `feed`, `feed-b`, `transcripts`,
`library`, `retitle`, `requests`, `audio [vault path]` or `stop`. `library`
`private`, `library`, `retitle`, `requests`, `server`, `transcriptions`,
`audio [vault path]` or `stop`. `server` prints the address of an
OpenAI-compatible transcription server on the same port, for the
"OpenAI-compatible server" provider's Server address. It answers
`POST /v1/audio/transcriptions` with verbose_json words, two sentences 12 s
apart, whatever the audio, and json's text when asked for json. The model
`json-only` refuses verbose_json with a 400, as OpenAI's gpt-transcribe does.
`transcriptions` prints each request it answered: its Authorization header,
model, response format, timestamp granularities, file type and size.
`private` prints a feed at `priv3.supercast.com`, an address PodNotes keeps in
SecretStorage as it does a Supercast subscriber's. `library`
prints the URL of a manifest of eight podcasts, one whose feed answers 404, and
one more feed to add. Their episodes' media is silence as long as the feed
says. `#213` has chapters and a WebVTT transcript, and `Signal & Noise` has a 10 s video episode that
Expand Down
54 changes: 42 additions & 12 deletions .claude/skills/verify/features/transcripts.md

Large diffs are not rendered by default.

120 changes: 118 additions & 2 deletions .claude/skills/verify/fixtures.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// node .claude/skills/verify/fixtures.mjs feed start or reuse the feed server, print the feed URL
// node .claude/skills/verify/fixtures.mjs feed-b same server, print a second feed whose episode titles repeat the first's
// node .claude/skills/verify/fixtures.mjs transcripts same server, print a feed whose episodes publish transcripts
// node .claude/skills/verify/fixtures.mjs private same server, print a feed at an address PodNotes keeps
// private, as a Supercast subscriber's feed is
// node .claude/skills/verify/fixtures.mjs library same server, print the URL of a JSON manifest of eight
// podcasts as PodNotes saves them (Night Owl Science's feed
// answers 404) and one more feed to add. Each episode's
Expand All @@ -14,6 +16,11 @@
// episode whose media answers 404
// node .claude/skills/verify/fixtures.mjs retitle rename the first feed's episodes, keeping their GUIDs, until the server stops
// node .claude/skills/verify/fixtures.mjs requests print the paths the server has answered, oldest first
// node .claude/skills/verify/fixtures.mjs server same server, print the address of its OpenAI-compatible
// transcription route, which answers verbose_json. The model
// "json-only" refuses verbose_json with a 400, as
// gpt-transcribe does, and answers json
// node .claude/skills/verify/fixtures.mjs transcriptions print each request the transcription route answered, as JSON
// node .claude/skills/verify/fixtures.mjs audio [path] write a 60 s WAV into this worktree's vault
// (default path: "Fixtures/Local Fixture.wav")
// node .claude/skills/verify/fixtures.mjs stop stop the feed server
Expand All @@ -26,7 +33,7 @@ import { Readable, pipeline } from "node:stream";
import { fileURLToPath } from "node:url";
import { promisify } from "node:util";
import { loadRunnerConfig, resolveProvisionOptions } from "obsidian-e2e/runner";
import { FIXTURE_HOST } from "../../../scripts/e2e-instance.mjs";
import { FIXTURE_HOST, SUPERCAST_FIXTURE_HOST } from "../../../scripts/e2e-instance.mjs";

const root = fileURLToPath(new URL("../../..", import.meta.url));
// Stable per worktree, so a feed saved in the vault keeps working across restarts.
Expand All @@ -36,11 +43,21 @@ const base = `http://${host}:${port}`;
const feedUrl = `${base}/feed.xml`;
const feedBUrl = `${base}/feed-b.xml`;
const transcriptsUrl = `${base}/transcripts.xml`;
const PRIVATE_ROUTE = "/feeds/verify-subscriber-token/feed.xml";
const privateUrl = `http://${SUPERCAST_FIXTURE_HOST}:${port}${PRIVATE_ROUTE}`;
const libraryUrl = `${base}/library.json`;
const serverUrl = `${base}/v1`;
const TRANSCRIPTIONS_ROUTE = "/v1/audio/transcriptions";
const JSON_ONLY_MODEL = "json-only";
const SPOKEN = [
"This text came from the fixture server.",
"A second sentence starts twelve seconds in.",
];
const local = `http://127.0.0.1:${port}`;
const FEED_TITLE = "PodNotes Fixture";
const FEED_B_TITLE = "PodNotes Fixture B";
const TRANSCRIPTS_TITLE = "PodNotes Transcripts";
const PRIVATE_TITLE = "PodNotes Private";
const transcriptFixtures = path.join(root, "tests/fixtures/transcripts");
// Media made here outlives the server; node_modules/.cache is where tools keep caches.
const CACHE = path.join(root, "node_modules/.cache/podnotes-fixtures");
Expand Down Expand Up @@ -533,6 +550,75 @@ function libraryManifest() {
};
}

/**
* Answers the OpenAI-compatible transcription route as a Whisper server does: verbose_json
* with a word every 0.4 s and the second sentence 12 s in, or json's text.
* @param {http.IncomingMessage} request @param {http.ServerResponse} response
* @param {object[]} transcriptions
*/
async function answerTranscription(request, response, transcriptions) {
/** @type {Buffer[]} */
const chunks = [];
for await (const chunk of request) chunks.push(chunk);
const form = await new Request(local, {
method: "POST",
headers: { "content-type": request.headers["content-type"] ?? "" },
body: Buffer.concat(chunks),
}).formData();
const file = form.get("file");
const model = form.get("model");
const format = form.get("response_format");
transcriptions.push({
authorization: request.headers.authorization ?? null,
model,
responseFormat: format,
timestampGranularities: form.getAll("timestamp_granularities[]"),
fileType: file instanceof Blob ? file.type : null,
fileBytes: file instanceof Blob ? file.size : 0,
});
/** @param {number} status @param {unknown} body */
const answer = (status, body) =>
response
.writeHead(status, { "Content-Type": "application/json" })
.end(JSON.stringify(body));
if (model === JSON_ONLY_MODEL && format === "verbose_json") {
answer(400, {
error: {
message: `response_format 'verbose_json' is not compatible with model '${JSON_ONLY_MODEL}'. Use 'json' or 'text' instead.`,
type: "invalid_request_error",
param: "response_format",
code: "unsupported_value",
},
});
return;
}
const text = SPOKEN.join(" ");
if (format !== "verbose_json") {
answer(200, { text });
return;
}
const timed = SPOKEN.map((sentence, index) =>
sentence.split(" ").map((word, at) => ({
word,
start: index * 12 + at * 0.4,
end: index * 12 + at * 0.4 + 0.3,
})),
);
answer(200, {
task: "transcribe",
language: "english",
duration: 15,
text,
words: timed.flat(),
segments: timed.map((words, id) => ({
id,
start: words[0].start,
end: words[words.length - 1].end,
text: ` ${SPOKEN[id]}`,
})),
});
}

function serve() {
const audio = wav();
/** @type {Record<string, [string, Buffer | Stream]>} */
Expand All @@ -548,6 +634,13 @@ function serve() {
"/b/artwork.svg": ["image/svg+xml", Buffer.from(artwork(FEED_B_TITLE, "#0f766e"))],
"/b/episode-1.wav": ["audio/wav", audio],
"/b/episode-2.wav": ["audio/wav", audio],
[PRIVATE_ROUTE]: [
"application/rss+xml",
Buffer.from(feedXml(audio.length, PRIVATE_TITLE, "/p")),
],
"/p/artwork.svg": ["image/svg+xml", Buffer.from(artwork(PRIVATE_TITLE, "#be123c"))],
"/p/episode-1.wav": ["audio/wav", audio],
"/p/episode-2.wav": ["audio/wav", audio],
"/transcripts.xml": ["application/rss+xml", Buffer.from(transcriptsFeedXml(audio.length))],
"/t/artwork.svg": ["image/svg+xml", Buffer.from(artwork("Transcripts", "#b45309"))],
"/t/buzzcast.html": ["text/html; charset=utf-8", transcript("buzzcast.html")],
Expand Down Expand Up @@ -602,6 +695,8 @@ function serve() {
}
/** @type {string[]} */
const requests = [];
/** @type {object[]} */
const transcriptions = [];
const server = http.createServer(async (request, response) => {
if (request.method === "POST" && request.url === "/__retitle") {
routes["/feed.xml"][1] = Buffer.from(feedXml(audio.length, FEED_TITLE, "", true));
Expand All @@ -618,8 +713,17 @@ function serve() {
response.end(JSON.stringify(requests));
return;
}
if (request.url === "/__transcriptions") {
response.writeHead(200, { "Content-Type": "application/json" });
response.end(JSON.stringify(transcriptions));
return;
}
const fromPodNotes = request.headers.host?.startsWith(host);
if (fromPodNotes) requests.push(`${request.method} ${request.url}`);
if (request.method === "POST" && request.url === TRANSCRIPTIONS_ROUTE) {
await answerTranscription(request, response, transcriptions);
return;
}
const url = request.url ?? "";
let route = routes[url];
if (!route && videos[url]) {
Expand Down Expand Up @@ -725,6 +829,15 @@ async function printRequests() {
for (const line of /** @type {string[]} */ (await response.json())) console.log(line);
}

async function printTranscriptions() {
const response = await fetch(`${local}/__transcriptions`, {
signal: AbortSignal.timeout(1000),
});
for (const entry of /** @type {object[]} */ (await response.json())) {
console.log(JSON.stringify(entry));
}
}

async function retitleFeed() {
const response = await fetch(`${local}/__retitle`, {
method: "POST",
Expand All @@ -748,14 +861,17 @@ try {
else if (verb === "feed") await startFeed(feedUrl);
else if (verb === "feed-b") await startFeed(feedBUrl);
else if (verb === "transcripts") await startFeed(transcriptsUrl);
else if (verb === "private") await startFeed(privateUrl);
else if (verb === "library") await startFeed(libraryUrl);
else if (verb === "retitle") await retitleFeed();
else if (verb === "requests") await printRequests();
else if (verb === "server") await startFeed(serverUrl);
else if (verb === "transcriptions") await printTranscriptions();
else if (verb === "audio") await writeAudio(arg);
else if (verb === "stop") await stopFeed();
else
throw new Error(
"Usage: fixtures.mjs feed | feed-b | transcripts | library | retitle | requests | audio [vault-relative path] | stop",
"Usage: fixtures.mjs feed | feed-b | transcripts | private | library | retitle | requests | server | transcriptions | audio [vault-relative path] | stop",
);
} catch (error) {
console.error(error instanceof Error ? error.message : String(error));
Expand Down
Loading
Loading