@openclaw/fish-audio-speech 2026.8.1-beta.3 → 2026.8.2

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.
@@ -35,7 +35,8 @@ function resolveReferenceId(raw) {
35
35
  return trimToUndefined(raw?.speakerVoiceId ?? raw?.voiceId ?? raw?.referenceId);
36
36
  }
37
37
  function normalizeProviderConfig(rawConfig) {
38
- const raw = asOptionalRecord(asOptionalRecord(rawConfig.providers)?.["fish-audio"]) ?? asOptionalRecord(rawConfig["fish-audio"]);
38
+ const providers = asOptionalRecord(rawConfig.providers);
39
+ const raw = asOptionalRecord(providers?.["fish-audio"]) ?? asOptionalRecord(rawConfig["fish-audio"]);
39
40
  return {
40
41
  apiKey: normalizeResolvedSecretInputString({
41
42
  value: raw?.apiKey,
@@ -289,11 +290,12 @@ function buildFishAudioSpeechProvider() {
289
290
  };
290
291
  },
291
292
  synthesizeTelephony: async (req) => {
293
+ const params = resolveSynthesisRequest({
294
+ ...req,
295
+ target: "telephony"
296
+ });
292
297
  return {
293
- audioBuffer: await fishAudioTts(resolveSynthesisRequest({
294
- ...req,
295
- target: "telephony"
296
- })),
298
+ audioBuffer: await fishAudioTts(params),
297
299
  outputFormat: "pcm",
298
300
  sampleRate: 8e3
299
301
  };
package/dist/tts.js CHANGED
@@ -6,7 +6,7 @@ import { trimToUndefined } from "openclaw/plugin-sdk/speech";
6
6
  import { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
7
7
  //#region extensions/fish-audio-speech/tts.ts
8
8
  const FISH_AUDIO_BASE_URL = "https://api.fish.audio";
9
- const FISH_AUDIO_VOICES_MAX_BYTES = 2 * 1024 * 1024;
9
+ const FISH_AUDIO_VOICES_MAX_BYTES = 2097152;
10
10
  const FISH_AUDIO_VOICE_PAGE_SIZE = 100;
11
11
  const FISH_AUDIO_MAX_OWN_VOICE_PAGES = 20;
12
12
  function normalizeFishAudioBaseUrl(value) {
@@ -63,23 +63,13 @@ async function fishAudioTtsStream(params) {
63
63
  const bounded = createBoundedProviderBinaryStream(response.body, {
64
64
  maxBytes: params.maxBytes,
65
65
  createOverflowError: ({ maxBytes }) => /* @__PURE__ */ new Error(`Fish Audio TTS API error: audio response exceeds ${maxBytes} bytes`),
66
- createReleaseError: () => /* @__PURE__ */ new Error("Fish Audio TTS stream released")
66
+ createReleaseError: () => /* @__PURE__ */ new Error("Fish Audio TTS stream released"),
67
+ cleanup: release
67
68
  });
68
- let releasePromise;
69
- const releaseAll = () => {
70
- releasePromise ??= (async () => {
71
- try {
72
- await bounded.release();
73
- } finally {
74
- await release();
75
- }
76
- })();
77
- return releasePromise;
78
- };
79
69
  handedOff = true;
80
70
  return {
81
71
  audioStream: bounded.stream,
82
- release: releaseAll
72
+ release: bounded.release
83
73
  };
84
74
  } finally {
85
75
  if (!handedOff) await release();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/fish-audio-speech",
3
- "version": "2026.8.1-beta.3",
3
+ "version": "2026.8.2",
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.8.1-beta.3"
21
+ "pluginApi": ">=2026.8.2"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.8.1-beta.3",
24
+ "openclawVersion": "2026.8.2",
25
25
  "bundledDist": false
26
26
  },
27
27
  "release": {
@@ -38,7 +38,7 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
41
- "openclaw": ">=2026.8.1-beta.3"
41
+ "openclaw": ">=2026.8.2"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "openclaw": {