mcp-speechmatics-transcribe 0.1.26 → 0.1.27
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 +3 -1
- package/modules/tools.js +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,9 @@ cancellation can stop its media-processing children.
|
|
|
55
55
|
Allow enough tool time for uploads and processing; the API timeout defaults to
|
|
56
56
|
900 seconds.
|
|
57
57
|
|
|
58
|
-
The transcribe tool requires an absolute file path
|
|
58
|
+
The transcribe tool requires an absolute file path on the server's operating system;
|
|
59
|
+
relative paths are rejected. Standalone CLI file arguments can still be relative
|
|
60
|
+
to the current working directory. It exposes transcription,
|
|
59
61
|
silence removal, and optional screenshot settings with their configured defaults.
|
|
60
62
|
Missing credentials are reported when the tool is called; tool discovery remains available.
|
|
61
63
|
|
package/modules/tools.js
CHANGED
|
@@ -7,13 +7,21 @@ import { tokenStatus } from "./token-status.js";
|
|
|
7
7
|
|
|
8
8
|
export const description = "Transcribe local audio and video files through the Speechmatics Batch API.";
|
|
9
9
|
|
|
10
|
+
export function absoluteFileSchema(platform = process.platform) {
|
|
11
|
+
const pattern = platform === "win32"
|
|
12
|
+
? /^(?:[A-Za-z]:[\\/]|[\\/]{2}[^\\/]+[\\/][^\\/]+(?:[\\/]|$))/
|
|
13
|
+
: /^\//;
|
|
14
|
+
return z.string().min(1).regex(pattern, "file must be an absolute path on the server's operating system.")
|
|
15
|
+
.describe("Absolute path to a local audio or video file on the server. Relative paths are rejected; Windows paths require a drive or UNC share.");
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
export function createTools(configuredDefaults) {
|
|
11
19
|
return {
|
|
12
20
|
transcribe: {
|
|
13
21
|
definition: {
|
|
14
22
|
description: `${description} Silence removal is enabled by default for every format. Optional adaptive video screenshots can help create illustrated notes. JSON, Markdown, subtitles, and PNG names use original recording timestamps. FFmpeg and screenshots use shared npm libraries with a managed binary cache. Return paths to JSON, segments, WebVTT subtitles, Markdown, timeline, and optional frames.`,
|
|
15
23
|
inputSchema: z.strictObject({
|
|
16
|
-
file:
|
|
24
|
+
file: absoluteFileSchema(),
|
|
17
25
|
model: optionFields.model.optional().describe(`Configured default: ${configuredDefaults.model}. enhanced: highest accuracy for a selected language. standard: faster processing and archival transcription. melia-1: MULTILANGUAGE, language switching within recordings. oak-1: MULTILANGUAGE, healthcare recordings. Use language=multi for melia-1 and oak-1; neither supports audio events.`),
|
|
18
26
|
language: optionFields.language.optional().describe(`Configured default: ${configuredDefaults.language}. Language code such as pl or en for enhanced/standard. Use multi for MULTILANGUAGE models melia-1 and oak-1.`),
|
|
19
27
|
disableDiarization: z.boolean().optional().describe(`Configured speaker diarization: ${configuredDefaults.diarization === "none" ? "disabled" : "enabled"}. Set true to disable it. Omit or pass false to use the server setting.`),
|