@vocalstack/mcp 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/handlers.js +145 -11
- package/dist/tools.json +74 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,21 +61,21 @@ Both offer the same tools.
|
|
|
61
61
|
## Tools
|
|
62
62
|
|
|
63
63
|
<!-- tools -->
|
|
64
|
-
- `
|
|
64
|
+
- `create_transcription`: Start transcribing a finished recording, from a public link or a file sent inline; returns a transcriptionId at once, before any text.
|
|
65
65
|
- `get_transcription`: Read one transcription's status and text, with timestamps and speakers: as it was spoken or translated, at once or after waiting for it to finish.
|
|
66
66
|
- `list_transcriptions`: List this account's transcriptions, newest first, a page at a time: files, links and live ones, including those broadcasts recorded.
|
|
67
67
|
- `search_transcriptions`: Find what was said across this account's transcriptions, or in one: the lines with given words or a name (mode words), or the passages that answer a question (mode meaning).
|
|
68
68
|
- `get_summary`: Get the title and summary of a finished transcription, writing one the first time if it has none.
|
|
69
|
-
- `rename_speaker`: Name a speaker in one transcription, so its transcript shows the name instead of "Speaker N".
|
|
69
|
+
- `rename_speaker`: Name or rename a speaker: one person in one transcription, so its transcript shows the name instead of "Speaker N", or a saved speaker, everywhere they are recognised.
|
|
70
70
|
- `delete_transcription`: Move a transcription to the trash, with its recordings, transcript, translations and summary; its share links stop working.
|
|
71
|
-
- `
|
|
72
|
-
- `set_cloned_voices`: Turn cloned voices on or off for one transcription's spoken translations.
|
|
71
|
+
- `set_cloned_voices`: Turn cloned voices on or off for spoken translations: for one transcription, or for one saved speaker everywhere they are recognised.
|
|
73
72
|
- `list_speakers`: List the speakers this account has saved: people recognised by name in every new transcription.
|
|
74
73
|
- `save_speaker`: Save one speaker of a transcription to the account's saved speakers, so later transcriptions recognise and name them; their own speech in this transcription is the sample.
|
|
75
74
|
- `delete_speaker`: Delete a saved speaker for good: their name, fingerprint, stored sample and any cloned voice are erased at once and cannot be restored.
|
|
76
75
|
- `list_broadcasts`: List this account's broadcasts, or get one in detail.
|
|
77
76
|
- `start_broadcast`: Start live transcription and translation of a stream playing now, on a public link listeners open in their own language.
|
|
78
77
|
- `stop_broadcast`: Stop the live transcription a broadcast is running, which also stops its billing.
|
|
78
|
+
- `delete_broadcast`: Move a broadcast to the trash: its public link and stream addresses stop working for listeners.
|
|
79
79
|
<!-- /tools -->
|
|
80
80
|
|
|
81
81
|
Errors come back as tool results with `isError` set and a body with `error` (a code such as `not_found`, `invalid_options`, `invalid_state`, `insufficient_credit` or `rate_limited`), `message`, `retryable`, `retryAfterS` and `topUpUrl` when credit is needed. Retry a start with the same `idempotencyKey` so nothing is made or billed twice.
|
package/dist/handlers.js
CHANGED
|
@@ -301,7 +301,7 @@ function decodeFile(a) {
|
|
|
301
301
|
throw new ToolError("invalid_audio", "the file is empty");
|
|
302
302
|
return bytes;
|
|
303
303
|
}
|
|
304
|
-
async function
|
|
304
|
+
async function createTranscription(a, ctx) {
|
|
305
305
|
const key = idempotencyKey(a);
|
|
306
306
|
const file = sourceOf(a);
|
|
307
307
|
const options = transcribeOptions(a);
|
|
@@ -488,7 +488,15 @@ async function getTranscription(a, ctx) {
|
|
|
488
488
|
t = await transcription(ctx, id);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
const
|
|
491
|
+
const status = statusOf(t);
|
|
492
|
+
try {
|
|
493
|
+
const links = await ctx.api.get(path("/v1/transcriptions/", id, "/share-links"), undefined, ctx.signal);
|
|
494
|
+
const first = links?.links?.[0];
|
|
495
|
+
if (first?.url)
|
|
496
|
+
status.shareUrl = first.url;
|
|
497
|
+
}
|
|
498
|
+
catch { }
|
|
499
|
+
const out = { status };
|
|
492
500
|
if (timedOut !== undefined)
|
|
493
501
|
out.timedOut = timedOut;
|
|
494
502
|
if (format === "none")
|
|
@@ -804,13 +812,49 @@ async function deleteTranscription(a, ctx) {
|
|
|
804
812
|
put(out, "restorableUntil", t.purgeAfter);
|
|
805
813
|
return out;
|
|
806
814
|
}
|
|
807
|
-
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
const
|
|
811
|
-
|
|
815
|
+
function renameTarget(a) {
|
|
816
|
+
const sid = present(a, "speakerId");
|
|
817
|
+
const tid = present(a, "transcriptionId");
|
|
818
|
+
const spk = present(a, "speaker");
|
|
819
|
+
if (sid && !tid && !spk)
|
|
820
|
+
return true;
|
|
821
|
+
if (!sid && tid && spk)
|
|
822
|
+
return false;
|
|
823
|
+
if (sid)
|
|
824
|
+
throw bad("give either `speakerId` (a saved speaker) or `transcriptionId` with `speaker`, not both");
|
|
825
|
+
if (tid)
|
|
826
|
+
throw bad("`speaker` is required with `transcriptionId`");
|
|
827
|
+
if (spk)
|
|
828
|
+
throw bad("`transcriptionId` is required with `speaker`");
|
|
829
|
+
throw bad("give `transcriptionId` with `speaker` (one transcription) or `speakerId` (a saved speaker)");
|
|
830
|
+
}
|
|
831
|
+
function noSavedSpeaker(e) {
|
|
832
|
+
if (e instanceof ToolError && (e.code === "not_found" || (e.code === "forbidden" && !e.details.requiredScope))) {
|
|
833
|
+
throw new ToolError("not_found", NO_SPEAKER);
|
|
834
|
+
}
|
|
835
|
+
throw e;
|
|
836
|
+
}
|
|
837
|
+
async function renameSavedSpeaker(a, ctx) {
|
|
838
|
+
const id = a.id("speakerId");
|
|
839
|
+
const given = a.raw.name;
|
|
840
|
+
if (typeof given !== "string")
|
|
841
|
+
throw bad("`name` must be a string");
|
|
842
|
+
const name = given.trim();
|
|
843
|
+
const n = [...name].length;
|
|
844
|
+
if (n === 0 || n > 60)
|
|
845
|
+
throw bad("a saved speaker's `name` must be 1 to 60 characters");
|
|
846
|
+
let s;
|
|
847
|
+
try {
|
|
848
|
+
s = (await ctx.api.request("PATCH", path("/v1/speakers/", id), { json: { name }, signal: ctx.signal })).data;
|
|
849
|
+
}
|
|
850
|
+
catch (e) {
|
|
851
|
+
noSavedSpeaker(e);
|
|
852
|
+
}
|
|
853
|
+
return { speakerId: s.id, name: s.name };
|
|
812
854
|
}
|
|
813
855
|
async function renameSpeaker(a, ctx) {
|
|
856
|
+
if (renameTarget(a))
|
|
857
|
+
return renameSavedSpeaker(a, ctx);
|
|
814
858
|
const id = a.id("transcriptionId");
|
|
815
859
|
const number = a.int("speaker", 1, 1, 1000);
|
|
816
860
|
const given = a.raw.name;
|
|
@@ -833,11 +877,83 @@ async function renameSpeaker(a, ctx) {
|
|
|
833
877
|
return { transcriptionId: id, speaker: number, name: name || null };
|
|
834
878
|
}
|
|
835
879
|
const VOICE_CLONING_NEEDS_CONSENT = "turning voiceCloning on needs voiceCloningConsent: true — confirm you have permission from everyone speaking";
|
|
836
|
-
|
|
837
|
-
const
|
|
880
|
+
function clonedVoicesTarget(a) {
|
|
881
|
+
const sid = present(a, "speakerId");
|
|
882
|
+
const tid = present(a, "transcriptionId");
|
|
883
|
+
if (sid && !tid)
|
|
884
|
+
return true;
|
|
885
|
+
if (tid && !sid)
|
|
886
|
+
return false;
|
|
887
|
+
if (sid)
|
|
888
|
+
throw bad("give either `transcriptionId` (one transcription) or `speakerId` (a saved speaker), not both");
|
|
889
|
+
throw bad("give `transcriptionId` (one transcription) or `speakerId` (a saved speaker)");
|
|
890
|
+
}
|
|
891
|
+
function onArg(a) {
|
|
838
892
|
const on = a.raw.on;
|
|
839
893
|
if (typeof on !== "boolean")
|
|
840
894
|
throw bad("`on` must be true or false");
|
|
895
|
+
return on;
|
|
896
|
+
}
|
|
897
|
+
async function savedSpeaker(ctx, id) {
|
|
898
|
+
try {
|
|
899
|
+
return await ctx.api.get(path("/v1/speakers/", id), undefined, ctx.signal);
|
|
900
|
+
}
|
|
901
|
+
catch (e) {
|
|
902
|
+
noSavedSpeaker(e);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
async function patchSpeaker(ctx, id, body) {
|
|
906
|
+
try {
|
|
907
|
+
await ctx.api.request("PATCH", path("/v1/speakers/", id), { json: body, signal: ctx.signal });
|
|
908
|
+
}
|
|
909
|
+
catch (e) {
|
|
910
|
+
noSavedSpeaker(e);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
async function setSpeakerClonedVoice(a, ctx) {
|
|
914
|
+
const id = a.id("speakerId");
|
|
915
|
+
const on = onArg(a);
|
|
916
|
+
const consent = a.bool("consent");
|
|
917
|
+
if (on && !consent) {
|
|
918
|
+
throw bad("Turning a saved speaker's cloned voice on needs consent: true, confirming that person agreed to have their voice cloned.");
|
|
919
|
+
}
|
|
920
|
+
const cur = await savedSpeaker(ctx, id);
|
|
921
|
+
if (on) {
|
|
922
|
+
if (cur.consent === "refused") {
|
|
923
|
+
throw new ToolError("invalid_state", "This speaker refused to be cloned and their audio was deleted; save them again from a transcription (save_speaker with consent) to clone them.");
|
|
924
|
+
}
|
|
925
|
+
let s;
|
|
926
|
+
try {
|
|
927
|
+
s = (await ctx.api.request("POST", path("/v1/speakers/", id, "/consent"), { json: { consent: "granted" }, signal: ctx.signal })).data;
|
|
928
|
+
}
|
|
929
|
+
catch (e) {
|
|
930
|
+
if (e instanceof ToolError && e.code === "invalid_state" && e.message.includes("no sample stored")) {
|
|
931
|
+
throw new ToolError("invalid_state", "This saved speaker has no stored sample to clone their voice from; save them again from a transcription (save_speaker with consent).");
|
|
932
|
+
}
|
|
933
|
+
noSavedSpeaker(e);
|
|
934
|
+
}
|
|
935
|
+
if (s?.voice && s.voice.enabled === false)
|
|
936
|
+
await patchSpeaker(ctx, id, { enabled: true });
|
|
937
|
+
}
|
|
938
|
+
else if (cur.voice?.enabled === true) {
|
|
939
|
+
await patchSpeaker(ctx, id, { enabled: false });
|
|
940
|
+
}
|
|
941
|
+
const s = await savedSpeaker(ctx, id);
|
|
942
|
+
const out = {
|
|
943
|
+
speakerId: s.id,
|
|
944
|
+
name: s.name,
|
|
945
|
+
consent: s.consent,
|
|
946
|
+
clonedVoice: s.voice?.enabled === true && s.consent === "granted",
|
|
947
|
+
};
|
|
948
|
+
if (s.voice)
|
|
949
|
+
put(out, "voiceState", s.voice.state);
|
|
950
|
+
return out;
|
|
951
|
+
}
|
|
952
|
+
async function setClonedVoices(a, ctx) {
|
|
953
|
+
if (clonedVoicesTarget(a))
|
|
954
|
+
return setSpeakerClonedVoice(a, ctx);
|
|
955
|
+
const id = a.id("transcriptionId");
|
|
956
|
+
const on = onArg(a);
|
|
841
957
|
const consent = a.bool("consent");
|
|
842
958
|
await transcription(ctx, id);
|
|
843
959
|
let t;
|
|
@@ -945,15 +1061,32 @@ async function stopBroadcast(a, ctx) {
|
|
|
945
1061
|
const after = await transcription(ctx, tid);
|
|
946
1062
|
return { ...liveStatus(after), broadcastId: b.id, link: b.shareUrl };
|
|
947
1063
|
}
|
|
1064
|
+
async function deleteBroadcast(a, ctx) {
|
|
1065
|
+
const id = a.id("broadcastId");
|
|
1066
|
+
await broadcast(ctx, id);
|
|
1067
|
+
let b;
|
|
1068
|
+
try {
|
|
1069
|
+
b = (await ctx.api.request("POST", path("/v1/broadcasts/", id, "/archive"), { signal: ctx.signal })).data;
|
|
1070
|
+
}
|
|
1071
|
+
catch (e) {
|
|
1072
|
+
if (e instanceof ToolError && e.code === "invalid_state" && e.message.includes("stop the recording first")) {
|
|
1073
|
+
throw new ToolError("invalid_state", "This broadcast is on air; stop it first (stop_broadcast), then delete it.", { broadcastId: id });
|
|
1074
|
+
}
|
|
1075
|
+
throw e;
|
|
1076
|
+
}
|
|
1077
|
+
const out = { broadcastId: b.id, name: b.name, deleted: true };
|
|
1078
|
+
put(out, "deletedAt", b.archivedAt);
|
|
1079
|
+
put(out, "restorableUntil", b.purgeAfter);
|
|
1080
|
+
return out;
|
|
1081
|
+
}
|
|
948
1082
|
export const handlers = {
|
|
949
|
-
|
|
1083
|
+
create_transcription: createTranscription,
|
|
950
1084
|
get_transcription: getTranscription,
|
|
951
1085
|
list_transcriptions: listTranscriptions,
|
|
952
1086
|
search_transcriptions: search,
|
|
953
1087
|
get_summary: summary,
|
|
954
1088
|
rename_speaker: renameSpeaker,
|
|
955
1089
|
delete_transcription: deleteTranscription,
|
|
956
|
-
restore_transcription: restoreTranscription,
|
|
957
1090
|
set_cloned_voices: setClonedVoices,
|
|
958
1091
|
list_speakers: speakers,
|
|
959
1092
|
save_speaker: saveSpeaker,
|
|
@@ -961,4 +1094,5 @@ export const handlers = {
|
|
|
961
1094
|
list_broadcasts: listBroadcasts,
|
|
962
1095
|
start_broadcast: startBroadcast,
|
|
963
1096
|
stop_broadcast: stopBroadcast,
|
|
1097
|
+
delete_broadcast: deleteBroadcast,
|
|
964
1098
|
};
|
package/dist/tools.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"instructions": "VocalStack transcribes and translates recorded or live audio and video in about 100 languages, with speaker labels.\nRecorded audio:
|
|
2
|
+
"instructions": "VocalStack transcribes and translates recorded or live audio and video in about 100 languages, with speaker labels.\nRecorded audio: create_transcription (a link or a file) returns a transcriptionId at once; get_transcription with waitS waits for it and reads the text, in any language with lang.\nFind: list_transcriptions (ids, newest first); search_transcriptions (mode words for words or names, meaning for a question).\nOne transcription: get_summary; rename_speaker; set_cloned_voices; delete_transcription (to the trash, restorable in the Dashboard).\nLive streams: start_broadcast, then get_transcription while it runs, stop_broadcast to end it; list_broadcasts shows them; delete_broadcast removes one.\nPeople: list_speakers, save_speaker (voice cloned only with the person's consent), rename_speaker, set_cloned_voices with speakerId, delete_speaker.\nOnly transcription is billed; everything else, and listening, is free. Retry a start with the same idempotencyKey.\nErrors are results with isError true: error, message, retryable, and retryAfterS or topUpUrl when they apply.",
|
|
3
3
|
"tools": [
|
|
4
4
|
{
|
|
5
|
-
"name": "
|
|
6
|
-
"title": "
|
|
5
|
+
"name": "create_transcription",
|
|
6
|
+
"title": "Create a transcription",
|
|
7
7
|
"description": "Start transcribing a finished recording, from a public link or a file sent inline; returns a transcriptionId at once, before any text.\nUse: audio or video that has ended (a file, podcast episode, YouTube video or public post). A stream playing now: start_broadcast. The result: get_transcription with waitS, no polling needed.\nList price: $0.20 an hour of audio, billed per second transcribed; Pay as you go bills at least 5 minutes per transcription. Each call is a new, billed transcription unless it repeats an idempotencyKey; a refused call costs nothing; summary and shareLink are free.\nNew transcriptions an hour per account: 10 on Pay as you go, 100 on Premium.\nTranscriptions running at once per account: 5 on Pay as you go, 50 on Premium; more wait their turn instead of failing.\nReturns: transcriptionId, state (queued, fetching, transcribing, then done, failed or stopped), progress, shareUrl when shareLink is true, replayed true for a repeated key.\nErrors: invalid_options (neither or both of url and fileBase64, not a public http(s) link, bad base64, too large), invalid_audio (empty file), idempotency_key_reused, insufficient_credit (with topUpUrl), quota_exceeded, rate_limited (with retryAfterS). A source that cannot be read ends in state failed, with error.",
|
|
8
8
|
"inputSchema": {
|
|
9
9
|
"additionalProperties": false,
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"type": "object"
|
|
102
102
|
},
|
|
103
103
|
"annotations": {
|
|
104
|
-
"title": "
|
|
104
|
+
"title": "Create a transcription",
|
|
105
105
|
"readOnlyHint": false,
|
|
106
106
|
"destructiveHint": false,
|
|
107
107
|
"idempotentHint": false,
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
{
|
|
112
112
|
"name": "get_transcription",
|
|
113
113
|
"title": "Read a transcription",
|
|
114
|
-
"description": "Read one transcription's status and text, with timestamps and speakers: as it was spoken or translated, at once or after waiting for it to finish.\nUse: after
|
|
114
|
+
"description": "Read one transcription's status and text, with timestamps and speakers: as it was spoken or translated, at once or after waiting for it to finish.\nUse: after create_transcription (waitS saves polling), or any time during a live transcription for the text so far. An overview: get_summary. Finding a passage: search_transcriptions.\nBehaviour: free. A wait ends as soon as the work does, and sends progress notifications when the client gives a progress token. lang needs a finished transcription; the first call in a new language can take up to a minute on a long one, later pages are quick. Page with offset = nextOffset.\nReturns: status (state, progress, error when failed, shareUrl when it has a public link: made with create_transcription's shareLink, or in the Dashboard), timedOut when waitS was set, then segmentCount, partial while text is still coming, text or segments, nextOffset when more remain, and lang and translated with lang. A wait that runs out with lang set returns the status only.\nErrors: not_found; invalid_state for lang before it is finished; invalid_options for an unsupported lang or includeWords with lang; rate_limited when waitS is set and 4 waits are already open for this key (8 for the account).",
|
|
115
115
|
"inputSchema": {
|
|
116
116
|
"additionalProperties": false,
|
|
117
117
|
"properties": {
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"type": "integer"
|
|
158
158
|
},
|
|
159
159
|
"transcriptionId": {
|
|
160
|
-
"description": "A transcriptionId from
|
|
160
|
+
"description": "A transcriptionId from create_transcription, list_transcriptions, search_transcriptions or start_broadcast.",
|
|
161
161
|
"examples": [
|
|
162
162
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
163
163
|
],
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
{
|
|
192
192
|
"name": "list_transcriptions",
|
|
193
193
|
"title": "List transcriptions",
|
|
194
|
-
"description": "List this account's transcriptions, newest first, a page at a time: files, links and live ones, including those broadcasts recorded.\nUse: to find a transcriptionId or see what exists. What was said: search_transcriptions. Broadcasts: list_broadcasts.\nBehaviour: free. lifecycle archived lists the trash, which
|
|
194
|
+
"description": "List this account's transcriptions, newest first, a page at a time: files, links and live ones, including those broadcasts recorded.\nUse: to find a transcriptionId or see what exists. What was said: search_transcriptions. Broadcasts: list_broadcasts.\nBehaviour: free. lifecycle archived lists the trash: deleted transcriptions, which the VocalStack Dashboard can restore for 30 days. A cursor this tool did not give out is refused.\nReturns: transcriptions (transcriptionId, name, createdAt, kind file or live, state, durationS and title when known, broadcastId for a broadcast's), and nextCursor while more remain. None: an empty list.\nErrors: invalid_options for an unknown cursor.",
|
|
195
195
|
"inputSchema": {
|
|
196
196
|
"additionalProperties": false,
|
|
197
197
|
"properties": {
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
"type": "string"
|
|
274
274
|
},
|
|
275
275
|
"transcriptionId": {
|
|
276
|
-
"description": "Search only this transcription (a transcriptionId from list_transcriptions or
|
|
276
|
+
"description": "Search only this transcription (a transcriptionId from list_transcriptions or create_transcription). Omit to search the whole account.",
|
|
277
277
|
"examples": [
|
|
278
278
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
279
279
|
],
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
{
|
|
298
298
|
"name": "get_summary",
|
|
299
299
|
"title": "Get a summary",
|
|
300
|
-
"description": "Get the title and summary of a finished transcription, writing one the first time if it has none.\nUse: for an overview. Full text, or the whole text in another language: get_transcription. A specific question: search_transcriptions with mode meaning.\nBehaviour: free. Writing a first summary needs the write scope and keeps it for later calls; reading an existing one needs read only.\nReturns: state ready with title and summary (and lang when translated); pending while it is written or the transcription still runs (call again in a few seconds); not_requested for recordings under a minute; unavailable when the transcription failed.\nErrors: not_found; forbidden when a summary must be written and the key is read-only.",
|
|
300
|
+
"description": "Get the title and summary of a finished transcription, writing one the first time if it has none.\nUse: for an overview. Full text, or the whole text in another language: get_transcription. A specific question: search_transcriptions with mode meaning.\nArguments: transcriptionId of a finished transcription (state done, or a stopped live one), from create_transcription, list_transcriptions or search_transcriptions. lang is optional, a language code such as fr: it translates only when the transcription was made with summary translations on and lang differs from the language the summary is in; otherwise the original comes back, without lang in the result.\nBehaviour: free. Writing a first summary needs the write scope and keeps it for later calls; reading an existing one needs read only.\nReturns: state ready with title and summary (and lang when translated); pending while it is written or the transcription still runs (call again in a few seconds); not_requested for recordings under a minute; unavailable when the transcription failed.\nErrors: not_found; forbidden when a summary must be written and the key is read-only.",
|
|
301
301
|
"inputSchema": {
|
|
302
302
|
"additionalProperties": false,
|
|
303
303
|
"properties": {
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"type": "string"
|
|
310
310
|
},
|
|
311
311
|
"transcriptionId": {
|
|
312
|
-
"description": "A transcriptionId from
|
|
312
|
+
"description": "A transcriptionId from create_transcription, list_transcriptions, search_transcriptions or start_broadcast.",
|
|
313
313
|
"examples": [
|
|
314
314
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
315
315
|
],
|
|
@@ -333,28 +333,37 @@
|
|
|
333
333
|
{
|
|
334
334
|
"name": "rename_speaker",
|
|
335
335
|
"title": "Rename a speaker",
|
|
336
|
-
"description": "Name a speaker in one transcription, so its transcript shows the name instead of \"Speaker N\".\nUse: labelling who spoke here. To recognise the person in later transcriptions too: save_speaker (it also names them here). Saved speakers: list_speakers.\nBehaviour: free; applies to that person in every recording of
|
|
336
|
+
"description": "Name or rename a speaker: one person in one transcription, so its transcript shows the name instead of \"Speaker N\", or a saved speaker, everywhere they are recognised.\nUse: labelling who spoke here, or correcting a saved speaker's name. To recognise the person in later transcriptions too: save_speaker (it also names them here). Saved speakers: list_speakers.\nArguments: give exactly one of transcriptionId with speaker (the number in \"Speaker 2\" from get_transcription, not a name or an id) or speakerId (from list_speakers). name is trimmed; in a transcription it is cut to 80 characters and an empty name undoes it; a saved speaker's name is 1 to 60 characters. Calling again replaces the name.\nBehaviour: free and reversible; in a transcription it applies to that person in every recording of it, and listeners following it live see it at once. The person's speaker number never changes. Renaming a saved speaker changes nothing else about them (fingerprint, consent, cloned voice).\nReturns: transcriptionId, speaker, name (null when cleared); or, with speakerId, speakerId and name.\nErrors: invalid_options for both or neither kind of target, or a saved speaker's name out of 1 to 60; not_found for an unknown transcription, speaker number or speakerId; forbidden for a read-only key.",
|
|
337
337
|
"inputSchema": {
|
|
338
338
|
"additionalProperties": false,
|
|
339
339
|
"properties": {
|
|
340
340
|
"name": {
|
|
341
|
-
"description": "The name to show instead of \"Speaker N\"
|
|
341
|
+
"description": "The name to show instead of \"Speaker N\", trimmed: 1 to 80 characters in one transcription (longer is cut; an empty string clears it back to \"Speaker N\"), 1 to 60 for a saved speaker (never empty).",
|
|
342
342
|
"examples": [
|
|
343
|
-
"Maria Lopez"
|
|
343
|
+
"Maria Lopez",
|
|
344
|
+
""
|
|
344
345
|
],
|
|
345
346
|
"maxLength": 80,
|
|
346
347
|
"type": "string"
|
|
347
348
|
},
|
|
348
349
|
"speaker": {
|
|
349
|
-
"description": "
|
|
350
|
+
"description": "With transcriptionId: the N of \"Speaker N\" in get_transcription's text, or speakerNumber in its segments; it stays the same after naming.",
|
|
350
351
|
"examples": [
|
|
351
352
|
2
|
|
352
353
|
],
|
|
353
354
|
"minimum": 1,
|
|
354
355
|
"type": "integer"
|
|
355
356
|
},
|
|
357
|
+
"speakerId": {
|
|
358
|
+
"description": "Instead of transcriptionId and speaker: a saved speaker's id (id in list_speakers, or speakerId from save_speaker), renamed everywhere they are recognised.",
|
|
359
|
+
"examples": [
|
|
360
|
+
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
361
|
+
],
|
|
362
|
+
"format": "uuid",
|
|
363
|
+
"type": "string"
|
|
364
|
+
},
|
|
356
365
|
"transcriptionId": {
|
|
357
|
-
"description": "
|
|
366
|
+
"description": "With speaker: the transcription the speaker is in (from create_transcription, list_transcriptions, search_transcriptions or start_broadcast). Leave out with speakerId.",
|
|
358
367
|
"examples": [
|
|
359
368
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
360
369
|
],
|
|
@@ -363,8 +372,6 @@
|
|
|
363
372
|
}
|
|
364
373
|
},
|
|
365
374
|
"required": [
|
|
366
|
-
"transcriptionId",
|
|
367
|
-
"speaker",
|
|
368
375
|
"name"
|
|
369
376
|
],
|
|
370
377
|
"type": "object"
|
|
@@ -380,12 +387,12 @@
|
|
|
380
387
|
{
|
|
381
388
|
"name": "delete_transcription",
|
|
382
389
|
"title": "Delete a transcription",
|
|
383
|
-
"description": "Move a transcription to the trash, with its recordings, transcript, translations and summary; its share links stop working.\nUse: to remove one.
|
|
390
|
+
"description": "Move a transcription to the trash, with its recordings, transcript, translations and summary; its share links stop working.\nUse: to remove one. For 30 days it can be restored unchanged from the trash in the VocalStack Dashboard (list_transcriptions with lifecycle archived lists it); after that it is erased for good. Saved speakers stay (delete_speaker). A broadcast itself: delete_broadcast.\nBehaviour: a file or link still being transcribed is stopped first and keeps its text so far, billed only for what was transcribed; restoring does not resume it. A live one must be stopped first (stop_broadcast).\nReturns: transcriptionId, name, deleted, deletedAt, restorableUntil.\nErrors: invalid_state while recording live or when locked; not_found; forbidden for a read-only key.",
|
|
384
391
|
"inputSchema": {
|
|
385
392
|
"additionalProperties": false,
|
|
386
393
|
"properties": {
|
|
387
394
|
"transcriptionId": {
|
|
388
|
-
"description": "A transcriptionId from list_transcriptions
|
|
395
|
+
"description": "A transcriptionId from list_transcriptions or create_transcription.",
|
|
389
396
|
"examples": [
|
|
390
397
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
391
398
|
],
|
|
@@ -406,53 +413,32 @@
|
|
|
406
413
|
"openWorldHint": false
|
|
407
414
|
}
|
|
408
415
|
},
|
|
409
|
-
{
|
|
410
|
-
"name": "restore_transcription",
|
|
411
|
-
"title": "Restore a transcription",
|
|
412
|
-
"description": "Bring a deleted transcription back from the trash, with its recordings, transcript, translations, summary and working share links.\nUse: undoing delete_transcription within 30 days; list_transcriptions with lifecycle archived lists the trash.\nBehaviour: free. A transcription stopped by its deletion stays stopped (transcribe it again to finish it).\nReturns: transcriptionId, name, restored true.\nErrors: not_found for an unknown id or one erased after its 30 days; forbidden for a read-only key.",
|
|
413
|
-
"inputSchema": {
|
|
414
|
-
"additionalProperties": false,
|
|
415
|
-
"properties": {
|
|
416
|
-
"transcriptionId": {
|
|
417
|
-
"description": "A transcriptionId from list_transcriptions (lifecycle archived lists the trash) or transcribe.",
|
|
418
|
-
"examples": [
|
|
419
|
-
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
420
|
-
],
|
|
421
|
-
"format": "uuid",
|
|
422
|
-
"type": "string"
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
"required": [
|
|
426
|
-
"transcriptionId"
|
|
427
|
-
],
|
|
428
|
-
"type": "object"
|
|
429
|
-
},
|
|
430
|
-
"annotations": {
|
|
431
|
-
"title": "Restore a transcription",
|
|
432
|
-
"readOnlyHint": false,
|
|
433
|
-
"destructiveHint": false,
|
|
434
|
-
"idempotentHint": true,
|
|
435
|
-
"openWorldHint": false
|
|
436
|
-
}
|
|
437
|
-
},
|
|
438
416
|
{
|
|
439
417
|
"name": "set_cloned_voices",
|
|
440
418
|
"title": "Turn cloned voices on or off",
|
|
441
|
-
"description": "Turn cloned voices on or off for one transcription
|
|
419
|
+
"description": "Turn cloned voices on or off for spoken translations: for one transcription, or for one saved speaker everywhere they are recognised.\nOn: the speaker's translated words are read in that speaker's own cloned voice, never anyone else's; a speaker without a usable clone gets a stock voice. Off: stock voices. Voices are chosen by VocalStack; this is the only voice choice.\nArguments: give exactly one of transcriptionId (every speaker in it) or speakerId (a saved speaker, from list_speakers). on is required; consent must be true to turn on.\nConsent: turning on records, with your account and the time, that everyone speaking (or that saved speaker) agreed. For a transcription it releases its clones waiting for consent; speakers who refused are never cloned. For a saved speaker saved without consent it starts their clone from their stored sample. Off keeps the saved speaker's fingerprint, consent and clone, only unused; to erase the clone and their samples: delete_speaker.\nBehaviour: free and reversible; lines read aloud after the change use the new setting.\nReturns: transcriptionId, name, clonedVoices; or, with speakerId, speakerId, name, consent, clonedVoice, and voiceState (training, then ready) when cloned.\nErrors: invalid_options for on without consent or both or neither target; invalid_state for a deleted transcription, a speaker who refused, or one with no stored sample to clone from; not_found; forbidden for a read-only key.",
|
|
442
420
|
"inputSchema": {
|
|
443
421
|
"additionalProperties": false,
|
|
444
422
|
"properties": {
|
|
445
423
|
"consent": {
|
|
446
424
|
"default": false,
|
|
447
|
-
"description": "Must be true to turn cloned voices on: confirms everyone speaking agreed to have their voice cloned. Recorded with your account and the time. Not needed to turn them off.",
|
|
425
|
+
"description": "Must be true to turn cloned voices on: confirms everyone speaking (with speakerId: that person) agreed to have their voice cloned. Recorded with your account and the time. Not needed to turn them off.",
|
|
448
426
|
"type": "boolean"
|
|
449
427
|
},
|
|
450
428
|
"on": {
|
|
451
|
-
"description": "true:
|
|
429
|
+
"description": "true: translations of the speaker's own words are read in their own cloned voice; false (the default for a transcription): stock voices.",
|
|
452
430
|
"type": "boolean"
|
|
453
431
|
},
|
|
432
|
+
"speakerId": {
|
|
433
|
+
"description": "Instead of transcriptionId, for one saved speaker everywhere they are recognised: id in list_speakers, or speakerId from save_speaker.",
|
|
434
|
+
"examples": [
|
|
435
|
+
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
436
|
+
],
|
|
437
|
+
"format": "uuid",
|
|
438
|
+
"type": "string"
|
|
439
|
+
},
|
|
454
440
|
"transcriptionId": {
|
|
455
|
-
"description": "
|
|
441
|
+
"description": "For one transcription's spoken translations: a transcriptionId from create_transcription, list_transcriptions, search_transcriptions or start_broadcast. Leave out with speakerId.",
|
|
456
442
|
"examples": [
|
|
457
443
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
458
444
|
],
|
|
@@ -461,7 +447,6 @@
|
|
|
461
447
|
}
|
|
462
448
|
},
|
|
463
449
|
"required": [
|
|
464
|
-
"transcriptionId",
|
|
465
450
|
"on"
|
|
466
451
|
],
|
|
467
452
|
"type": "object"
|
|
@@ -494,7 +479,7 @@
|
|
|
494
479
|
{
|
|
495
480
|
"name": "save_speaker",
|
|
496
481
|
"title": "Save a speaker",
|
|
497
|
-
"description": "Save one speaker of a transcription to the account's saved speakers, so later transcriptions recognise and name them; their own speech in this transcription is the sample.\nUse: remembering a person across transcriptions. This transcription only: rename_speaker. Who is saved: list_speakers. Remove: delete_speaker.\nBehaviour: free; also names them in this transcription. Each call saves a new speaker, so check list_speakers first. Without consent only a voice fingerprint is kept; with it the voice is cloned too, recorded with your account and the time.\nReturns: speakerId, name, consent (granted or pending), cloned, voiceState (training, then ready) when cloned.\nErrors: not_found for an unknown transcription or speaker number; invalid_options for too little speech of them (the message says how much there is); forbidden for a read-only key.",
|
|
482
|
+
"description": "Save one speaker of a transcription to the account's saved speakers, so later transcriptions recognise and name them; their own speech in this transcription is the sample.\nUse: remembering a person across transcriptions. This transcription only: rename_speaker. Who is saved: list_speakers. Remove: delete_speaker.\nArguments: transcriptionId and speaker point at one person: speaker is the number in \"Speaker 2\" from get_transcription, who must have spoken (a live transcription can still be running). name is 1 to 60 characters, trimmed; renaming later: rename_speaker with speakerId. consent is true only when that person agreed to be cloned; leaving it out or false keeps only their fingerprint.\nBehaviour: free; also names them in this transcription. Each call saves a new speaker, so check list_speakers first. Without consent only a voice fingerprint is kept; with it the voice is cloned too, recorded with your account and the time.\nReturns: speakerId, name, consent (granted or pending), cloned, voiceState (training, then ready) when cloned.\nErrors: not_found for an unknown transcription or speaker number; invalid_options for too little speech of them (the message says how much there is); forbidden for a read-only key.",
|
|
498
483
|
"inputSchema": {
|
|
499
484
|
"additionalProperties": false,
|
|
500
485
|
"properties": {
|
|
@@ -521,7 +506,7 @@
|
|
|
521
506
|
"type": "integer"
|
|
522
507
|
},
|
|
523
508
|
"transcriptionId": {
|
|
524
|
-
"description": "A transcriptionId from
|
|
509
|
+
"description": "A transcriptionId from create_transcription, list_transcriptions, search_transcriptions or start_broadcast.",
|
|
525
510
|
"examples": [
|
|
526
511
|
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
527
512
|
],
|
|
@@ -547,7 +532,7 @@
|
|
|
547
532
|
{
|
|
548
533
|
"name": "delete_speaker",
|
|
549
534
|
"title": "Delete a saved speaker",
|
|
550
|
-
"description": "Delete a saved speaker for good: their name, fingerprint, stored sample and any cloned voice are erased at once and cannot be restored.\nUse: the person should no longer be recognised, or asked for their voice to be removed. A name inside one transcription: rename_speaker.\nBehaviour: free. Transcripts keep every line they spoke; lines labelled with their saved name go back to \"Speaker N\".\nReturns: speakerId, deleted true.\nErrors: not_found for an unknown or already deleted id; forbidden for a read-only key.",
|
|
535
|
+
"description": "Delete a saved speaker for good: their name, fingerprint, stored sample and any cloned voice are erased at once and cannot be restored.\nUse: the person should no longer be recognised, or asked for their voice to be removed. A name inside one transcription: rename_speaker.\nArguments: speakerId is a saved speaker's id, the id field of list_speakers or the speakerId save_speaker returned; not a speaker number (\"Speaker 2\") and not a transcriptionId. To unname someone in one transcription instead: rename_speaker with an empty name.\nBehaviour: free. Transcripts keep every line they spoke; lines labelled with their saved name go back to \"Speaker N\".\nReturns: speakerId, deleted true.\nErrors: not_found for an unknown or already deleted id; forbidden for a read-only key.",
|
|
551
536
|
"inputSchema": {
|
|
552
537
|
"additionalProperties": false,
|
|
553
538
|
"properties": {
|
|
@@ -576,7 +561,7 @@
|
|
|
576
561
|
{
|
|
577
562
|
"name": "list_broadcasts",
|
|
578
563
|
"title": "List broadcasts",
|
|
579
|
-
"description": "List this account's broadcasts, or get one in detail. A broadcast is a public link where listeners follow a live transcription in their own language.\nUse: to find a broadcastId for start_broadcast or
|
|
564
|
+
"description": "List this account's broadcasts, or get one in detail. A broadcast is a public link where listeners follow a live transcription in their own language.\nUse: to find a broadcastId for start_broadcast, stop_broadcast or delete_broadcast, see which are on air, or (with broadcastId) a broadcast's recorded transcriptions and streams. Text: get_transcription; they also appear in list_transcriptions.\nBehaviour: free; most recently updated first, up to 500 per lifecycle, no paging.\nReturns: broadcasts (broadcastId, name, link, access, onAir, listenersNow, lastRecordedAt once it has recorded, archived for one in the trash; while on air transcriptionId, state, onAirSince). With broadcastId, one item that adds transcriptions (up to 20: transcriptionId, name, recording, lastRecordedAt) and streams (name, url). None: an empty list.\nErrors: not_found for an unknown broadcastId.",
|
|
580
565
|
"inputSchema": {
|
|
581
566
|
"additionalProperties": false,
|
|
582
567
|
"properties": {
|
|
@@ -611,7 +596,7 @@
|
|
|
611
596
|
{
|
|
612
597
|
"name": "start_broadcast",
|
|
613
598
|
"title": "Start a broadcast",
|
|
614
|
-
"description": "Start live transcription and translation of a stream playing now, on a public link listeners open in their own language.\nUse: a
|
|
599
|
+
"description": "Start live transcription and translation of a stream playing now, on a public link listeners open in their own language.\nUse: a stream playing now. A recording that has ended: create_transcription. Reading it while it runs: get_transcription.\nArguments: streamUrl must be live when called; the same streamUrl on the same broadcast reuses its stream. broadcastId (from list_broadcasts) reruns an existing broadcast on its old link, and then name is ignored; without it a new broadcast is made, named name or the stream's host. spokenLanguage is a code like en (omit to detect). spokenTranslations true adds audio of each translation. idempotencyKey: any string you choose, reused only to retry this same call.\nList price: $0.60 an hour while it runs, billed per second; Pay as you go bills at least 5 minutes per transcription. Listeners and translations are free. It runs until stop_broadcast or the stream ends.\nTranscriptions running at once per account: 5 on Pay as you go, 50 on Premium; past that a start is refused with quota_exceeded.\nBehaviour: each call starts a new run unless it repeats an idempotencyKey; omitting broadcastId makes a new broadcast with a new link.\nReturns: broadcastId, name, link (anyone who opens it reads, or with spokenTranslations also hears, the stream in their language), transcriptionId, state.\nErrors: invalid_state (with link) when already on air, invalid_options for a non-http(s) address, insufficient_credit (with topUpUrl), quota_exceeded, not_found for an unknown broadcastId, forbidden for a key without the write and recordings:publish scopes.",
|
|
615
600
|
"inputSchema": {
|
|
616
601
|
"additionalProperties": false,
|
|
617
602
|
"properties": {
|
|
@@ -652,7 +637,7 @@
|
|
|
652
637
|
"type": "boolean"
|
|
653
638
|
},
|
|
654
639
|
"streamUrl": {
|
|
655
|
-
"description": "http(s) address of a stream playing now: a YouTube live, an internet radio station, an HLS (.m3u8) or Icecast stream. A recording that has ended goes to
|
|
640
|
+
"description": "http(s) address of a stream playing now: a YouTube live, an internet radio station, an HLS (.m3u8) or Icecast stream. A recording that has ended goes to create_transcription instead.",
|
|
656
641
|
"examples": [
|
|
657
642
|
"https://www.youtube.com/watch?v=jfKfPfyJRdk",
|
|
658
643
|
"https://stream.example.org/radio.m3u8"
|
|
@@ -678,7 +663,7 @@
|
|
|
678
663
|
{
|
|
679
664
|
"name": "stop_broadcast",
|
|
680
665
|
"title": "Stop a broadcast",
|
|
681
|
-
"description": "Stop the live transcription a broadcast is running, which also stops its billing.\nUse: when the event is over. To remove the transcript afterwards: delete_transcription.\nBehaviour: free. The transcript is kept (get_transcription and get_summary work on it once state is done); the broadcastId and its link stay, ready for the next start_broadcast.\nReturns: the stopped transcription's status (transcriptionId, name, kind live, state finishing then done, startedAt, endedAt, durationS) with broadcastId and link.\nErrors: invalid_state when not on air, not_found for an unknown broadcastId, forbidden for a key without the recordings:publish scope.",
|
|
666
|
+
"description": "Stop the live transcription a broadcast is running, which also stops its billing.\nUse: when the event is over. To remove the transcript afterwards: delete_transcription; the broadcast and its link: delete_broadcast.\nArguments: broadcastId of a broadcast on air: from start_broadcast's result, or list_broadcasts (onAir true); not the transcriptionId. A second call is refused with invalid_state and changes nothing, so a retry is safe.\nBehaviour: free. The transcript is kept (get_transcription and get_summary work on it once state is done); the broadcastId and its link stay, ready for the next start_broadcast.\nReturns: the stopped transcription's status (transcriptionId, name, kind live, state finishing then done, startedAt, endedAt, durationS) with broadcastId and link.\nErrors: invalid_state when not on air, not_found for an unknown broadcastId, forbidden for a key without the recordings:publish scope.",
|
|
682
667
|
"inputSchema": {
|
|
683
668
|
"additionalProperties": false,
|
|
684
669
|
"properties": {
|
|
@@ -703,6 +688,35 @@
|
|
|
703
688
|
"idempotentHint": true,
|
|
704
689
|
"openWorldHint": false
|
|
705
690
|
}
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"name": "delete_broadcast",
|
|
694
|
+
"title": "Delete a broadcast",
|
|
695
|
+
"description": "Move a broadcast to the trash: its public link and stream addresses stop working for listeners.\nUse: a broadcast that will not run again. For 30 days it can be restored from the trash in the VocalStack Dashboard (list_broadcasts with lifecycle archived lists it); after that the broadcast is erased for good. Ending a live run: stop_broadcast.\nArguments: broadcastId from list_broadcasts or start_broadcast; not a transcriptionId.\nBehaviour: free. A broadcast on air is refused: stop it first (stop_broadcast). The transcriptions it recorded are not deleted: while it is in the trash they leave list_transcriptions with it, get_transcription still reads them by id, and delete_transcription deletes one. Deleting again changes nothing.\nReturns: broadcastId, name, deleted true, deletedAt, restorableUntil.\nErrors: invalid_state while on air; not_found for an unknown broadcastId; forbidden for a read-only key.",
|
|
696
|
+
"inputSchema": {
|
|
697
|
+
"additionalProperties": false,
|
|
698
|
+
"properties": {
|
|
699
|
+
"broadcastId": {
|
|
700
|
+
"description": "A broadcastId from list_broadcasts or start_broadcast, of a broadcast that is not on air.",
|
|
701
|
+
"examples": [
|
|
702
|
+
"0190f0e0-7c1a-7d3e-9b2a-5f4e3d2c1b0a"
|
|
703
|
+
],
|
|
704
|
+
"format": "uuid",
|
|
705
|
+
"type": "string"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"required": [
|
|
709
|
+
"broadcastId"
|
|
710
|
+
],
|
|
711
|
+
"type": "object"
|
|
712
|
+
},
|
|
713
|
+
"annotations": {
|
|
714
|
+
"title": "Delete a broadcast",
|
|
715
|
+
"readOnlyHint": false,
|
|
716
|
+
"destructiveHint": true,
|
|
717
|
+
"idempotentHint": true,
|
|
718
|
+
"openWorldHint": false
|
|
719
|
+
}
|
|
706
720
|
}
|
|
707
721
|
]
|
|
708
722
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocalstack/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "VocalStack's MCP server: transcribe, translate, search and summarize audio and video, and run live broadcasts, from any MCP client, on VocalStack's public API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|