@openclaw/inworld-speech 2026.7.2-beta.1 → 2026.7.2-beta.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.
- package/dist/speech-provider.js +8 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
package/dist/speech-provider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_INWORLD_MODEL_ID, INWORLD_TTS_MODELS, inworldTTS, listInworldVoices, normalizeInworldBaseUrl } from "./tts.js";
|
|
2
2
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
3
|
-
import { asObject, parseSpeechDirectiveNumberOverride, trimToUndefined } from "openclaw/plugin-sdk/speech-core";
|
|
3
|
+
import { asObject, parseSpeechDirectiveNumberOverride, resolveSpeechProviderApiKey, trimToUndefined } from "openclaw/plugin-sdk/speech-core";
|
|
4
4
|
import { asFiniteNumberInRange } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/inworld/speech-provider.ts
|
|
6
6
|
function normalizeInworldTemperature(value) {
|
|
@@ -33,6 +33,9 @@ function readInworldProviderConfig(config) {
|
|
|
33
33
|
temperature: normalizeInworldTemperature(config.temperature) ?? defaults.temperature
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
function resolveInworldApiKey(primary, fallback) {
|
|
37
|
+
return resolveSpeechProviderApiKey(primary, fallback, process.env.INWORLD_API_KEY);
|
|
38
|
+
}
|
|
36
39
|
function readInworldOverrides(overrides) {
|
|
37
40
|
if (!overrides) return {};
|
|
38
41
|
return {
|
|
@@ -107,7 +110,7 @@ function buildInworldSpeechProvider() {
|
|
|
107
110
|
}),
|
|
108
111
|
listVoices: async (req) => {
|
|
109
112
|
const config = req.providerConfig ? readInworldProviderConfig(req.providerConfig) : void 0;
|
|
110
|
-
const apiKey = req.apiKey
|
|
113
|
+
const apiKey = resolveInworldApiKey(req.apiKey, config?.apiKey);
|
|
111
114
|
if (!apiKey) throw new Error("Inworld API key missing");
|
|
112
115
|
return listInworldVoices({
|
|
113
116
|
apiKey,
|
|
@@ -115,11 +118,11 @@ function buildInworldSpeechProvider() {
|
|
|
115
118
|
timeoutMs: req.timeoutMs
|
|
116
119
|
});
|
|
117
120
|
},
|
|
118
|
-
isConfigured: ({ providerConfig }) => Boolean(readInworldProviderConfig(providerConfig).apiKey
|
|
121
|
+
isConfigured: ({ providerConfig }) => Boolean(resolveInworldApiKey(readInworldProviderConfig(providerConfig).apiKey)),
|
|
119
122
|
synthesize: async (req) => {
|
|
120
123
|
const config = readInworldProviderConfig(req.providerConfig);
|
|
121
124
|
const overrides = readInworldOverrides(req.providerOverrides);
|
|
122
|
-
const apiKey = config.apiKey
|
|
125
|
+
const apiKey = resolveInworldApiKey(config.apiKey);
|
|
123
126
|
if (!apiKey) throw new Error("Inworld API key missing");
|
|
124
127
|
const useOpus = req.target === "voice-note";
|
|
125
128
|
const audioEncoding = useOpus ? "OGG_OPUS" : "MP3";
|
|
@@ -142,7 +145,7 @@ function buildInworldSpeechProvider() {
|
|
|
142
145
|
synthesizeTelephony: async (req) => {
|
|
143
146
|
const config = readInworldProviderConfig(req.providerConfig);
|
|
144
147
|
const overrides = readInworldOverrides(req.providerOverrides);
|
|
145
|
-
const apiKey = config.apiKey
|
|
148
|
+
const apiKey = resolveInworldApiKey(config.apiKey);
|
|
146
149
|
if (!apiKey) throw new Error("Inworld API key missing");
|
|
147
150
|
const sampleRate = 22050;
|
|
148
151
|
return {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/inworld-speech",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/inworld-speech",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.2"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/inworld-speech",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.2",
|
|
4
4
|
"description": "OpenClaw Inworld 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.7.2-beta.
|
|
21
|
+
"pluginApi": ">=2026.7.2-beta.2"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.7.2-beta.
|
|
24
|
+
"openclawVersion": "2026.7.2-beta.2",
|
|
25
25
|
"bundledDist": false
|
|
26
26
|
},
|
|
27
27
|
"release": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"README.md"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"openclaw": ">=2026.7.2-beta.
|
|
42
|
+
"openclaw": ">=2026.7.2-beta.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"openclaw": {
|