Auto-sync: 2026-03-03 03:00:01

This commit is contained in:
Windmill Bot
2026-03-03 03:00:01 +00:00
parent 2a81b7ea35
commit 72483e045b
3 changed files with 22 additions and 31 deletions

View File

@@ -4,19 +4,17 @@ lock: '!inline u/admin/alexa_speak.script.lock'
kind: script kind: script
schema: schema:
type: object type: object
properties:
args:
type: object
description: ''
default: null
properties: properties:
device: device:
type: string type: string
description: '' description: ''
default: null
originalType: string originalType: string
text: text:
type: string type: string
description: '' description: ''
default: null
originalType: string originalType: string
required: required:
- args - device
- text

View File

@@ -1,27 +1,20 @@
export async function main(args: { export async function main(
device: string; device: string,
text: string; text: string,
}) { ): Promise<{ ok: boolean; device: string; text: string }> {
const ALEXA_API_URL = "http://alexa_api:3500";
console.log("ARGS:", args); const res = await fetch(`${ALEXA_API_URL}/speak`, {
const ssml = `<speak><lang xml:lang="ja-JP">${args.text}</lang></speak>`;
const res = await fetch("http://alexa_api:3500/speak", {
method: "POST", method: "POST",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({ device, text }), // ← SSMLなし、素のテキスト
device: args.device,
text: ssml
}),
}); });
const body = await res.text();
console.log("API RESPONSE:", body);
if (!res.ok) { if (!res.ok) {
throw new Error("alexa-api error " + res.status + ": " + body); const body = await res.json().catch(() => ({}));
throw new Error(`alexa-api error ${res.status}: ${JSON.stringify(body)}`);
} }
return body; return await res.json();
} }

View File

@@ -19,7 +19,7 @@ locks:
f/weather/weather_sync__flow+気象データ取得・同期.py: 86c9953ec7346601eaa13c681e2db5c01c9a5b4b45a3c47e8667ad3c47557029 f/weather/weather_sync__flow+気象データ取得・同期.py: 86c9953ec7346601eaa13c681e2db5c01c9a5b4b45a3c47e8667ad3c47557029
g/all/setup_app__app+__app_hash: d71add32e14e552d1a4c861c972a50d9598b07c0af201bbadec5b59bbd99d7e3 g/all/setup_app__app+__app_hash: d71add32e14e552d1a4c861c972a50d9598b07c0af201bbadec5b59bbd99d7e3
g/all/setup_app__app+change_account.deno.ts: 3c592cac27e9cdab0de6ae19270bcb08c7fa54355ad05253a12de2351894346b g/all/setup_app__app+change_account.deno.ts: 3c592cac27e9cdab0de6ae19270bcb08c7fa54355ad05253a12de2351894346b
u/admin/alexa_speak: 73022478d7d9a8e238add4bc5a8aa7329a2f7d81864daa8acd881190c8c37ef5 u/admin/alexa_speak: 38de2eb567f82488e6f819c82dc7d83f41d83f015fac0c944d98dcc6b33a29a1
u/admin/hub_sync: aaf9fd803fa229f3029d1bb02bbe3cc422fce680cad39c4eec8dd1da115de102 u/admin/hub_sync: aaf9fd803fa229f3029d1bb02bbe3cc422fce680cad39c4eec8dd1da115de102
u/antigravity/git_sync__flow+__flow_hash: 5a7194ef6bf1ce5529e70ae74fdb4cd05a0da662c78bfa355bb7e98698689ae6 u/antigravity/git_sync__flow+__flow_hash: 5a7194ef6bf1ce5529e70ae74fdb4cd05a0da662c78bfa355bb7e98698689ae6
u/antigravity/git_sync__flow+a.sh: ac7fdc83548f305fed33389129b79439e0c40077ed39a410477c77d08dca0ca9 u/antigravity/git_sync__flow+a.sh: ac7fdc83548f305fed33389129b79439e0c40077ed39a410477c77d08dca0ca9