Skip to content

DescribeVoices

Source: src/AWS/Polly/DescribeVoices.ts

Runtime binding for polly:DescribeVoices — list the voices available for speech synthesis, optionally filtered by engine or language.

Polly voices are account-wide, so the binding takes no arguments and grants the function polly:DescribeVoices. Provide the implementation with Effect.provide(AWS.Polly.DescribeVoicesHttp).

// init
const describeVoices = yield* AWS.Polly.DescribeVoices();
// runtime
const result = yield* describeVoices({ LanguageCode: "en-US" });
const voiceIds = (result.Voices ?? []).map((voice) => voice.Id);