diff --git a/.claude/skills/verify/SKILL.md b/.claude/skills/verify/SKILL.md index 0ebf937c..8e249cd1 100644 --- a/.claude/skills/verify/SKILL.md +++ b/.claude/skills/verify/SKILL.md @@ -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 [--text ] [--right]`, @@ -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 diff --git a/.claude/skills/verify/features/transcripts.md b/.claude/skills/verify/features/transcripts.md index 8d66aed4..a63dda42 100644 --- a/.claude/skills/verify/features/transcripts.md +++ b/.claude/skills/verify/features/transcripts.md @@ -2,9 +2,10 @@ A user transcribes the current episode. When its feed publishes a transcript (``), PodNotes writes it as timestamped paragraphs with no -API key and no call to OpenAI or Deepgram. Otherwise, and always through -`Transcribe current episode from audio`, it sends the audio to the configured -provider with the user's key. The note goes to `Transcript path`, filled +API key and no call to a provider. Otherwise, and always through +`Transcribe current episode from audio`, it sends the audio to the provider +chosen under `Transcription provider`, with the user's key. A new install is on +ElevenLabs with `Speaker labels` on. The note goes to `Transcript path`, filled from `Transcript template`, and opens. ## Sub-features @@ -14,12 +15,18 @@ from `Transcript template`, and opens. - `transcript-paid` keeps the audio path for an episode without a published transcript: the key notice without a key, the provider with one. - `transcript-failed` shows the fetch failure when a published transcript cannot be loaded, names the audio command when a key is set, and sends nothing to a provider. - `transcript-audio` transcribes the audio with the provider through `Transcribe current episode from audio`, even when a published transcript exists. +- `transcript-settings` shows `Transcription provider`, the chosen provider's API key row alone, `Model`, `Speaker labels` and, while those are on, `Speaker label format`. `Speaker labels` is disabled for a model without them. +- `transcript-elevenlabs` writes timestamped paragraphs with numbered speakers from one `scribe_v3` request. ElevenLabs gets the address of an episode a saved public feed lists, and the audio itself for a private feed's episode, a local file, and an address that carries a credential or is not public. +- `transcript-deepgram` does the same with `nova-3`. +- `transcript-openrouter` offers `Grok STT 2.0` (recommended), `ElevenLabs Scribe v2`, `MAI-Transcribe 2`, `Voxtral Mini Transcribe 3` and `Qwen3 ASR 1.7B`, filtered by OpenRouter's public model catalog. Grok gets uploads as base64 JSON routed to xAI, Scribe v2 the address of a public episode, and an upload goes in parts of at most 18 MB and 1,800 s, or 12 MB and 900 s for Voxtral and Qwen3 ASR, which label no speakers. +- `transcript-openai` sends OpenAI the audio as `gpt-transcribe` uploads of at most 24 MB and 2,070 s, one at a time, and writes paragraphs without timestamps or speaker labels. +- `transcript-openai-compatible` sends the audio to the address under `Server address`, with the model typed under `Model` and the key only when one is selected. It asks for verbose_json with word and segment times, and once the server refuses that, asks for json for that part and every later one. It writes timed paragraphs from words, punctuated from the answer's text when the words carry none, or from segments, and untimed ones from text. A server on this machine or a private network is reached. - `transcript-existing` refuses a second run while the note exists. ## How to get to it (user POV) - With an audio episode loaded, run `PodNotes: Transcribe current episode` or `PodNotes: Transcribe current episode from audio` from the palette. -- Set the path, template and API keys in Settings > PodNotes under `Transcripts`. Timestamps follow `Timestamp template` under `Notes`: links for `{{linktime}}`, plain times for `{{time}}`. +- Set the provider, its API key, the model, speaker labels, the path and the template in Settings > PodNotes under `Transcripts`. Timestamps follow `Timestamp template` under `Notes`: links for `{{linktime}}`, plain times for `{{time}}`. ## Driving it with ui.mjs @@ -27,14 +34,37 @@ Preconditions: - `FEED=$(node .claude/skills/verify/fixtures.mjs transcripts)` prints `http://podnotes.test:/transcripts.xml`. Add `PodNotes Transcripts` through Settings as [feeds.md](./feeds.md) describes. Its episodes are `VTT Episode` (an HTML link, then a relative VTT link), `SRT Episode`, `JSON Episode`, `Untranscribed Episode` and `Broken Transcript Episode` (its VTT returns 404). - No `transcripts/PodNotes Transcripts/` notes exist yet. -- `NET=node .claude/skills/verify/net.mjs`. Run `$NET watch` before each command. While it watches, the fixture provider answers OpenAI and Deepgram, so nothing is charged even with a key set. +- `NET=node .claude/skills/verify/net.mjs`. Run `$NET watch` before each command, and again after an `app:reload`, which drops it. While it watches, the fixture provider answers ElevenLabs, Deepgram, OpenRouter (its model catalog too) and OpenAI, so nothing is charged even with a key set. +- A fake key is a precondition, not a user path. For ElevenLabs: `CLI eval code='app.secretStorage.setSecret("podnotes-elevenlabs-api-key-424242", "sk-verify-fixture-not-real"), app.plugins.plugins.podnotes.settings.elevenLabsSecretId = "podnotes-elevenlabs-api-key-424242", app.plugins.plugins.podnotes.saveSettings(), "key set"'`. Deepgram, OpenRouter and OpenAI take `podnotes-deepgram-api-key-424242` in `deepgramSecretId`, `podnotes-openrouter-api-key-424242` in `openRouterSecretId` and `podnotes-openai-api-key-424242` in `openAISecretId`. +- Choose a provider in Settings by focusing the `Transcription provider` dropdown with `UI click` and stepping with `UI key ArrowDown` or `UI key ArrowUp`, or as a precondition with `CLI eval code='app.plugins.plugins.podnotes.settings.transcript.provider = "openai", app.plugins.plugins.podnotes.settings.transcript.model = "", app.plugins.plugins.podnotes.saveSettings(), "chosen"'`. -- **Published.** Play `VTT Episode` ([player.md](./player.md)), then run `UI key Ctrl+p`, `UI type .prompt-input 'Transcribe current episode'` and `UI key Enter`. The exact command is the first suggestion; `--text 'Transcribe current episode'` matches both transcribe commands. The notices read `Queued "VTT Episode" for transcription. It will start automatically.` and, in the progress notice headed `Transcription: VTT Episode (00:00:00):`, `Saved the transcript the feed publishes.` `transcripts/PodNotes Transcripts/VTT Episode.md` opens. Its body starts `[00:00:00](obsidian://podnotes?episodeName=VTT%20Episode&url=...&time=0.48) From Potsdam in Brandenburg, Germany,`. `$NET log` lists `GET .../t/podnews.vtt` and nothing at `api.openai.com` or `api.deepgram.com`. `node .claude/skills/verify/fixtures.mjs requests` has `/t/podnews.vtt`, not `/t/buzzcast.html`. Repeat with `SRT Episode` and `JSON Episode`. +- **Published.** Play `VTT Episode` ([player.md](./player.md)), then run `UI key Ctrl+p`, `UI type .prompt-input 'Transcribe current episode'` and `UI key Enter`. The exact command is the first suggestion; `--text 'Transcribe current episode'` matches both transcribe commands. The notices read `Queued "VTT Episode" for transcription. It will start automatically.` and, in the progress notice headed `Transcription: VTT Episode (00:00:00):`, `Saved the transcript the feed publishes.` `transcripts/PodNotes Transcripts/VTT Episode.md` opens. Its body starts `[00:00:00](obsidian://podnotes?episodeName=VTT%20Episode&url=...&time=0.48) From Potsdam in Brandenburg, Germany,`. `$NET log` lists `GET .../t/podnews.vtt` and nothing at `api.elevenlabs.io`, `api.deepgram.com` or `api.openai.com`. `node .claude/skills/verify/fixtures.mjs requests` has `/t/podnews.vtt`, not `/t/buzzcast.html`. Repeat with `SRT Episode` and `JSON Episode`. - **Seek.** Switch to Reading view and click a timestamp. `api.currentTime` lands on its time. -- **No published transcript.** Play `Untranscribed Episode` and run the command with no key. The notice is `Select or create an OpenAI API key in the transcript settings on this device.` and no note appears. -- **Key.** A fake key is a precondition, not a user path: `CLI eval code='app.secretStorage.setSecret("podnotes-openai-api-key-424242", "sk-verify-fixture-not-real"), app.plugins.plugins.podnotes.settings.openAISecretId = "podnotes-openai-api-key-424242", app.plugins.plugins.podnotes.saveSettings(), "key set"'`. With it, `Untranscribed Episode` downloads its WAV and `$NET log` shows a `POST https://api.openai.com/v1/audio/transcriptions` answered by the fixture provider. -- **Failed.** Play `Broken Transcript Episode` and run the command. The progress notice ends with `The published transcript could not be fetched: Network response returned HTTP 404.`, followed with a key by `Run "Transcribe current episode from audio" to transcribe it with OpenAI instead, which uses your API credit.` `$NET log` has the transcript GET (it records no status) and no provider call or `.wav`. -- **Audio command.** On the same episode, run `UI key Ctrl+p`, `UI type .prompt-input 'Transcribe current episode from audio'` and `UI click .suggestion-item --text 'from audio'`. With a key, the WAV is fetched and OpenAI (the fixture provider) answers. +- **Settings.** Open Settings > PodNotes. Under `Transcripts` a new vault shows `Transcription provider` on `ElevenLabs`, `ElevenLabs API key`, `Model` on `Recommended (Scribe v3)`, `Speaker labels` on, `Speaker label format`, then the path and template. Choosing `Deepgram`, `OpenRouter` or `OpenAI` swaps the key row for that provider's and the model list for its models. On `OpenRouter` the `Model` row offers `Recommended (Grok STT 2.0)`, `Grok STT 2.0`, `ElevenLabs Scribe v2`, `MAI-Transcribe 2`, `Voxtral Mini Transcribe 3` and `Qwen3 ASR 1.7B`, and `$NET log` shows one `GET https://openrouter.ai/api/v1/models` with no `Authorization`. A model the catalog dates reads `