/translate_tts_api

AWS Translate & Text to Speech API Javascript Example

Primary LanguageJavaScript

Translate & Text to Speech - Javascript Example

AWS Polly, AWS Translate, Serverless, Node.js

Request Body Properties - Required

Example POST Request

Headers

{
	"Content-Type": "application/json"
}

Body

{
	"SourceLanguageCode": "en",
	"TargetLanguageCode": "es", 
	"Text": "Hi, my name is Miguel.",
	"VoiceId": "Miguel", 
	"OutputFormat": "mp3",
	"Key": "example"
}

Example Response

{
    "url": "https://s3.amazonaws.com/bucket/example.mp3"
}