handleAwsPollySpeech (executors/awsPollyTts.ts)

OmniRoute · open-sse/executors/awsPollyTts.ts · typescript · MIT
voice

AWS Polly TTS handler that signs requests and streams audio.

// Source: https://github.com/diegosouzapw/OmniRoute | License: MIT | Copyright 2026 diegosouzapw
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * AWS Polly TTS handler.
 *
 * Extracted out of `open-sse/handlers/audioSpeech.ts` (frozen at its
 * file-size ratchet baseline — config/quality/file-size-baseline.json).
 * Pure provider adapter, no behavior change vs. the original inline implementation.
 *
 * POST /v1/speech signed with AWS SigV4. The configured apiKey stores AWS
 * Secret Access Key; providerSpecificData.accessKeyId stores AWS Access Key
 * ID, with optional region/baseUrl/defaultVoice/sessionToken.
 */
import { stripTrailingSlashes } from "../utils/urlSanitize.ts";
import { signAwsRequest } from "../utils/awsSigV4.ts";
import { errorResponse } from "../u

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key