@openclaw/fish-audio-speech 2026.9.7 → 2026.10.1-beta.1

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.
@@ -15,7 +15,8 @@ const DEFAULT_TIMEOUT_MS = 24e4;
15
15
  function normalizeModel(value) {
16
16
  const model = normalizeOptionalString(value);
17
17
  if (!model) return DEFAULT_MODEL;
18
- if (FISH_AUDIO_MODELS.some((candidate) => candidate === model)) return model;
18
+ const supported = FISH_AUDIO_MODELS.find((candidate) => candidate === model);
19
+ if (supported) return supported;
19
20
  throw new Error(`invalid Fish Audio model "${model}"`);
20
21
  }
21
22
  function normalizeLatency(value) {
@@ -206,12 +207,13 @@ function resolveFormat(target) {
206
207
  voiceCompatible: false
207
208
  };
208
209
  }
209
- function resolveSynthesisRequest(req) {
210
+ async function resolveSynthesisRequest(req) {
210
211
  const config = readProviderConfig(req.providerConfig);
211
212
  const overrides = readOverrides(req.providerOverrides);
212
213
  const apiKey = resolveApiKey(config.apiKey);
213
214
  if (!apiKey) throw new Error("Fish Audio API key missing");
214
215
  const output = resolveFormat(req.target);
216
+ const { resolveGeneratedMediaMaxBytes } = await import("openclaw/plugin-sdk/media-generation-runtime");
215
217
  return {
216
218
  text: req.text,
217
219
  apiKey,
@@ -224,6 +226,7 @@ function resolveSynthesisRequest(req) {
224
226
  topP: overrides.topP ?? config.topP,
225
227
  normalize: overrides.normalize ?? config.normalize,
226
228
  timeoutMs: req.timeoutMs,
229
+ maxBytes: resolveGeneratedMediaMaxBytes(req.cfg, "audio"),
227
230
  ...output
228
231
  };
229
232
  }
@@ -284,24 +287,19 @@ function buildFishAudioSpeechProvider() {
284
287
  },
285
288
  isConfigured: ({ providerConfig }) => Boolean(resolveApiKey(readProviderConfig(providerConfig).apiKey)),
286
289
  synthesize: async (req) => {
287
- const params = resolveSynthesisRequest(req);
288
- const { resolveGeneratedMediaMaxBytes } = await import("openclaw/plugin-sdk/media-generation-runtime");
290
+ const params = await resolveSynthesisRequest(req);
289
291
  return {
290
- audioBuffer: await fishAudioTts({
291
- ...params,
292
- maxBytes: resolveGeneratedMediaMaxBytes(req.cfg, "audio")
293
- }),
292
+ audioBuffer: await fishAudioTts(params),
294
293
  outputFormat: params.format,
295
294
  fileExtension: params.fileExtension,
296
295
  voiceCompatible: params.voiceCompatible
297
296
  };
298
297
  },
299
298
  streamSynthesize: async (req) => {
300
- const params = resolveSynthesisRequest(req);
301
- const { resolveGeneratedMediaMaxBytes } = await import("openclaw/plugin-sdk/media-generation-runtime");
299
+ const params = await resolveSynthesisRequest(req);
302
300
  const stream = await fishAudioTtsStream({
303
301
  ...params,
304
- maxBytes: Math.min(resolveGeneratedMediaMaxBytes(req.cfg, "audio"), MAX_AUDIO_BYTES)
302
+ maxBytes: Math.min(params.maxBytes, MAX_AUDIO_BYTES)
305
303
  });
306
304
  return {
307
305
  audioStream: stream.audioStream,
@@ -312,16 +310,12 @@ function buildFishAudioSpeechProvider() {
312
310
  };
313
311
  },
314
312
  synthesizeTelephony: async (req) => {
315
- const params = resolveSynthesisRequest({
313
+ const params = await resolveSynthesisRequest({
316
314
  ...req,
317
315
  target: "telephony"
318
316
  });
319
- const { resolveGeneratedMediaMaxBytes } = await import("openclaw/plugin-sdk/media-generation-runtime");
320
317
  return {
321
- audioBuffer: await fishAudioTts({
322
- ...params,
323
- maxBytes: resolveGeneratedMediaMaxBytes(req.cfg, "audio")
324
- }),
318
+ audioBuffer: await fishAudioTts(params),
325
319
  outputFormat: "pcm",
326
320
  sampleRate: 8e3
327
321
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/fish-audio-speech",
3
- "version": "2026.9.7",
3
+ "version": "2026.10.1-beta.1",
4
4
  "description": "OpenClaw Fish Audio speech plugin.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,10 +18,10 @@
18
18
  "minHostVersion": ">=2026.7.2"
19
19
  },
20
20
  "compat": {
21
- "pluginApi": ">=2026.9.7"
21
+ "pluginApi": ">=2026.10.1-beta.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.7",
24
+ "openclawVersion": "2026.10.1-beta.1",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -40,7 +40,7 @@
40
40
  "assets/activity.svg"
41
41
  ],
42
42
  "peerDependencies": {
43
- "openclaw": ">=2026.9.7"
43
+ "openclaw": ">=2026.10.1-beta.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {