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

This commit is contained in:
Windmill Bot
2026-03-02 12:00:01 +00:00
parent 4666fa23fc
commit 2a81b7ea35
3 changed files with 43 additions and 19 deletions

View File

@@ -1,16 +1,27 @@
const ssml = `
<speak>
<lang xml:lang="ja-JP">
${text}
</lang>
</speak>
`;
export async function main(args: {
device: string;
text: string;
}) {
const res = await fetch("http://alexa_api:3500/speak", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
device,
ssml
}),
});
console.log("ARGS:", args);
const ssml = `<speak><lang xml:lang="ja-JP">${args.text}</lang></speak>`;
const res = await fetch("http://alexa_api:3500/speak", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
device: args.device,
text: ssml
}),
});
const body = await res.text();
console.log("API RESPONSE:", body);
if (!res.ok) {
throw new Error("alexa-api error " + res.status + ": " + body);
}
return body;
}