Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 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
df5ea09
fix(transcription): cut MP3 parts without a one-frame tail or an unco…
chhoumann Nov 14, 2026
3a14c53
fix(transcription): drop the summed-seconds cap that split off one-fr…
chhoumann Nov 14, 2026
27d8958
fix(transcription): split MP3 parts equally even when the size cap binds
chhoumann Nov 14, 2026
da3baf9
fix(transcription): fill MP3 parts up to the size cap before adding one
chhoumann Nov 14, 2026
25470c3
fix(transcription): cut MP3 parts as few as fit, moving cuts either way
chhoumann Nov 14, 2026
520f2dd
fix(transcription): sum each MP3 frame's duration when cutting parts
chhoumann Nov 14, 2026
aea5d1a
fix(transcription): skip ID3v2 tags before, between and after MP3 frames
chhoumann Nov 14, 2026
7370a71
Merge remote-tracking branch 'origin/master' into feat/transcription-…
chhoumann Nov 14, 2026
d544390
fix(transcription): split long audio in other formats under the lengt…
chhoumann Nov 14, 2026
cc142ba
build(size): raise the gzip budget by the 118 bytes the length check …
chhoumann Nov 14, 2026
a8c8417
fix(transcription): upload episodes whose address is a signed URL
chhoumann Nov 14, 2026
7b64684
build(size): set the gzip budget to the 104,235 bytes the engine fixe…
chhoumann Nov 14, 2026
1f0b4c2
fix(transcription): upload episodes signed with an Akamai hdnea token
chhoumann Nov 14, 2026
37fdc08
build(size): set the gzip budget to the 104,238 bytes the engine fixe…
chhoumann Nov 14, 2026
79addc3
fix(transcription): stop waiting for audio metadata after 5 s or on u…
chhoumann Nov 14, 2026
3641fb8
build(size): set the gzip budget to the 104,290 bytes the engine fixe…
chhoumann Nov 14, 2026
73b5460
Merge commit '3641fb8b5aae2158b4c7250bdba5de92c6ac3fa5' into feat/tra…
chhoumann Nov 16, 2026
c6adf83
Merge remote-tracking branch 'origin/master' into feat/transcription-…
chhoumann Nov 16, 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
3 changes: 2 additions & 1 deletion .claude/skills/verify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ 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 and OpenAI with a fixture provider while it
watches.

- `.claude/skills/verify/ui.mjs` sends trusted input through
`obsidian dev:cdp`. Its verbs are `click <css> [--text <s>] [--right]`,
Expand Down
50 changes: 30 additions & 20 deletions .claude/skills/verify/features/transcripts.md

Large diffs are not rendered by default.

29 changes: 22 additions & 7 deletions .claude/skills/verify/net.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// Network log for this worktree's Obsidian instance, with a fixture provider in
// place of the paid transcription APIs.
//
// node .claude/skills/verify/net.mjs watch start a fresh log; answer OpenAI and Deepgram locally
// node .claude/skills/verify/net.mjs watch start a fresh log; answer ElevenLabs, Deepgram and OpenAI locally
// node .claude/skills/verify/net.mjs log print each request as JSON, oldest first; a path only
// for the fixture server, OpenAI and Deepgram
// for the fixture server and the three providers
// node .claude/skills/verify/net.mjs unwatch restore fetch and requestUrl
//
// PodNotes sends its requests (feeds, audio, transcripts, OpenAI, Deepgram)
// PodNotes sends its requests (feeds, audio, transcripts, the providers)
// through requestUrl, which Obsidian forwards to its main process on the
// `request-url` IPC channel. The fetch log catches anything that bypasses it.
import { fileURLToPath } from "node:url";
Expand All @@ -33,7 +33,7 @@ const instance = resolveInstanceOptions(
const CALL_TIMEOUT_MS = 15000;
const FIXTURE_TRANSCRIPTION = "This text came from the fixture provider.";
const FIXTURE_REPLY = "A second speaker answers.";
const PATH_HOSTS = [FIXTURE_HOST, "api.openai.com", "api.deepgram.com"];
const PATH_HOSTS = [FIXTURE_HOST, "api.elevenlabs.io", "api.deepgram.com", "api.openai.com"];

/** @param {string} code */
async function evaluate(code) {
Expand Down Expand Up @@ -84,7 +84,20 @@ const WATCH = `(() => {
end: from + index * 0.4 + 0.3,
speaker,
}));
const deepgram = { results: { channels: [{ alternatives: [{ words: [...words(text, 0, 0), ...words(${jsLiteral(FIXTURE_REPLY)}, 1, 12)] }] }] } };
const reply = ${jsLiteral(FIXTURE_REPLY)};
const deepgram = { results: { channels: [{ alternatives: [{ words: [...words(text, 0, 0), ...words(reply, 1, 12)] }] }] } };
// ElevenLabs' words, at the same times, with a spacing item between each two.
const scribeWords = (sentence, speaker, from) => words(sentence, speaker, from).flatMap(({ punctuated_word, start, end }, index) => {
const word = { text: punctuated_word, type: "word", start, end, speaker_id: "speaker_" + speaker };
return index === 0 ? [word] : [{ text: " ", type: "spacing", start, end: start, speaker_id: word.speaker_id }, word];
});
const elevenlabs = { language_code: "eng", text: text + " " + reply, words: [...scribeWords(text, 0, 0), ...scribeWords(reply, 1, 12)] };
// A multipart request that names an address in place of a file is a few hundred bytes.
const namedAddress = (request) => {
if (!(request.body?.byteLength < 4096)) return undefined;
const match = /name="source_url"\\r\\n\\r\\n([^\\r]+)/.exec(new TextDecoder().decode(request.body));
return match ? logged(match[1]) : undefined;
};
const originalFetch = window.fetch;
window.fetch = async function (input, init) {
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
Expand All @@ -101,9 +114,11 @@ const WATCH = `(() => {
? { text }
: request.url.startsWith("https://api.deepgram.com/")
? deepgram
: null;
: request.url.startsWith("https://api.elevenlabs.io/")
? elevenlabs
: null;
if (answer) {
entries.push({ via: "requestUrl", method, url: logged(request.url), answeredBy: "fixture provider", contentType: request.contentType, uploadBytes: request.body?.byteLength ?? 0 });
entries.push({ via: "requestUrl", method, url: logged(request.url), answeredBy: "fixture provider", contentType: request.contentType, uploadBytes: request.body?.byteLength ?? 0, sourceUrl: namedAddress(request) });
const body = new TextEncoder().encode(JSON.stringify(answer)).buffer;
queueMicrotask(() => ipc.emit(replyChannel, {}, { status: 200, headers: { "content-type": "application/json" }, body }));
return;
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ svelte-check's native API path passes when a tsconfig matches no files, which
`check:a11y` in temporary workspaces and requires it to fail on that case and
when the native compiler cannot start.

After `npm run build`, `npm run size` enforces 330,000 raw bytes and 104,290 gzip bytes at level 9 for root `main.js` in the Test workflow's Build and sizes worker. `npm run size:data` reports a synthetic v2 stress library with 50 feeds, 2,000 history entries, and 200 saved episodes from frozen NPR metadata, including duplicated snapshots. Its 1.5 MB document goal is advisory. Pass an additive candidate JSON path to report optional-field overhead without changing existing data. In the isolated Obsidian instance, `npm run count:writes -- start`, `report`, and `stop` record writes to PodNotes' exact `data.json` path. Stop the recorder before stopping the instance, because recorder commands start a stopped instance; plugin reloads invalidate its counts.
After `npm run build`, `npm run size` enforces 330,000 raw bytes and 105,220 gzip bytes at level 9 for root `main.js` in the Test workflow's Build and sizes worker. `npm run size:data` reports a synthetic v2 stress library with 50 feeds, 2,000 history entries, and 200 saved episodes from frozen NPR metadata, including duplicated snapshots. Its 1.5 MB document goal is advisory. Pass an additive candidate JSON path to report optional-field overhead without changing existing data. In the isolated Obsidian instance, `npm run count:writes -- start`, `report`, and `stop` record writes to PodNotes' exact `data.json` path. Stop the recorder before stopping the instance, because recorder commands start a stopped instance; plugin reloads invalidate its counts.

Before opening a PR or cutting a release, run the CI-equivalent checks locally:

Expand Down
6 changes: 4 additions & 2 deletions obsidian-e2e.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ export default {
},
openAISecretId: "",
deepgramSecretId: "",
elevenLabsSecretId: "",
transcript: {
path: "transcripts/{{podcast}}/{{title}}.md",
template: "# {{title}}\n\nPodcast: {{podcast}}\nDate: {{date}}\n\n{{transcript}}",
provider: "elevenlabs",
model: "",
diarization: {
enabled: false,
provider: "openai",
enabled: true,
speakerTemplate: "**{{speaker}}:** ",
},
},
Expand Down
11 changes: 10 additions & 1 deletion scripts/size-baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ main.js raw: 307131 bytes; budget 330000 bytes; 22869 bytes remaining
main.js gzip (level 9): 97161 bytes; budget 100000 bytes; 2839 bytes remaining
```

The gzip budget is now 104,290 bytes. On 2026-10-14 it rose from 100,000 for
The gzip budget is now 105,220 bytes. On 2026-10-14 it rose from 100,000 for
the full player's Transcript panel, which the owner approved at about 1.9 KB
and which measured 2,576 bytes. The coordinator set 103,000 to keep the
panel's Find and Follow chip and to leave room for fixes in flight. The
Expand Down Expand Up @@ -54,6 +54,15 @@ main.js raw: 319405 bytes; budget 330000 bytes; 10595 bytes remaining
main.js gzip (level 9): 104290 bytes; budget 104290 bytes; 0 bytes remaining
```

On 2026-11-16 it rose from 104,290 by 930 bytes for the transcription provider
and model settings, their migration, and the ElevenLabs Scribe v3 provider. With
them:

```text
main.js raw: 322274 bytes; budget 330000 bytes; 7726 bytes remaining
main.js gzip (level 9): 105220 bytes; budget 105220 bytes; 0 bytes remaining
```

Gzip uses Node's `gzipSync` at level 9, without a filename or timestamp.
Budgets use decimal bytes. The brief's 96,533-byte reference is unexplained.
This report fixes the compressor instead of comparing compressed sizes across
Expand Down
2 changes: 1 addition & 1 deletion scripts/size.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ try {
if (!bundle.length) throw new Error(`${path} is empty. Run npm run build first.`);
const measurements = [
{ name: "raw", bytes: bundle.length, budget: 330_000 },
{ name: "gzip (level 9)", bytes: gzipSync(bundle, { level: 9 }).length, budget: 104_290 },
{ name: "gzip (level 9)", bytes: gzipSync(bundle, { level: 9 }).length, budget: 105_220 },
];
const rows = measurements.map(({ name, bytes, budget }) => {
const overage = Math.max(0, bytes - budget);
Expand Down
2 changes: 1 addition & 1 deletion scripts/size.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("bundle budget CLI", () => {
const result = check("gzip.js", randomBytes(110_000));
expect(result.status).toBe(1);
expect(result.stdout).toMatch(
/gzip \(level 9\): \d+ bytes; budget 104290 bytes; OVER by \d+ bytes/,
/gzip \(level 9\): \d+ bytes; budget 105220 bytes; OVER by \d+ bytes/,
);
expect(result.stdout).toContain("budget 330000 bytes; 220000 bytes remaining");
});
Expand Down
6 changes: 4 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,14 @@ export const DEFAULT_SETTINGS: IPodNotesSettings = {
},
openAISecretId: "",
deepgramSecretId: "",
elevenLabsSecretId: "",
transcript: {
path: "transcripts/{{podcast}}/{{title}}.md",
template: "# {{title}}\n\nPodcast: {{podcast}}\nDate: {{date}}\n\n{{transcript}}",
provider: "elevenlabs",
model: "",
diarization: {
enabled: false,
provider: "openai",
enabled: true,
speakerTemplate: "**{{speaker}}:** ",
},
},
Expand Down
7 changes: 6 additions & 1 deletion src/main.persistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { attachDataFileWriter, dataFileText, manualClock } from "../tests/mocks/
import { FakeDocument } from "../tests/mocks/fakeMedia";
import released2200 from "../tests/fixtures/persistence/released-2.20.0.json";
import released2211 from "../tests/fixtures/persistence/released-2.21.1.json";
import released2240 from "../tests/fixtures/persistence/released-2.24.0.json";

function memorySecretStorage(initial: Record<string, string> = {}) {
const values = new Map(Object.entries(initial));
Expand Down Expand Up @@ -401,11 +402,15 @@ it("takes in the file a save read back before one that lands after it", async ()
});
});

/** A released library with no API key and no speaker labels, as this version saves it. */
function savedByThisVersion(released: Record<string, unknown>): Record<string, unknown> {
const data: Record<string, unknown> = {
libraryId: "",
...structuredClone(released),
headsetPreviousTrack: "captureTimestamp",
headsetNextTrack: "skipForward",
elevenLabsSecretId: "",
transcript: { ...(released.transcript as object), provider: "elevenlabs", model: "" },
};
delete data.feedCache;
return data;
Expand Down Expand Up @@ -964,6 +969,7 @@ describe("PodNotes persistence integration", () => {
it.each([
["2.20.0", released2200],
["2.21.1", released2211],
["2.24.0", released2240],
])("loads a %s library with a private feed unchanged", async (_version, released) => {
const id = "podnotes-feed-url-00000000-0000-4000-8000-000000000211";
const secretUrl = "http://podnotes.test:41627/private.xml?auth=released";
Expand All @@ -984,7 +990,6 @@ describe("PodNotes persistence integration", () => {
expect(saveData.mock.calls[0][0]).toEqual({
...savedByThisVersion(released),
defaultVolume: 0.4,
libraryId: "",
});
expect(values.get(id)).toBe(secretUrl);
expect(resolveFeedUrl(plugin.settings.savedFeeds["PRIV2 Both"], plugin.feedUrls)).toBe(
Expand Down
Loading
Loading