Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

638 B
Raw Blame
import * as polly from "@distilled.cloud/aws/polly";
import * as Layer from "effect/Layer";
import { makePollyHttpBinding } from "./BindingHttp.ts";
import { SynthesizeSpeech } from "./SynthesizeSpeech.ts";

// polly:SynthesizeSpeech only supports resource-level IAM for lexicons; the
// synthesis call itself is account-wide, so the grant is Resource: ["*"]
// (which also covers any LexiconNames in the request).
export const SynthesizeSpeechHttp = Layer.effect(
  SynthesizeSpeech,
  makePollyHttpBinding({
    capability: "SynthesizeSpeech",
    iamActions: ["polly:SynthesizeSpeech"],
    operation: polly.synthesizeSpeech,
  }),
);