Adds a Transcribe button to audio upload collections and saves the transcript and timed sentences on the document. Transcripts can be translated into up to 10 languages and read aloud with synthetic or cloned voices, and the MP3s are kept in your own storage. Requires a VocalStack API key and Payload 3, and adds fields and a global that need an importmap and a migration on SQL databases.
VocalStack for Payload CMS: transcribe audio, translate it into other languages and read it aloud, kept in your own database and storage.
Installation
npm i @vocalstack/payload0
Stars
0
Forks
0
Open Issues
3 days ago
Last Updated
874
Weekly Downloads
v0.12.0
npm Version
425.7 KB
Unpacked Size
1
Dependencies
00 since Oct 11
| Date | Stars |
|---|---|
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
| Nov 7, 2026 | 0 |
| Nov 6, 2026 | 0 |
| Nov 5, 2026 | 0 |
| Nov 4, 2026 | 0 |
| Nov 3, 2026 | 0 |
| Nov 2, 2026 | 0 |
| Nov 1, 2026 | 0 |
| Oct 31, 2026 | 0 |
| Oct 30, 2026 | 0 |
| Oct 29, 2026 | 0 |
| Oct 28, 2026 | 0 |
| Oct 27, 2026 | 0 |
| Oct 26, 2026 | 0 |
| Oct 25, 2026 | 0 |
| Oct 24, 2026 | 0 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
| Oct 21, 2026 | 0 |
| Oct 20, 2026 | 0 |
| Oct 19, 2026 | 0 |
| Oct 18, 2026 | 0 |
| Oct 17, 2026 | 0 |
| Oct 16, 2026 | 0 |
| Oct 15, 2026 | 0 |
| Oct 14, 2026 | 0 |
| Oct 13, 2026 | 0 |
| Oct 12, 2026 | 0 |
| Oct 11, 2026 | 0 |
836+836 since Oct 22
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 836 |
| Dec 4, 2026 | 786 |
| Dec 3, 2026 | 785 |
| Dec 2, 2026 | 603 |
| Dec 1, 2026 | 591 |
| Nov 30, 2026 | 541 |
| Nov 29, 2026 | 513 |
| Nov 28, 2026 | 486 |
| Nov 27, 2026 | 187 |
| Nov 26, 2026 | 164 |
| Nov 25, 2026 | 57 |
| Nov 24, 2026 | 70 |
| Nov 23, 2026 | 93 |
| Nov 22, 2026 | 285 |
| Nov 21, 2026 | 606 |
| Nov 20, 2026 | 625 |
| Nov 19, 2026 | 807 |
| Nov 18, 2026 | 964 |
| Nov 17, 2026 | 1,152 |
| Nov 16, 2026 | 1,291 |
| Nov 15, 2026 | 1,293 |
| Nov 14, 2026 | 1,142 |
| Nov 13, 2026 | 1,120 |
| Nov 12, 2026 | 938 |
| Nov 11, 2026 | 756 |
| Nov 10, 2026 | 562 |
| Nov 9, 2026 | 403 |
| Nov 8, 2026 | 201 |
| Nov 7, 2026 | 30 |
| Nov 6, 2026 | 33 |
| Nov 5, 2026 | 36 |
| Nov 4, 2026 | 33 |
| Nov 3, 2026 | 47 |
| Nov 2, 2026 | 52 |
| Nov 1, 2026 | 72 |
| Oct 31, 2026 | 286 |
| Oct 30, 2026 | 455 |
| Oct 29, 2026 | 451 |
| Oct 28, 2026 | 451 |
| Oct 27, 2026 | 427 |
| Oct 26, 2026 | 416 |
| Oct 25, 2026 | 394 |
| Oct 24, 2026 | 174 |
| Oct 23, 2026 | 0 |
| Oct 22, 2026 | 0 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1423030201-root)<a href="https://payloaddirectory.dev/plugins/1423030201-root"><img src="https://payloaddirectory.dev/badge/1423030201-root.svg" alt="Payload Directory"></a>README
VocalStack for Payload CMS 3: a Transcribe button on every audio upload. The transcript is saved on the document as text plus timed sentences.
Read more about the VocalStack transcription plugin for Payload CMS on the VocalStack website.
pnpm add @vocalstack/payload
// payload.config.ts
import { vocalstackPlugin } from '@vocalstack/payload'
export default buildConfig({
plugins: [
vocalstackPlugin({
// Optional. Without it, connect from Admin → Settings → VocalStack.
apiKey: process.env.VOCALSTACK_API_KEY,
}),
],
})
Then run payload generate:importmap. The plugin adds fields to the targeted collections and a vocalstack global, so with Postgres also run payload migrate:create.
audio/*, a wildcard, or no restriction), or the ones in collections, gets:
audio/* documents only. It shows progress and survives a reload mid-job, and Stop ends a job you no longer want: the document goes back to how it was (an earlier transcript stays), and VocalStack keeps what it transcribed before the stop.vocalstack group:
transcript: text you can edit; paragraphs break on a speaker change or a pause.sentences: [{ start, end, speaker, text }] in seconds.status, language, error, transcriptionId and transcribedAt (and recordingId, which documents transcribed before 0.9.0 keep; everything is read by transcriptionId).POST /api/{collection}/:id/vocalstack/transcribe, POST …/vocalstack/stop, GET …/vocalstack/status and GET …/vocalstack/stream (live progress as Server-Sent Events).voices. One click in the admin does both; the server carries on until it is done, with no one watching. Saved in the vocalstack group as:
translations: { [lang]: { translatedAt, sentences, pending?, error?, requestedAt? } }, the transcript's sentences (same ids and times) translated. pending while the server is still translating it.speech: { [lang]: { voice, cast, readIn, state, error, durationS, requestedAt, renderedAt, sentences, audio } }. state is translating (waiting for its translation), queued, running, failed or sealed; once sealed, sentences are the translation in the reading's own timing, with words, for a read-along player, and audio is the MP3 kept in your storage.POST …/vocalstack/voices { voices: 'synthetic' | 'cloned' }, POST …/vocalstack/request { langs, speak? } (translate, and read aloud unless speak: false; carried on by the server), POST …/vocalstack/translate { langs } (one step; answers more: true when it stopped for time), DELETE …/vocalstack/translate?lang=, POST …/vocalstack/speak { langs }, GET …/vocalstack/speak, and the public GET …/vocalstack/audio?lang=, which redirects to the reading's MP3 (or, with no lang or the spoken one, the transcribed audio) for anyone who may read the document.listeners): visitors pick any language VocalStack offers, and it is made for them and kept for everyone after. GET /api/vocalstack/languages is public, POST …/vocalstack/listen { lang } asks for a language and GET …/vocalstack/listen?lang= says where it stands; see below.speakers): documents of a collection of people get a sidebar panel that saves that person as a VocalStack speaker and clones their voice, from a minute of a recording they speak in or from an uploaded sample, with their permission. Kept in a hidden vocalstackSpeaker group (speakerId, cloneId, state of the voice: none/training/ready/failed, progress, error, sampleS, consentAt, createdAt), with GET/POST/DELETE /api/{collection}/:id/vocalstack/speaker, …/speaker/sources and …/speaker/preview.| Option | Default | |
|---|---|---|
apiKey | none | A vs_key_… key with Read and Write. It wins over a key connected in the admin. |
collections | every upload collection that accepts audio | Which upload collections get the button. |
audioFields | none | Audio that isn't an upload document; see below. |
spokenLanguage | auto-detect | A Whisper language code (en, ro, …). |
fileURL | the doc's url, made absolute | ({ doc, collection, req }) => string: the address VocalStack fetches. Point it at your bucket's public URL to skip the Payload file proxy. |
access | signed-in users who can update the doc | Extra check for transcribing, translating, speakers, voices and the admin lookups, and for changing the connection. |
oneClickConnect | false | Show Connect VocalStack (see below). |
updateCheck | true | Say in the admin when a newer version is on npm; see below. false makes no outbound call. |
apiURL / dashboardURL | https://api.vocalstack.com / https://app.vocalstack.com | |
enabled | true | false keeps the schema but removes the button and the endpoints. |
speakers | none | Collections of people saved as VocalStack speakers, each with a cloned voice; see below. (voices, its name in 0.5, still works.) |
readings | { slug: 'vocalstack-readings' } | The upload collection finished readings are kept in, added by the plugin; overrides: (collection) => collection adjusts it. false streams readings from VocalStack instead. See below for bringing your own. |
listeners | off | true, or { languages?, speak?, access?, perHour? }: let visitors ask for a transcript in their language; see below. |
metadata | none | ({ collection, doc, field, row, req }) => MetadataPatch: VocalStack metadata for each transcription, from its document; see below. |
tags | none | ({ collection, doc, field, row, req }) => string[]: VocalStack tags for each transcription, by name; see below. |
externalId | <collection>:<id> (<collection>:<id>:<row id> for an audio row) | (args) => string: the transcription's externalId, unique in the workspace. false sends none. |
externalURL | none | (args) => string: the transcription's externalUrl, e.g. the document's public page. |
metadataFields | none | [{ key, label, type, public?, options? }]: workspace fields made (or set public) before metadata is first written; see below. |
voiceMode | the transcript's toggle | ({ collection, doc, req, row }) => 'synthetic' | 'cloned' | undefined: the site decides how transcripts are read aloud, and the toggle is hidden. See below. |
The plugin is part of your site's code, so it can't update itself: a new version means changing package.json, rebuilding and deploying, and sometimes a migration. It does tell you when one is out. The server asks npm for the newest @vocalstack/payload at most every 6 hours (GET /api/vocalstack/version, signed-in users), and while a newer one is out the admin nav shows a notice linking to Settings → VocalStack, which shows both versions, the release notes and the steps. VERSION (from @vocalstack/payload) is the installed one.
To have updates proposed for you, let Renovate or Dependabot open a pull request for each release:
// renovate.json
{ "extends": ["config:recommended"], "packageRules": [{ "matchPackageNames": ["@vocalstack/payload"], "labels": ["vocalstack"] }] }
After updating, run payload generate:importmap, and with Postgres or SQLite payload migrate:create.
Imported content often points at files by name or link instead of upload documents. audioFields gives each row of an array field its own button and vocalstack transcript:
vocalstackPlugin({
audioFields: [
{
collection: 'episodes',
field: 'attachments', // a top-level array (tabs, rows and collapsibles are looked through)
condition: (row) => row.type === 'file',
audioURL: ({ row }) => (row.filename ? `https://cdn.example.com/episodes/${encodeURIComponent(String(row.filename))}` : undefined),
},
],
})
Rows are addressed by their id: POST /api/episodes/:id/vocalstack/transcribe?field=attachments&row=<row id>. A new row needs saving first.
Select documents in a list (an audio upload collection, or a collection with audioFields) and a Transcribe button with the VocalStack mark shows above the table. After a confirmation it starts a transcription for every audio file of the selection (each audio row of each document), 25 documents per request; "Select all" across pages takes every document the list's filters match. Files already transcribed or in progress are skipped, and if VocalStack refuses a start every other start would get too (no credit, a cap, the key), nothing more is started and the reason is shown once. bulkTranscribe: false turns it off.
While the list is open it asks every 5 s (POST /api/<collection>/vocalstack/settle) how running jobs stand, saves the ones that finished on their documents and refreshes the list, so nobody has to open each document. The answer's jobs ({ id, row, phase, progress }, phase queued, fetching, transcribing or finalizing) is also there for a list cell: useTranscriptionProgress(collection, id) from @vocalstack/payload/client returns { phase, progress } for a document while it runs.
'use client'
import { useTranscriptionProgress } from '@vocalstack/payload/client'
export const TranscribedCell = ({ cellData, rowData }) => {
const live = useTranscriptionProgress('sermons', rowData?.id)
if (live) return <span>{live.phase === 'transcribing' ? `${live.progress}%` : live.phase}</span>
return <span>{cellData ? '✓' : '–'}</span>
}
Every call to VocalStack says User-Agent: VocalStack-Payload/<version>, so its transcriptions are recorded as origin payload.
Every transcription the plugin makes can carry VocalStack metadata and tags taken from its document, so it can be found, filtered (GET /v1/transcriptions?metadata[preacher]=John Smith, ?tag=) and shown with its details in VocalStack and on its share links.
vocalstackPlugin({
// VocalStack's system fields (recordedAt, location, event, description, externalId, externalUrl, episode,
// license) and the workspace's own under `custom`. Only the keys given change; null clears one.
metadata: async ({ doc, req }) => ({
recordedAt: String(doc.date).slice(0, 10), // YYYY-MM-DD, or an RFC 3339 time, or a Date
description: (doc.description as string) || null,
custom: { speaker: doc.speakerName as string, episodeKind: 'interview' },
}),
tags: ({ doc }) => [doc.category as string, 'Podcast'],
externalURL: ({ doc }) => `https://example.com/episodes/${doc.slug}`,
// Optional: fields with a label, a type and public (shown to listeners) set up front.
metadataFields: [{ key: 'speaker', label: 'Speaker', type: 'choice', public: true }],
})
vocalstack.metadataSync ({ transcriptionId, hash, tags, at, error }, no key or secret), so a save that changes nothing sends nothing, and the plugin's own saves (progress, transcripts, readings) send nothing either.metadataSync.error and the next save tries again.externalId is on by default and unique in the workspace. Transcribing a document again takes it off the earlier transcription first. If another transcription holds it, the new one is made without metadata and metadataSync.error says so.text for a string, number, boolean, multi_choice for a list, labelled from the key ("sermonSeries" → "Sermon series") and private. metadataFields makes them up front instead, with your label, type (text, long_text, number, boolean, date, datetime, link, choice, multi_choice) and public. Existing fields keep their type; their label and public are set as given (once per server start).undefined) is left as it is in VocalStack; null clears it (on a new transcription null is the same as leaving it out).metadata answering undefined sends nothing for that transcription: no metadata, no externalId, no tags. Every function is called for every transcription of the plugin's collections, upload documents (row and field unset) and audio rows alike, so guard with collection: metadata: ({ collection, doc }) => (collection === 'sermons' ? {…} : undefined). Answering {} sends only the defaults.Documents transcribed before the mapping existed, or before you changed it, get theirs on their next save, or all at once:
// scripts/vocalstack-sync.ts: `payload run scripts/vocalstack-sync.ts`
import { getPayload } from 'payload'
import config from '@payload-config'
import { syncMetadata } from '@vocalstack/payload'
const payload = await getPayload({ config })
const result = await syncMetadata(payload, { onProgress: (r, c) => console.log(c, r.synced, r.unchanged, r.failed.length) })
console.log(result) // { synced, unchanged, failed: [{ collection, id, row?, error }] }
process.exit(0)
syncMetadata(payload, { collections?, force? }) goes through every transcribed document of the plugin's collections and sends only what changed (force: true sends everything again). POST /api/<collection>/vocalstack/sync-metadata { ids, force? } does the same for up to 25 documents, for anyone who may update them.
After updating to 0.12, run payload migrate:create (Postgres, SQLite): the vocalstack group has a new JSON column, metadataSync.
import { vocalstackPlugin } from '@vocalstack/payload'
vocalstackPlugin({
speakers: [
{
collection: 'speakers',
// Transcriptions this speaker is in, offered as the sample to clone from.
transcriptions: async ({ doc, req }) => {
const { docs } = await req.payload.find({ collection: 'episodes', where: { speaker: { equals: doc.id } }, req })
return docs.flatMap((e) => (e.vocalstack?.transcriptionId ? [{ label: e.title, sentences: e.vocalstack.sentences, transcriptionId: e.vocalstack.transcriptionId }] : []))
},
},
],
})
A sample from a transcription can only come from the ones transcriptions returns for that document: cloning, and hearing a stretch first (GET /:id/vocalstack/speaker/clip?transcription=), refuse any other. Each source needs its transcriptionId. Before 0.9.0 this option was called recordings and keyed by recordingId; recordings still works, but sources that carry only a recordingId are left out, because VocalStack no longer looks transcripts up by recording.
Cloning needs at least 30 seconds of the person speaking alone (a minute is better, at most two), and the editor confirms they have the person's permission. From a recording, the editor clicks where the stretch starts and hears it before cloning; the plugin takes it from VocalStack. An uploaded sample is sent through your server, so on hosts that cap request bodies (Vercel: 4.5 MB) keep it to a minute or two of MP3 or M4A. Training takes a few minutes; the panel follows it. Deleting the speaker deletes them and their voice in VocalStack too. When VocalStack transcribes a new recording, it checks who speaks against your saved speakers first.
A cloned voice only ever reads words its own speaker said. With cloned (from the toggle, or from voiceMode once a person has a voice), each speaker VocalStack has matched to a clone is read in it: the speaker it was made from, or one VocalStack recognised as the same person when it transcribed the recording. Everyone else is read in a stock voice. VocalStack doesn't always recognise a speaker, and recordings transcribed before the voice existed are not matched, so a reading reports what it got as speech[lang].readIn: cloned, synthetic, or mixed.
voiceMode: async ({ doc, req }) => {
const speaker = await req.payload.findByID({ collection: 'speakers', id: doc.speaker, depth: 0, req })
return speakerData(speaker).state === 'ready' ? 'cloned' : 'synthetic'
}
speakerData(doc) (from @vocalstack/payload) reads the vocalstackSpeaker group, or the vocalstackVoice group of a document 0.5 saved and nobody has opened since.
0.6 follows VocalStack's rename of saved voices to speakers (/v1/speakers; a speaker's voice is only the sound, its clone). It talks to VocalStack before and after that change: it calls /v1/speakers first and falls back to /v1/voices on a 404, so nothing needs doing on the day the API changes.
voices is now speakers. voices is still read when speakers is not set. Types: SpeakerCollectionConfig, SpeakerSource, SpeakerFieldData, CloneState (the old names are deprecated aliases).vocalstackSpeaker (speakerId, cloneId, and the fields vocalstackVoice had). The vocalstackVoice group stays in the schema and is kept in step (voiceId is the clone's id) for one more minor version, so code reading it keeps working; move it to speakerData(doc) or vocalstackSpeaker. The sidebar field is now vocalstackSpeakerPanel (a UI field, nothing stored).vocalstackVoice is read through it and copied into vocalstackSpeaker the first time its panel opens. To copy them all at once, call migrateSpeakerFields({ collection, payload, req }) from a migration:// migrations/20261107_vocalstack_speakers.ts, after `payload migrate:create`
import { migrateSpeakerFields } from '@vocalstack/payload'
import type { MigrateUpArgs } from '@payloadcms/db-postgres'
export async function up({ payload, req }: MigrateUpArgs) {
await migrateSpeakerFields({ collection: 'speakers', payload, req })
}
payload generate:importmap (the panel's component is now SpeakerField), and with Postgres or SQLite payload migrate:create for the new columns (the old ones are kept)./:id/vocalstack/speaker… replaces /:id/vocalstack/voice…; the old paths still answer. Answers carry vocalstackSpeaker (and vocalstackVoice as before).Translating an hour-long transcript takes a few minutes. The server does it in steps of about 20 seconds, each saved as it goes, and carries on after each response whenever the document is read or its progress is asked for, so an editor can close the page (and a translation started by a listener finishes on its own). A transcription has at most 10 languages besides its spoken one; asking for an 11th answers 409 language_limit_reached. A reading is rendered by VocalStack (a few languages at a time per transcription) and saved once ready. The reading keeps each sentence where it was said, unless the one before still runs, so a player can follow along with speech[lang].sentences (timedTokens() works on them as on the transcript).
Everything is asked for once and kept. The transcript (text, sentences, word times) and each translation are saved on the document. Translating again only asks for sentences that have none, and reads ones VocalStack already translated back from /transcript?lang= rather than translating them again. A finished reading's MP3 is downloaded once and saved as an upload in the vocalstack-readings collection (option readings), so listeners are served from your storage: GET …/vocalstack/audio redirects to that file, or for the spoken language to your own audio file, and only falls back to VocalStack while a reading isn't kept yet. Point your storage adapter at the readings collection, e.g. s3Storage({ collections: { 'vocalstack-readings': { prefix: 'readings', disablePayloadAccessControl: true } } }) for direct public URLs.
The readings collection. By default the plugin adds vocalstack-readings: public read, and create, update and delete for signed-in users. Change it with readings: { overrides: (collection) => ({ ...collection, access: { ... } }) }, or define an upload collection with that slug (or readings.slug) yourself; the plugin then uses yours as it is. It needs to accept audio/mpeg and to have text fields lang, transcriptionId and voice (readings kept before 0.9.0 are found by a recordingId field, where the collection has one).
With listeners: true, anyone who may read a document can ask for its transcript in another language, from your own site:
// What can be asked for: { languages: [{ code, name, native, translation, voice }], translation, voice }
await fetch('/api/vocalstack/languages')
// Ask (on an array row add ?field=&row= as for transcribing). Asked already: answers where it stands.
await fetch(`/api/sermons/${id}/vocalstack/listen`, { method: 'POST', body: JSON.stringify({ lang: 'pl' }) })
// Follow it: { state: 'translating' | 'ready' | 'failed' | 'none', done, total, voice, speech: { state, audio }, version }
await fetch(`/api/sermons/${id}/vocalstack/listen?lang=pl`)
The translation is saved on the document, and where VocalStack can read the language aloud, the reading follows (in the voice VocalStack picks) and its MP3 is kept in the readings collection. Once speech.state is ready, speech.audio is that file in your own storage. Nothing is made twice: a language someone already asked for is answered from the document. Visitors can only ask for languages VocalStack offers (narrowed by languages), within the 10-language limit, and each one (by IP address) can ask for perHour new languages an hour (10 by default); access: ({ lang, req }) => boolean adds your own check. The language list keeps working when VocalStack can't be reached: the plugin falls back to its last answer, or to the list it ships with.
Your site keeps working without VocalStack. Everything a listener reads or hears (the transcript, every translation, every reading's MP3 and word timings) is served from your database and storage. VocalStack is only needed to make something new.
When VocalStack does not answer (an outage, an upgrade), the endpoints say VocalStack is unavailable, try again shortly. instead of waiting.
How the audio reaches VocalStack. If the file has a public address, VocalStack fetches it (POST /v1/transcriptions { url }). Otherwise (localhost, a private network) the plugin uploads the bytes. If VocalStack's fetch of a public address fails because of the link (its server refuses VocalStack, as addresses signed for one viewer, IP address or region do; it answers with nothing; or it cannot be reached or found from VocalStack: job errorCode link_refused, link_empty, link_unreachable or link_not_found), the plugin reads the file itself and uploads the bytes in a new job, once. The job's own reason is shown only when that fails too. Either way the job runs on VocalStack, and the admin polls every 3 s. The connected workspace is billed per second, with a 5-minute minimum per transcription.
A VocalStack API key belongs to one workspace: what the site transcribes is kept in that workspace and uses its credit. Settings → VocalStack shows it under Workspace, with its name and its mark as the VocalStack Dashboard draws it (its own icon; a person for the personal workspace; otherwise its initials on its colour). The name and icon are read from GET /v1/me whenever the connection is checked (at most once a minute), so a rename or a new icon in VocalStack shows up here, and a pasted key or a key from the plugin config shows its workspace too. GET /api/vocalstack/connection answers { connected, source, account, workspace: { id, name, personal, iconUrl } }, with iconUrl an absolute link the browser can load as it is.
A key never moves to another workspace. With oneClickConnect, Change next to the workspace runs the connect flow again: pick another workspace on VocalStack's consent screen and click Authenticate, and the site swaps to the new key. Cancelling, in VocalStack or with Cancel in the admin, leaves the connection as it was. Connecting again makes a new key; the old one keeps working until it is revoked in VocalStack under Developers → API keys. Without oneClickConnect, disconnect and paste a key made in the other workspace. A key from the plugin config is changed there.
Transcripts stay in the workspace that made them. After a change, the transcripts, translations and readings already saved on your documents are still there and still served, but asking VocalStack for more of one made in the old workspace (another language, a reading, a speaker's sample) answers This transcript is not in the connected VocalStack workspace…; transcribe the file again to work with it in the new workspace. A transcription that was still running when the workspace changed ends as failed with the same sentence.
The alternative to pasting a key: Connect VocalStack opens the dashboard in a new tab, the person chooses a workspace and clicks Authenticate, and the tab closes. Change runs the same flow while connected; the stored key is replaced only once the new one has been issued. While connected, the link also carries workspace=<id> (the workspace of the key in use), so the consent screen starts on that workspace; it is left out when the workspace cannot be told. This is OAuth 2.0 authorization code + PKCE (RFC 7636) with an API key as the access token. There is no client registration: the consent screen shows the redirect_uri host instead.
CMS admin CMS server app.vocalstack.com / api.vocalstack.com
────────── ────────── ───────────────────────────────────────
click Connect ── POST /api/vocalstack/connect ─▶ state, verifier (10 min)
◀──────────── { url } ──────────────
new tab ─▶ GET app/connect?response_type=code&client_name=…&redirect_uri=…&state=…
&code_challenge=…&code_challenge_method=S256&scope=read write
(sign in if needed; pick the workspace; "example.com wants to transcribe with VocalStack")
click Authenticate ─▶ API stores a single-use grant (code hash, challenge, redirect, scopes, principal; 2 min)
◀── 302 redirect_uri?code=…&state=…
tab ─────── GET /api/vocalstack/callback ─▶ check state (+ admin session)
POST api/v1/connect/token (form) ─▶ grant_type=authorization_code, code,
code_verifier, redirect_uri
verify, burn the code, create the key
◀── { access_token: "vs_key_…", token_type: "api_key", key_id, account: { name },
workspace: { id, name, personal, iconUrl } }
stores the key (never sent to a browser)
tab: "Connected", BroadcastChannel('vocalstack') ─▶ admin refreshes; tab closes
Cancel redirects with ?error=access_denied&state=…; DELETE /api/vocalstack/connect drops a pending connect from the admin side. The key appears in the dashboard's API keys list as example.com (Payload CMS), where it can be revoked.
Bump version in package.json and push to main. The publish workflow runs the tests (pnpm test: a build, then node --test over test/; then e2e/run.sh, the plugin in a basic Payload project in a browser, on a fake VocalStack: see e2e/README.md), publishes that version to npm (trusted publishing, with provenance), tags v<version> and creates the GitHub release. A version npm already has is skipped. A prerelease (0.5.0-beta.1) goes to the next dist-tag. Nobody publishes from a laptop.
The test workflow runs the same two on every push and pull request, and on main runs the basic project against the real VocalStack too when the repository has a VOCALSTACK_API_KEY secret.
payload ai
AI text, image and voice generation for Payload fields and the Lexical editor with configurable providers
833.5k/wk568v3
payload ai manager
Generate product titles, descriptions, attributes and translations with Claude, ChatGPT, Gemini or Kimi
7022/wk1v3
payload plugin alt text generator
Generate SEO-friendly alt text for Payload media images one at a time, in bulk, or on upload
6115/wk0v3
payload agent
AI chat agent that queries and manages Payload content from Telegram, Slack, WhatsApp and other chat platforms
5774/wk17v3
payload ai plugin
AI assistant in the Payload admin with multiple providers, CMS mentions and signed action proposals
54301/wk4v3
writealt native cms
Bulk AI alt text generation for images in the Payload admin, with optional WebP or AVIF file optimization
350v?