Skip to content

SendVoiceMessage

Source: src/AWS/PinpointSMSVoiceV2/SendVoiceMessage.ts

Runtime binding for sms-voice:SendVoiceMessage.

Sends a voice message from the bound origination phone number — Amazon Polly converts the text (or SSML) MessageBody into speech. The deploy-time half grants sms-voice:SendVoiceMessage on the number and the runtime half injects its ARN as the request’s OriginationIdentity. The bound number must carry the VOICE capability. Provide the implementation with Effect.provide(AWS.PinpointSMSVoiceV2.SendVoiceMessageHttp).

// init
const sendVoice = yield* AWS.PinpointSMSVoiceV2.SendVoiceMessage(number);
// runtime
const { MessageId } = yield* sendVoice({
DestinationPhoneNumber: "+12065550100",
MessageBody: "Your appointment is confirmed for tomorrow at nine A M.",
MessageBodyTextType: "TEXT",
VoiceId: "JOANNA",
});