MCPcopy Create free account
hub / github.com/cdk-patterns/serverless / translate_text

Function translate_text

polly/csharp/lambda_fns/polly.py:42–49  ·  view source on GitHub ↗
(text, translate_from, translate_to)

Source from the content-addressed store, hash-verified

40 }
41
42def translate_text(text, translate_from, translate_to):
43 response = translate_c.translate_text(
44 Text=text,
45 SourceLanguageCode=translate_from,
46 TargetLanguageCode=translate_to
47 )
48
49 return response['TranslatedText']
50
51def convert_text_to_speech(voice, text):
52 if voice not in ['Joanna', 'Matthew', 'Lupe']:

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected