@openclaw/gradium-speech 2026.9.1-beta.1 → 2026.9.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.
- package/dist/speech-provider.js +2 -1
- package/dist/tts.js +5 -4
- package/package.json +4 -4
package/dist/speech-provider.js
CHANGED
|
@@ -7,7 +7,8 @@ import { resolveSpeechProviderApiKey } from "openclaw/plugin-sdk/speech-core";
|
|
|
7
7
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
//#region extensions/gradium/speech-provider.ts
|
|
9
9
|
function normalizeGradiumProviderConfig(rawConfig) {
|
|
10
|
-
const
|
|
10
|
+
const providers = asOptionalRecord(rawConfig.providers);
|
|
11
|
+
const raw = asOptionalRecord(providers?.gradium) ?? asOptionalRecord(rawConfig.gradium);
|
|
11
12
|
return {
|
|
12
13
|
apiKey: normalizeResolvedSecretInputString({
|
|
13
14
|
value: raw?.apiKey,
|
package/dist/tts.js
CHANGED
|
@@ -2,11 +2,12 @@ import { GRADIUM_API_HOSTNAME, normalizeGradiumBaseUrl } from "./shared.js";
|
|
|
2
2
|
import { assertOkOrThrowProviderError, readProviderBinaryResponse } from "openclaw/plugin-sdk/provider-http";
|
|
3
3
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
4
4
|
//#region extensions/gradium/tts.ts
|
|
5
|
-
const DEFAULT_TTS_MAX_BYTES =
|
|
5
|
+
const DEFAULT_TTS_MAX_BYTES = 16777216;
|
|
6
6
|
async function gradiumTTS(params) {
|
|
7
7
|
const { text, apiKey, baseUrl, voiceId, outputFormat, timeoutMs, maxBytes = DEFAULT_TTS_MAX_BYTES } = params;
|
|
8
|
+
const url = `${normalizeGradiumBaseUrl(baseUrl)}/api/post/speech/tts`;
|
|
8
9
|
const { response, release } = await fetchWithSsrFGuard({
|
|
9
|
-
url
|
|
10
|
+
url,
|
|
10
11
|
init: {
|
|
11
12
|
method: "POST",
|
|
12
13
|
headers: {
|
|
@@ -28,10 +29,10 @@ async function gradiumTTS(params) {
|
|
|
28
29
|
});
|
|
29
30
|
try {
|
|
30
31
|
await assertOkOrThrowProviderError(response, "Gradium API error");
|
|
31
|
-
return
|
|
32
|
+
return await readProviderBinaryResponse(response, "Gradium API error", "audio", {
|
|
32
33
|
maxBytes,
|
|
33
34
|
onOverflow: ({ maxBytes: maxBytesLocal }) => /* @__PURE__ */ new Error(`Gradium TTS audio response exceeds ${maxBytesLocal} bytes`)
|
|
34
|
-
})
|
|
35
|
+
});
|
|
35
36
|
} finally {
|
|
36
37
|
await release();
|
|
37
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/gradium-speech",
|
|
3
|
-
"version": "2026.9.1
|
|
3
|
+
"version": "2026.9.1",
|
|
4
4
|
"description": "OpenClaw Gradium speech plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"minHostVersion": ">=2026.6.8"
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.9.1
|
|
21
|
+
"pluginApi": ">=2026.9.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.9.1
|
|
24
|
+
"openclawVersion": "2026.9.1",
|
|
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.9.1
|
|
41
|
+
"openclaw": ">=2026.9.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
44
|
"openclaw": {
|