Skip to content

fix(transcription): offer "Transcribe current episode from audio" offline with your own server - #553

Merged
chhoumann merged 4 commits into
masterfrom
fix/offline-own-server-commands
Nov 20, 2026
Merged

chhoumann merged 4 commits into
masterfrom
fix/offline-own-server-commands

Conversation

@chhoumann

@chhoumann chhoumann commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

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:

  • Transcribe current episode from audio sends audio to the chosen provider. A server on this computer needs no internet connection.
  • Transcribe current episode stays online-only. It first calls 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.
  • Any server address counts, LAN included, the same as the panel's choice.server. navigator.onLine can'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:

  • Both commands are hidden while Obsidian reports your device as offline. When OpenAI-compatible server is selected, PodNotes: Transcribe current episode from audio stays available, so a server on your computer can transcribe without a connection. PodNotes: Transcribe current episode looks for the feed's transcript first, so it needs a connection.

player.md:97 covers 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 by fixtures.mjs audio) played via Play with PodNotes. OpenAI-compatible server at http://podnotes.test:28302/v1 (the fixtures.mjs server route, over loopback), model whisper-local, no key. screens.mjs offline on set navigator.onLine to false and fired offline. No real API key was used.

Before (2.25.0, offline):

  • The palette search "Transcribe" showed "No commands found."
  • command id=podnotes:podnotes-transcribe-audio and podnotes:podnotes-transcribe sent 0 requests and showed no notice.
  • The panel button was enabled. Clicking it sent 1 request and saved transcripts/local file/Local Fixture.md.
Palette offline Panel offline

After (this branch, offline, navigator.onLine read false at each step):

  • The palette lists only Transcribe current episode from audio. Choosing it sent 1 request and saved the note with [00:00:00] This text came from the fixture server. and [00:00:12] ….
  • By id: podnotes-transcribe-audio sent 1 request and saved the note. podnotes-transcribe sent 0 requests.
  • With ElevenLabs offline, the palette shows "No commands found." With ElevenLabs online, it lists both commands.
  • dev:errors: No errors captured.
Own server, offline ElevenLabs, offline

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 with expected false to be true at available("podnotes-transcribe-audio") (commit 7e9c764 lands before the fix). npm run plant results, each caught, with the restored run passing:

Plant Caught by
Revert to the old shared online-only check, import removed runs from audio offline …
Palette check fixed, run guard left online-only runs from audio offline … (expected [] to deeply equal [ Array(1) ])
Plain command also available offline with a server runs from audio offline …
!!transcriptionChoice(settings) instead of .server (any provider offline) podnotes-transcribe-audio is available … only while online with a hosted provider
Only a localhost server counts runs from audio offline …

Commands, 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 skipped docs:build because no docs changed, and test:e2e because 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.ts splits availability into canTranscribe (online + audio) and canTranscribeAudio (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, and size-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

  • Splits the transcription availability checks in commands.registerCommands: the general transcription command still requires an online connection, while the audio-transcription command is now available offline when transcriptionChoice finds a configured OpenAI-compatible server
  • Both commands still require a playing audio episode
  • Running audio transcription offline without a configured model shows a missing-model notice
  • Raises the size budgets in scripts/size.mjs slightly (raw to 334,151 bytes, gzip to 109,262 bytes) to cover the added code
  • Behavioral Change: the audio-transcription command appears in command lists while offline when a server is configured; check commands.ts availability logic and the new offline tests in commands.test.ts

Macroscope summarized a91b15c. (Automatic summaries will resume when PR exits draft mode or review begins).

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.
@chhoumann
chhoumann marked this pull request as draft November 20, 2026 21:33
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

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

View logs

@chhoumann

Copy link
Copy Markdown
Owner Author

PASS+NOTES

Tested head a91b15cdb10ddb75989368f1a5708c989597b965 against parent 9ef18342b061042076cc22547fbc297b42bd8bb1. Independent verification in Linux's isolated Obsidian 1.14.4, installer 1.14.4.

Setup: fresh worktree vault, command palette and file explorer enabled, Fixtures/Local Fixture.wav loaded through the file menu's Play with PodNotes. Selected OpenAI-compatible server through Settings, address http://podnotes.test:28944/v1, model whisper-local, no API key. The fixture address resolves to loopback. Used ui.mjs for palette input and clicks, screens.mjs offline on|off for connectivity, and restarted fixtures.mjs server after going offline. Read navigator.onLine before command checks and restored offline after screenshots.

Observed on parent:

  • Offline with own server: neither command appeared in the palette. Direct IDs podnotes:podnotes-transcribe-audio and podnotes:podnotes-transcribe sent zero transcription requests.
  • The panel's Transcribe with your server button was enabled offline. Clicking it sent one request and wrote the transcript.
  • ElevenLabs offline hid both commands; direct IDs sent zero requests. Both providers listed both commands online.

Observed on head:

  • Own server offline listed only Transcribe current episode from audio. Selecting it in the palette sent one request and wrote transcripts/local file/Local Fixture.md.
  • After removing that generated note, direct podnotes:podnotes-transcribe-audio independently sent one request and recreated it.
  • Each request had no Authorization header, model whisper-local, verbose_json, word/segment granularities, and a 960,044-byte WAV. Separate disk reads confirmed the fixture sentences at 00:00:00 and 00:00:12 for both paths.
  • The plain command remained hidden offline and its direct ID sent zero requests before any transcript existed. ElevenLabs offline hid both commands and both direct IDs sent zero requests. Both providers listed both commands online.
  • dev:errors reported No errors captured on both builds.

Commands included npm ci, npm run build on each commit, explicit plugin reload after rebuilding, and npx vitest run src/commands.test.ts -t Transcribe at head. The focused suite passed all 3 tests. Build also passed both TypeScript projects.

The split in src/commands.ts applies the own-server rule to both availability and execution of the audio command. Keeping the feed-first command online-only is consistent with its network dependency. I found no regression in the tested behavior.

Nonblocking notes: opening PodNotes settings emitted the existing duplicate setting-key warning for name:Model on the parent too. Commands used the requested fnm exec --using 22.23.2, but this host's selected binary reports v22.23.4.

Evidence and the driver are in this verification worktree's .obsidian-e2e-artifacts/pr553/ (parent/head logs, palette screenshots, saved transcript copies, request log, unit output). Inspected all screenshots. Stopped the fixture server and isolated Obsidian; stop dry-run reported pids: none. No tracked files changed, no commits, pushes, or merges.

…ver-commands

# Conflicts:
#	AGENTS.md
#	scripts/size-baseline.md
#	scripts/size.mjs
#	scripts/size.test.ts
@chhoumann
chhoumann marked this pull request as ready for review November 20, 2026 23:37
@chhoumann
chhoumann merged commit 309f2c9 into master Nov 20, 2026
20 checks passed
@chhoumann
chhoumann deleted the fix/offline-own-server-commands branch November 20, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant