@foxden-app/foxclaw 0.5.56 → 0.5.57
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/CHANGELOG.md +10 -0
- package/dist/voice/tts.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
|
|
4
4
|
|
|
5
|
+
## 0.5.57 - 2026-06-21
|
|
6
|
+
|
|
7
|
+
### 中文
|
|
8
|
+
- 修复 SoulX SSH 语音后端 URL 构造错误:远端脚本现在正确展开 `$BASE_URL`,不再把 `${BASE_URL}` 字面量传给 curl 导致 `URL rejected: Bad hostname`。
|
|
9
|
+
- SoulX SSH 语音请求现在也会把 `VOICE_TTS_TIMEOUT_MS` 下发给远端 curl,远端 `/health` 和 `/v1/tts` 请求会自行按超时退出,避免 SSH 被中断后留下长时间运行的 curl。
|
|
10
|
+
|
|
11
|
+
### English
|
|
12
|
+
- Fixed SoulX SSH voice backend URL construction. The remote script now expands `$BASE_URL` correctly instead of passing a literal `${BASE_URL}` to curl and failing with `URL rejected: Bad hostname`.
|
|
13
|
+
- SoulX SSH voice requests now pass `VOICE_TTS_TIMEOUT_MS` down to remote curl for both `/health` and `/v1/tts`, preventing long-running remote curl processes after a timed-out SSH call.
|
|
14
|
+
|
|
5
15
|
## 0.5.56 - 2026-06-21
|
|
6
16
|
|
|
7
17
|
### 中文
|
package/dist/voice/tts.js
CHANGED
|
@@ -42,7 +42,7 @@ async function synthesizeViaHttp(text, config) {
|
|
|
42
42
|
throw new Error('VOICE_TTS_URL is not configured');
|
|
43
43
|
}
|
|
44
44
|
if (config.voiceTtsEngine === 'soulx') {
|
|
45
|
-
return convertToOggOpus(await requestTtsWav(config, '/v1/tts', { text, seed:
|
|
45
|
+
return convertToOggOpus(await requestTtsWav(config, '/v1/tts', { text, seed: 7 }), config.voiceFfmpegBin);
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
48
|
return convertToOggOpus(await requestTtsWav(config, '/v1/tts/custom', { text, language: 'zh' }), config.voiceFfmpegBin);
|
|
@@ -194,23 +194,25 @@ async function synthesizeSoulxViaSsh(text, config) {
|
|
|
194
194
|
}
|
|
195
195
|
const encodedText = Buffer.from(text, 'utf8').toString('base64');
|
|
196
196
|
const baseUrl = config.voiceTtsUrl || 'http://127.0.0.1:18082';
|
|
197
|
+
const curlMaxTimeSeconds = Math.max(1, Math.ceil(config.voiceTtsTimeoutMs / 1000));
|
|
197
198
|
const script = String.raw `set -euo pipefail
|
|
198
199
|
TEXT="$(printf '%s' "$1" | base64 -d)"
|
|
199
200
|
ENV_DIR="$2"
|
|
200
201
|
BASE_URL="$3"
|
|
202
|
+
CURL_MAX_TIME="$4"
|
|
201
203
|
cd "$ENV_DIR"
|
|
202
204
|
set -a
|
|
203
205
|
. ./.env
|
|
204
206
|
set +a
|
|
205
207
|
tmp="$(mktemp -d)"
|
|
206
208
|
trap 'rm -rf "$tmp"' EXIT
|
|
207
|
-
curl -sS "
|
|
209
|
+
curl -sS --connect-timeout 5 --max-time "$CURL_MAX_TIME" "$BASE_URL/health" >/dev/null
|
|
208
210
|
TEXT="$TEXT" python3 - <<'PY' > "$tmp/body.json"
|
|
209
211
|
import json
|
|
210
212
|
import os
|
|
211
213
|
print(json.dumps({"text": os.environ["TEXT"], "seed": 7, "dialect_prompt": ""}, ensure_ascii=False))
|
|
212
214
|
PY
|
|
213
|
-
status="$(curl -sS -w '%{http_code}' -X POST "
|
|
215
|
+
status="$(curl -sS --connect-timeout 5 --max-time "$CURL_MAX_TIME" -w '%{http_code}' -X POST "$BASE_URL/v1/tts" \
|
|
214
216
|
-H "Authorization: Bearer $QWEN_SPEECH_API_TOKEN" \
|
|
215
217
|
-H "Content-Type: application/json" \
|
|
216
218
|
--data-binary "@$tmp/body.json" \
|
|
@@ -238,6 +240,7 @@ PY
|
|
|
238
240
|
encodedText,
|
|
239
241
|
envDir,
|
|
240
242
|
baseUrl,
|
|
243
|
+
String(curlMaxTimeSeconds),
|
|
241
244
|
], script, config.voiceTtsTimeoutMs);
|
|
242
245
|
}
|
|
243
246
|
async function runSshBinary(args, stdin, timeoutMs) {
|