@storyteller-platform/ghost-story 0.1.8 → 0.1.10

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/dist/cli/bin.cjs CHANGED
@@ -25,14 +25,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  var import_zli = require("@robingenz/zli");
26
26
  var import_cli_progress = require("cli-progress");
27
27
  var import_fs_extra = require("fs-extra");
28
- var import_zod = require("zod");
28
+ var import_v4 = require("zod/v4");
29
29
  var import_constants = require("../constants.cjs");
30
30
  var import_config = require("./config.cjs");
31
31
  var import_install = require("./install.cjs");
32
32
  var import_whisper_server = require("./whisper-server.cjs");
33
- const recognitionEngineSchema = import_zod.z.enum(import_constants.RECOGNITION_ENGINES);
34
- const whisperModelSchema = import_zod.z.enum(import_constants.WHISPER_MODELS);
35
- const buildVariantSchema = import_zod.z.enum(import_constants.BUILD_VARIANTS);
33
+ const recognitionEngineSchema = import_v4.z.enum(import_constants.RECOGNITION_ENGINES);
34
+ const whisperModelSchema = import_v4.z.enum(import_constants.WHISPER_MODELS);
35
+ const buildVariantSchema = import_v4.z.enum(import_constants.BUILD_VARIANTS);
36
36
  function isInstallTarget(value) {
37
37
  return ["binary", "model", "vad", "all"].includes(value);
38
38
  }
@@ -44,19 +44,19 @@ Usage:
44
44
  ghost-story install model <model> - Install a whisper model
45
45
  ghost-story install vad - Install Silero VAD model
46
46
  ghost-story install all - Install binary, all models, and VAD`,
47
- args: import_zod.z.union([
48
- import_zod.z.tuple([
49
- import_zod.z.enum(["binary", "model", "vad", "all"]).describe("What to install: binary, model, vad, or all")
47
+ args: import_v4.z.union([
48
+ import_v4.z.tuple([
49
+ import_v4.z.enum(["binary", "model", "vad", "all"]).describe("What to install: binary, model, vad, or all")
50
50
  ]),
51
- import_zod.z.tuple([
52
- import_zod.z.enum(["binary", "model", "vad", "all"]).describe("What to install: binary, model, vad, or all"),
53
- import_zod.z.string().optional().describe("Variant (for binary) or model name (for model)")
51
+ import_v4.z.tuple([
52
+ import_v4.z.enum(["binary", "model", "vad", "all"]).describe("What to install: binary, model, vad, or all"),
53
+ import_v4.z.string().optional().describe("Variant (for binary) or model name (for model)")
54
54
  ])
55
55
  ]),
56
56
  options: (0, import_zli.defineOptions)(
57
- import_zod.z.object({
58
- force: import_zod.z.boolean().default(false).describe("Force installation even if platform doesn't match"),
59
- list: import_zod.z.boolean().default(false).describe("List available variants or models")
57
+ import_v4.z.object({
58
+ force: import_v4.z.boolean().default(false).describe("Force installation even if platform doesn't match"),
59
+ list: import_v4.z.boolean().default(false).describe("List available variants or models")
60
60
  }),
61
61
  { f: "force", l: "list" }
62
62
  ),
@@ -156,8 +156,8 @@ const statusCommand = (0, import_zli.defineCommand)({
156
156
  });
157
157
  const transcribeCommand = (0, import_zli.defineCommand)({
158
158
  description: "Transcribe a single file with whisper.cpp",
159
- args: import_zod.z.tuple([import_zod.z.string().describe("Input audio file path")], {
160
- errorMap: (issue) => {
159
+ args: import_v4.z.tuple([import_v4.z.string().describe("Input audio file path")], {
160
+ error: (issue) => {
161
161
  if (issue.code === "too_small") {
162
162
  return {
163
163
  message: "Input audio file path is required"
@@ -169,23 +169,23 @@ const transcribeCommand = (0, import_zli.defineCommand)({
169
169
  }
170
170
  }),
171
171
  options: (0, import_zli.defineOptions)(
172
- import_zod.z.object({
173
- output: import_zod.z.string().optional().describe("Output file path for transcription (JSON)"),
174
- language: import_zod.z.string().default("en-US").describe(
172
+ import_v4.z.object({
173
+ output: import_v4.z.string().optional().describe("Output file path for transcription (JSON)"),
174
+ language: import_v4.z.string().default("en-US").describe(
175
175
  "BCP 47 language tag representing the primary language of the audio (e.g. en-US)"
176
176
  ),
177
177
  engine: recognitionEngineSchema.default("whisper.cpp").describe("Speech-to-text engine"),
178
- model: import_zod.z.string().default("tiny.en").describe("Transcription model"),
179
- threads: import_zod.z.coerce.number().default(4).describe("Number of threads"),
180
- processors: import_zod.z.coerce.number().default(1).describe("Number of processors"),
181
- noProgress: import_zod.z.boolean().default(false).describe("Disable the progress bar"),
182
- noAutoInstall: import_zod.z.boolean().default(false).describe("Don't auto-install missing binary/model"),
183
- deepgramApiKey: import_zod.z.string().optional().describe("Deepgram API key"),
184
- googleApiKey: import_zod.z.string().optional().describe("Google Cloud API key"),
185
- amazonRegion: import_zod.z.string().optional().describe("AWS region code"),
186
- amazonBucketName: import_zod.z.string().optional().describe("The AWS s3 bucket to upload the provided audio to"),
187
- amazonAccessKeyId: import_zod.z.string().optional().describe("AWS access key ID"),
188
- amazonSecretAccessKey: import_zod.z.string().optional().describe("AWS secret access key")
178
+ model: import_v4.z.string().default("tiny.en").describe("Transcription model"),
179
+ threads: import_v4.z.coerce.number().default(4).describe("Number of threads"),
180
+ processors: import_v4.z.coerce.number().default(1).describe("Number of processors"),
181
+ noProgress: import_v4.z.boolean().default(false).describe("Disable the progress bar"),
182
+ noAutoInstall: import_v4.z.boolean().default(false).describe("Don't auto-install missing binary/model"),
183
+ deepgramApiKey: import_v4.z.string().optional().describe("Deepgram API key"),
184
+ googleApiKey: import_v4.z.string().optional().describe("Google Cloud API key"),
185
+ amazonRegion: import_v4.z.string().optional().describe("AWS region code"),
186
+ amazonBucketName: import_v4.z.string().optional().describe("The AWS s3 bucket to upload the provided audio to"),
187
+ amazonAccessKeyId: import_v4.z.string().optional().describe("AWS access key ID"),
188
+ amazonSecretAccessKey: import_v4.z.string().optional().describe("AWS secret access key")
189
189
  }),
190
190
  { m: "model", p: "processors", t: "threads" }
191
191
  ),
@@ -248,18 +248,18 @@ Transcription written to ${outputPath}`);
248
248
  const serverCommand = (0, import_zli.defineCommand)({
249
249
  description: "Start a whisper.cpp transcription server",
250
250
  options: (0, import_zli.defineOptions)(
251
- import_zod.z.object({
251
+ import_v4.z.object({
252
252
  model: whisperModelSchema.default("tiny.en").describe("Whisper model"),
253
- port: import_zod.z.coerce.number().default(8080).describe("Port to listen on"),
254
- host: import_zod.z.string().default("0.0.0.0").describe("Host to bind to"),
255
- threads: import_zod.z.coerce.number().default(4).describe("Number of threads"),
256
- processors: import_zod.z.coerce.number().default(1).describe("Number of processors"),
257
- noConvert: import_zod.z.boolean().default(false).describe("Disable automatic audio conversion"),
258
- noAutoInstall: import_zod.z.boolean().default(false).describe("Don't auto-install missing binary/model"),
253
+ port: import_v4.z.coerce.number().default(8080).describe("Port to listen on"),
254
+ host: import_v4.z.string().default("0.0.0.0").describe("Host to bind to"),
255
+ threads: import_v4.z.coerce.number().default(4).describe("Number of threads"),
256
+ processors: import_v4.z.coerce.number().default(1).describe("Number of processors"),
257
+ noConvert: import_v4.z.boolean().default(false).describe("Disable automatic audio conversion"),
258
+ noAutoInstall: import_v4.z.boolean().default(false).describe("Don't auto-install missing binary/model"),
259
259
  variant: buildVariantSchema.optional().describe("Use specific binary variant"),
260
- force: import_zod.z.boolean().default(false).describe("Force running even if platform doesn't match"),
261
- vadModel: import_zod.z.string().optional().describe("Path to VAD model for voice activity detection"),
262
- vadThreshold: import_zod.z.coerce.number().optional().describe("VAD threshold probability (0.0-1.0)")
260
+ force: import_v4.z.boolean().default(false).describe("Force running even if platform doesn't match"),
261
+ vadModel: import_v4.z.string().optional().describe("Path to VAD model for voice activity detection"),
262
+ vadThreshold: import_v4.z.coerce.number().optional().describe("VAD threshold probability (0.0-1.0)")
263
263
  }),
264
264
  { m: "model", p: "port", t: "threads", f: "force" }
265
265
  ),
@@ -293,8 +293,8 @@ const serverCommand = (0, import_zli.defineCommand)({
293
293
  });
294
294
  const vadCommand = (0, import_zli.defineCommand)({
295
295
  description: "Run voice activity detection on an audio file",
296
- args: import_zod.z.tuple([import_zod.z.string().describe("Input audio file path")], {
297
- errorMap: (issue) => {
296
+ args: import_v4.z.tuple([import_v4.z.string().describe("Input audio file path")], {
297
+ error: (issue) => {
298
298
  if (issue.code === "too_small") {
299
299
  return {
300
300
  message: "Input audio file path is required"
@@ -306,12 +306,12 @@ const vadCommand = (0, import_zli.defineCommand)({
306
306
  }
307
307
  }),
308
308
  options: (0, import_zli.defineOptions)(
309
- import_zod.z.object({
310
- output: import_zod.z.string().optional().describe("Output file path for VAD segments (JSON)"),
311
- threshold: import_zod.z.coerce.number().default(0.5).describe("Speech detection threshold (0.0-1.0)"),
312
- minSpeechDuration: import_zod.z.coerce.number().default(250).describe("Minimum speech duration in ms"),
313
- minSilenceDuration: import_zod.z.coerce.number().default(100).describe("Minimum silence duration in ms"),
314
- speechPad: import_zod.z.coerce.number().default(30).describe("Speech padding in ms")
309
+ import_v4.z.object({
310
+ output: import_v4.z.string().optional().describe("Output file path for VAD segments (JSON)"),
311
+ threshold: import_v4.z.coerce.number().default(0.5).describe("Speech detection threshold (0.0-1.0)"),
312
+ minSpeechDuration: import_v4.z.coerce.number().default(250).describe("Minimum speech duration in ms"),
313
+ minSilenceDuration: import_v4.z.coerce.number().default(100).describe("Minimum silence duration in ms"),
314
+ speechPad: import_v4.z.coerce.number().default(30).describe("Speech padding in ms")
315
315
  }),
316
316
  { o: "output" }
317
317
  ),
package/dist/cli/bin.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "@robingenz/zli";
8
8
  import { Presets, SingleBar } from "cli-progress";
9
9
  import { ensureDirSync } from "fs-extra";
10
- import { z } from "zod";
10
+ import { z } from "zod/v4";
11
11
  import {
12
12
  BUILD_VARIANTS,
13
13
  RECOGNITION_ENGINES,
@@ -157,7 +157,7 @@ const statusCommand = defineCommand({
157
157
  const transcribeCommand = defineCommand({
158
158
  description: "Transcribe a single file with whisper.cpp",
159
159
  args: z.tuple([z.string().describe("Input audio file path")], {
160
- errorMap: (issue) => {
160
+ error: (issue) => {
161
161
  if (issue.code === "too_small") {
162
162
  return {
163
163
  message: "Input audio file path is required"
@@ -294,7 +294,7 @@ const serverCommand = defineCommand({
294
294
  const vadCommand = defineCommand({
295
295
  description: "Run voice activity detection on an audio file",
296
296
  args: z.tuple([z.string().describe("Input audio file path")], {
297
- errorMap: (issue) => {
297
+ error: (issue) => {
298
298
  if (issue.code === "too_small") {
299
299
  return {
300
300
  message: "Input audio file path is required"
@@ -48,15 +48,65 @@ declare function resolveVariant(requestedVariant?: BuildVariant): BuildVariant;
48
48
  declare function isValidModel(model: string): model is WhisperModel;
49
49
  declare function isValidVariant(variant: string): variant is BuildVariant;
50
50
  declare const cliConfigSchema: z.ZodObject<{
51
- lastUsedModel: z.ZodNullable<z.ZodEnum<["tiny", "tiny.en", "tiny-q5_1", "tiny.en-q5_1", "tiny-q8_0", "base", "base.en", "base-q5_1", "base.en-q5_1", "base-q8_0", "small", "small.en", "small-q5_1", "small.en-q5_1", "small-q8_0", "medium", "medium.en", "medium-q5_0", "medium.en-q5_0", "medium-q8_0", "large-v1", "large-v2", "large-v2-q5_0", "large-v2-q8_0", "large-v3", "large-v3-q5_0", "large-v3-turbo", "large-v3-turbo-q5_0", "large-v3-turbo-q8_0"]>>;
52
- installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-cuda-13.1.0-legacy", "linux-x64-cuda-12.9.0-legacy", "linux-x64-cuda-11.8.0-legacy", "linux-x64-sycl-legacy", "linux-x64-vulkan-legacy", "linux-x64-rocm-legacy", "linux-x64-blas-legacy", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
53
- }, "strip", z.ZodTypeAny, {
54
- lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
55
- installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-cuda-13.1.0-legacy" | "linux-x64-cuda-12.9.0-legacy" | "linux-x64-cuda-11.8.0-legacy" | "linux-x64-sycl-legacy" | "linux-x64-vulkan-legacy" | "linux-x64-rocm-legacy" | "linux-x64-blas-legacy" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
56
- }, {
57
- lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
58
- installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-cuda-13.1.0-legacy" | "linux-x64-cuda-12.9.0-legacy" | "linux-x64-cuda-11.8.0-legacy" | "linux-x64-sycl-legacy" | "linux-x64-vulkan-legacy" | "linux-x64-rocm-legacy" | "linux-x64-blas-legacy" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
59
- }>;
51
+ lastUsedModel: z.ZodNullable<z.ZodEnum<{
52
+ tiny: "tiny";
53
+ "tiny.en": "tiny.en";
54
+ "tiny-q5_1": "tiny-q5_1";
55
+ "tiny.en-q5_1": "tiny.en-q5_1";
56
+ "tiny-q8_0": "tiny-q8_0";
57
+ base: "base";
58
+ "base.en": "base.en";
59
+ "base-q5_1": "base-q5_1";
60
+ "base.en-q5_1": "base.en-q5_1";
61
+ "base-q8_0": "base-q8_0";
62
+ small: "small";
63
+ "small.en": "small.en";
64
+ "small-q5_1": "small-q5_1";
65
+ "small.en-q5_1": "small.en-q5_1";
66
+ "small-q8_0": "small-q8_0";
67
+ medium: "medium";
68
+ "medium.en": "medium.en";
69
+ "medium-q5_0": "medium-q5_0";
70
+ "medium.en-q5_0": "medium.en-q5_0";
71
+ "medium-q8_0": "medium-q8_0";
72
+ "large-v1": "large-v1";
73
+ "large-v2": "large-v2";
74
+ "large-v2-q5_0": "large-v2-q5_0";
75
+ "large-v2-q8_0": "large-v2-q8_0";
76
+ "large-v3": "large-v3";
77
+ "large-v3-q5_0": "large-v3-q5_0";
78
+ "large-v3-turbo": "large-v3-turbo";
79
+ "large-v3-turbo-q5_0": "large-v3-turbo-q5_0";
80
+ "large-v3-turbo-q8_0": "large-v3-turbo-q8_0";
81
+ }>>;
82
+ installedVariant: z.ZodNullable<z.ZodEnum<{
83
+ "darwin-arm64-coreml": "darwin-arm64-coreml";
84
+ "darwin-arm64-cpu": "darwin-arm64-cpu";
85
+ "darwin-x64-cpu": "darwin-x64-cpu";
86
+ "linux-x64-blas": "linux-x64-blas";
87
+ "linux-x64-cpu": "linux-x64-cpu";
88
+ "linux-x64-cuda-13.1.0": "linux-x64-cuda-13.1.0";
89
+ "linux-x64-cuda-12.9.0": "linux-x64-cuda-12.9.0";
90
+ "linux-x64-cuda-11.8.0": "linux-x64-cuda-11.8.0";
91
+ "linux-x64-sycl": "linux-x64-sycl";
92
+ "linux-x64-vulkan": "linux-x64-vulkan";
93
+ "linux-x64-rocm": "linux-x64-rocm";
94
+ "linux-x64-cuda-13.1.0-legacy": "linux-x64-cuda-13.1.0-legacy";
95
+ "linux-x64-cuda-12.9.0-legacy": "linux-x64-cuda-12.9.0-legacy";
96
+ "linux-x64-cuda-11.8.0-legacy": "linux-x64-cuda-11.8.0-legacy";
97
+ "linux-x64-sycl-legacy": "linux-x64-sycl-legacy";
98
+ "linux-x64-vulkan-legacy": "linux-x64-vulkan-legacy";
99
+ "linux-x64-rocm-legacy": "linux-x64-rocm-legacy";
100
+ "linux-x64-blas-legacy": "linux-x64-blas-legacy";
101
+ "linux-x64-cpu-legacy": "linux-x64-cpu-legacy";
102
+ "linux-arm64-cpu": "linux-arm64-cpu";
103
+ "windows-x64-cpu": "windows-x64-cpu";
104
+ "windows-x64-cuda-13.1.0": "windows-x64-cuda-13.1.0";
105
+ "windows-x64-cuda-12.9.0": "windows-x64-cuda-12.9.0";
106
+ "windows-x64-cuda-11.8.0": "windows-x64-cuda-11.8.0";
107
+ "windows-x64-vulkan": "windows-x64-vulkan";
108
+ }>>;
109
+ }, z.z.core.$strip>;
60
110
  /**
61
111
  * Only to be used by the CLI, not the API/programmatic use.
62
112
  * Mostly to remember the last used model and variant.
@@ -48,15 +48,65 @@ declare function resolveVariant(requestedVariant?: BuildVariant): BuildVariant;
48
48
  declare function isValidModel(model: string): model is WhisperModel;
49
49
  declare function isValidVariant(variant: string): variant is BuildVariant;
50
50
  declare const cliConfigSchema: z.ZodObject<{
51
- lastUsedModel: z.ZodNullable<z.ZodEnum<["tiny", "tiny.en", "tiny-q5_1", "tiny.en-q5_1", "tiny-q8_0", "base", "base.en", "base-q5_1", "base.en-q5_1", "base-q8_0", "small", "small.en", "small-q5_1", "small.en-q5_1", "small-q8_0", "medium", "medium.en", "medium-q5_0", "medium.en-q5_0", "medium-q8_0", "large-v1", "large-v2", "large-v2-q5_0", "large-v2-q8_0", "large-v3", "large-v3-q5_0", "large-v3-turbo", "large-v3-turbo-q5_0", "large-v3-turbo-q8_0"]>>;
52
- installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-cuda-13.1.0-legacy", "linux-x64-cuda-12.9.0-legacy", "linux-x64-cuda-11.8.0-legacy", "linux-x64-sycl-legacy", "linux-x64-vulkan-legacy", "linux-x64-rocm-legacy", "linux-x64-blas-legacy", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
53
- }, "strip", z.ZodTypeAny, {
54
- lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
55
- installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-cuda-13.1.0-legacy" | "linux-x64-cuda-12.9.0-legacy" | "linux-x64-cuda-11.8.0-legacy" | "linux-x64-sycl-legacy" | "linux-x64-vulkan-legacy" | "linux-x64-rocm-legacy" | "linux-x64-blas-legacy" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
56
- }, {
57
- lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
58
- installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-cuda-13.1.0-legacy" | "linux-x64-cuda-12.9.0-legacy" | "linux-x64-cuda-11.8.0-legacy" | "linux-x64-sycl-legacy" | "linux-x64-vulkan-legacy" | "linux-x64-rocm-legacy" | "linux-x64-blas-legacy" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
59
- }>;
51
+ lastUsedModel: z.ZodNullable<z.ZodEnum<{
52
+ tiny: "tiny";
53
+ "tiny.en": "tiny.en";
54
+ "tiny-q5_1": "tiny-q5_1";
55
+ "tiny.en-q5_1": "tiny.en-q5_1";
56
+ "tiny-q8_0": "tiny-q8_0";
57
+ base: "base";
58
+ "base.en": "base.en";
59
+ "base-q5_1": "base-q5_1";
60
+ "base.en-q5_1": "base.en-q5_1";
61
+ "base-q8_0": "base-q8_0";
62
+ small: "small";
63
+ "small.en": "small.en";
64
+ "small-q5_1": "small-q5_1";
65
+ "small.en-q5_1": "small.en-q5_1";
66
+ "small-q8_0": "small-q8_0";
67
+ medium: "medium";
68
+ "medium.en": "medium.en";
69
+ "medium-q5_0": "medium-q5_0";
70
+ "medium.en-q5_0": "medium.en-q5_0";
71
+ "medium-q8_0": "medium-q8_0";
72
+ "large-v1": "large-v1";
73
+ "large-v2": "large-v2";
74
+ "large-v2-q5_0": "large-v2-q5_0";
75
+ "large-v2-q8_0": "large-v2-q8_0";
76
+ "large-v3": "large-v3";
77
+ "large-v3-q5_0": "large-v3-q5_0";
78
+ "large-v3-turbo": "large-v3-turbo";
79
+ "large-v3-turbo-q5_0": "large-v3-turbo-q5_0";
80
+ "large-v3-turbo-q8_0": "large-v3-turbo-q8_0";
81
+ }>>;
82
+ installedVariant: z.ZodNullable<z.ZodEnum<{
83
+ "darwin-arm64-coreml": "darwin-arm64-coreml";
84
+ "darwin-arm64-cpu": "darwin-arm64-cpu";
85
+ "darwin-x64-cpu": "darwin-x64-cpu";
86
+ "linux-x64-blas": "linux-x64-blas";
87
+ "linux-x64-cpu": "linux-x64-cpu";
88
+ "linux-x64-cuda-13.1.0": "linux-x64-cuda-13.1.0";
89
+ "linux-x64-cuda-12.9.0": "linux-x64-cuda-12.9.0";
90
+ "linux-x64-cuda-11.8.0": "linux-x64-cuda-11.8.0";
91
+ "linux-x64-sycl": "linux-x64-sycl";
92
+ "linux-x64-vulkan": "linux-x64-vulkan";
93
+ "linux-x64-rocm": "linux-x64-rocm";
94
+ "linux-x64-cuda-13.1.0-legacy": "linux-x64-cuda-13.1.0-legacy";
95
+ "linux-x64-cuda-12.9.0-legacy": "linux-x64-cuda-12.9.0-legacy";
96
+ "linux-x64-cuda-11.8.0-legacy": "linux-x64-cuda-11.8.0-legacy";
97
+ "linux-x64-sycl-legacy": "linux-x64-sycl-legacy";
98
+ "linux-x64-vulkan-legacy": "linux-x64-vulkan-legacy";
99
+ "linux-x64-rocm-legacy": "linux-x64-rocm-legacy";
100
+ "linux-x64-blas-legacy": "linux-x64-blas-legacy";
101
+ "linux-x64-cpu-legacy": "linux-x64-cpu-legacy";
102
+ "linux-arm64-cpu": "linux-arm64-cpu";
103
+ "windows-x64-cpu": "windows-x64-cpu";
104
+ "windows-x64-cuda-13.1.0": "windows-x64-cuda-13.1.0";
105
+ "windows-x64-cuda-12.9.0": "windows-x64-cuda-12.9.0";
106
+ "windows-x64-cuda-11.8.0": "windows-x64-cuda-11.8.0";
107
+ "windows-x64-vulkan": "windows-x64-vulkan";
108
+ }>>;
109
+ }, z.z.core.$strip>;
60
110
  /**
61
111
  * Only to be used by the CLI, not the API/programmatic use.
62
112
  * Mostly to remember the last used model and variant.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyteller-platform/ghost-story",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "An easy-to-use speech toolset. Fork of the original echogarden project.",
5
5
  "author": "Thomas F. K. Jorna",
6
6
  "license": "GPL-3.0",
@@ -56,6 +56,10 @@
56
56
  "./vad": {
57
57
  "types": "./dist/api/VoiceActivityDetection.d.ts",
58
58
  "default": "./dist/api/VoiceActivityDetection.js"
59
+ },
60
+ "./constants": {
61
+ "types": "./dist/constants.d.ts",
62
+ "default": "./dist/constants.js"
59
63
  }
60
64
  },
61
65
  "scripts": {
@@ -77,7 +81,7 @@
77
81
  "openai": "~4.103.0",
78
82
  "tar": "^7.4.3",
79
83
  "undici": "7.14.0",
80
- "zod": "^3.25.0"
84
+ "zod": "^4.3.6"
81
85
  },
82
86
  "devDependencies": {
83
87
  "@storyteller-platform/eslint": "0.1.0",
@@ -123,6 +127,10 @@
123
127
  "./vad": {
124
128
  "types": "./dist/api/VoiceActivityDetection.d.ts",
125
129
  "default": "./dist/api/VoiceActivityDetection.js"
130
+ },
131
+ "./constants": {
132
+ "types": "./dist/constants.d.ts",
133
+ "default": "./dist/constants.js"
126
134
  }
127
135
  }
128
136
  }