Repository navigation
fix(transcription): offer "Transcribe current episode from audio" offline with your own server - #553
Conversation
Fails until the command follows the Transcript panel's offline rule.
…rver The Transcript panel's "Transcribe with your server" button stays enabled offline, but "Transcribe current episode from audio" was hidden, so a server on the same computer could transcribe from the panel but not from the command palette. The command runs the same audio transcription as the button, so it now follows the button's rule: available offline when the provider is the user's own server, whatever its address. "Transcribe current episode" stays online-only. It first looks up and fetches the feed's published transcript, which needs the network.
…ffline audio command measures
Deploying podnotes with
|
| Latest commit: |
39ada56
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ee219e0f.podnotes.pages.dev |
| Branch Preview URL: | https://fix-offline-own-server-comma.podnotes.pages.dev |
|
PASS+NOTES Tested head Setup: fresh worktree vault, command palette and file explorer enabled, Observed on parent:
Observed on head:
Commands included The split in Nonblocking notes: opening PodNotes settings emitted the existing duplicate setting-key warning for Evidence and the driver are in this verification worktree's |
…ver-commands # Conflicts: # AGENTS.md # scripts/size-baseline.md # scripts/size.mjs # scripts/size.test.ts
Summary
Offline, with Transcription provider set to OpenAI-compatible server, the Transcript panel's Transcribe with your server button worked, but the command palette hid PodNotes: Transcribe current episode from audio. Both run the same
transcribeCurrentEpisodeFromAudio(). The command now uses the panel's rule: it stays available offline when the provider is your own server.What each command needs, from the code:
findPublishedTranscript, which loads the feed, and then fetches the published transcript over the network. The panel's published-only Save as note button is also disabled offline.choice.server.navigator.onLinecan't tell whether a LAN host is reachable. An unreachable server already fails with "PodNotes could not reach the server at …". Allowing only loopback would also mean changing the panel, and it would add host parsing for that one case.The bundle grows by 60 raw and 30 gzip bytes over master after #551, which also raised the budgets. Both budgets rise by exactly that (334,165 raw, 109,270 gzip), recorded in
scripts/size-baseline.md. A tighter single-function version measured 18 raw bytes smaller but 5 gzip bytes larger, and read worse.Docs after 2.25.1 ships
docs/STYLE.md keeps unreleased behavior out of the docs, so this PR doesn't touch them. After the release, replace the bullet at
docs/src/content/docs/transcripts.md:110("Limits") with:player.md:97covers only the panel button, which doesn't change, so it stays as it is.Verification
Obsidian 1.14.4 (installer 1.14.4), Linux, isolated worktree instance. Setup:
Fixtures/Local Fixture.wav(60 s, written byfixtures.mjs audio) played via Play with PodNotes. OpenAI-compatible server athttp://podnotes.test:28302/v1(thefixtures.mjs serverroute, over loopback), modelwhisper-local, no key.screens.mjs offline onsetnavigator.onLineto false and firedoffline. No real API key was used.Before (2.25.0, offline):
command id=podnotes:podnotes-transcribe-audioandpodnotes:podnotes-transcribesent 0 requests and showed no notice.transcripts/local file/Local Fixture.md.After (this branch, offline,
navigator.onLineread false at each step):[00:00:00] This text came from the fixture server.and[00:00:12] ….podnotes-transcribe-audiosent 1 request and saved the note.podnotes-transcribesent 0 requests.dev:errors: No errors captured.Regression test:
src/commands.test.ts› Transcribe › "runs from audio offline with the user's own server, as the Transcript panel does". It uses a LAN server address. It failed on the old code withexpected false to be trueatavailable("podnotes-transcribe-audio")(commit 7e9c764 lands before the fix).npm run plantresults, each caught, with the restored run passing:expected [] to deeply equal [ Array(1) ])!!transcriptionChoice(settings)instead of.server(any provider offline)localhostserver countsCommands, all on Node 22.23.4 via
fnm exec:npm run lint,npm run format:check,npm run typecheck,npm run build,npm run size(334,165 / 109,270 after merging master, 0 remaining),npm run test(125 files, 2,992 tests passed),npm run test:tooling(9 files, 56 tests passed),vitest run scripts/size.test.ts(3 passed). I skippeddocs:buildbecause no docs changed, andtest:e2ebecause its transcribe journeys run online, which this change leaves alone.Release impact
None to settings, storage, API, or URIs. Patch release (
fix). The transcripts doc's "Limits" bullet needs the update above once 2.25.1 is out.Note
Low Risk
Small, localized command availability change with regression tests; no settings, storage, or auth changes.
Overview
PodNotes: Transcribe current episode from audio now follows the Transcript panel: it stays in the command palette while offline when transcript settings use an OpenAI-compatible provider with a configured server URL. Transcribe current episode is unchanged and still requires a connection because it fetches a published transcript from the feed first.
commands.tssplits availability intocanTranscribe(online + audio) andcanTranscribeAudio(online or configured server + audio). Tests cover offline availability and that a missing model still surfaces the settings notice.The production bundle budgets rise by 60 raw and 30 gzip bytes to 334,165 / 109,270 in
size.mjs, tests,AGENTS.md, andsize-baseline.md.Reviewed by Cursor Bugbot for commit 39ada56. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Make audio transcription available offline with a configured server
commands.registerCommands: the general transcription command still requires an online connection, while the audio-transcription command is now available offline whentranscriptionChoicefinds a configured OpenAI-compatible serverscripts/size.mjsslightly (raw to 334,151 bytes, gzip to 109,262 bytes) to cover the added codecommands.tsavailability logic and the new offline tests incommands.test.tsMacroscope summarized a91b15c. (Automatic summaries will resume when PR exits draft mode or review begins).