@openclaw/inworld-speech 2026.9.8 → 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.
@@ -33,64 +33,52 @@ function readInworldProviderConfig(config) {
33
33
  function resolveInworldApiKey(primary, fallback) {
34
34
  return resolveSpeechProviderApiKey(primary, fallback, process.env.INWORLD_API_KEY);
35
35
  }
36
- function readInworldOverrides(overrides) {
37
- return {
38
- voiceId: normalizeOptionalString(overrides?.voiceId ?? overrides?.voice),
39
- modelId: normalizeOptionalString(overrides?.modelId ?? overrides?.model),
40
- temperature: normalizeInworldTemperature(overrides?.temperature)
41
- };
42
- }
43
36
  async function synthesizeInworld(req) {
44
37
  const config = readInworldProviderConfig(req.providerConfig);
45
- const overrides = readInworldOverrides(req.providerOverrides);
38
+ const overrides = req.providerOverrides;
46
39
  const apiKey = resolveInworldApiKey(config.apiKey);
47
40
  if (!apiKey) throw new Error("Inworld API key missing");
48
41
  return inworldTTS({
49
42
  text: req.text,
50
43
  apiKey,
51
44
  baseUrl: config.baseUrl,
52
- voiceId: overrides.voiceId ?? config.voiceId,
53
- modelId: overrides.modelId ?? config.modelId,
45
+ voiceId: normalizeOptionalString(overrides?.voiceId ?? overrides?.voice) ?? config.voiceId,
46
+ modelId: normalizeOptionalString(overrides?.modelId ?? overrides?.model) ?? config.modelId,
54
47
  audioEncoding: req.audioEncoding,
55
48
  ...req.sampleRateHertz === void 0 ? {} : { sampleRateHertz: req.sampleRateHertz },
56
- temperature: overrides.temperature ?? config.temperature,
49
+ temperature: normalizeInworldTemperature(overrides?.temperature) ?? config.temperature,
57
50
  timeoutMs: req.timeoutMs
58
51
  });
59
52
  }
60
53
  function parseDirectiveToken(ctx) {
61
- switch (ctx.key) {
62
- case "voice":
63
- case "voiceid":
64
- case "voice_id":
65
- case "inworld_voice":
66
- case "inworldvoice":
67
- if (!ctx.policy.allowVoice) return { handled: true };
68
- return {
69
- handled: true,
70
- overrides: { voiceId: ctx.value }
71
- };
72
- case "model":
73
- case "modelid":
74
- case "model_id":
75
- case "inworld_model":
76
- case "inworldmodel":
77
- if (!ctx.policy.allowModelId) return { handled: true };
78
- return {
79
- handled: true,
80
- overrides: { modelId: ctx.value }
81
- };
82
- case "temperature": return parseSpeechDirectiveNumberOverride({
83
- ctx,
84
- overrideKey: "temperature",
85
- range: {
86
- min: 0,
87
- minExclusive: true,
88
- max: 2
89
- },
90
- warning: (value) => `invalid Inworld temperature "${value}"`
91
- });
92
- default: return { handled: false };
93
- }
54
+ if (ctx.key === "temperature") return parseSpeechDirectiveNumberOverride({
55
+ ctx,
56
+ overrideKey: "temperature",
57
+ range: {
58
+ min: 0,
59
+ minExclusive: true,
60
+ max: 2
61
+ },
62
+ warning: (value) => `invalid Inworld temperature "${value}"`
63
+ });
64
+ const key = [
65
+ "voice",
66
+ "voiceid",
67
+ "voice_id",
68
+ "inworld_voice",
69
+ "inworldvoice"
70
+ ].includes(ctx.key) ? "voiceId" : [
71
+ "model",
72
+ "modelid",
73
+ "model_id",
74
+ "inworld_model",
75
+ "inworldmodel"
76
+ ].includes(ctx.key) ? "modelId" : void 0;
77
+ if (!key) return { handled: false };
78
+ return (key === "voiceId" ? ctx.policy.allowVoice : ctx.policy.allowModelId) ? {
79
+ handled: true,
80
+ overrides: { [key]: ctx.value }
81
+ } : { handled: true };
94
82
  }
95
83
  function buildInworldSpeechProvider() {
96
84
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/inworld-speech",
3
- "version": "2026.9.8",
3
+ "version": "2026.10.1-beta.1",
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.9.8"
21
+ "pluginApi": ">=2026.10.1-beta.1"
22
22
  },
23
23
  "build": {
24
- "openclawVersion": "2026.9.8",
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.8"
43
+ "openclaw": ">=2026.10.1-beta.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "openclaw": {