boto3: boto3 1.9.199 polly synthesize_speech doesn't accept Engine parameter

Issue

I was trying Polly neural voices. On Boto3 Polly document, synthesize_speech method already includes Engine parameter.

Screen Shot 2019-08-01 at 11 11 59 AM

However, when I used it, it complains about Unknown parameter. Unknown parameter in input: “Engine”, must be one of: LexiconNames, OutputFormat, SampleRate, SpeechMarkTypes, Text, TextType, VoiceId, LanguageCode

Steps

I tried using the following code

print('boto3 ver: ', boto3.__version__)
pollyClient = boto3.client('polly')
try:
    response = pollyClient.synthesize_speech(
                                        Engine='neural',
                                        OutputFormat='mp3',
                                        Text='test',
                                        TextType='ssml',
                                        VoiceId='Matthew'
                                    )
except Exception as e:
    print('synthesize_speech exception: ', e)
boto3 ver:  1.9.199
synthesize_speech exception:  Parameter validation failed:
Unknown parameter in input: "Engine", must be one of: LexiconNames, OutputFormat,
SampleRate, SpeechMarkTypes, Text, TextType, VoiceId, LanguageCode

Does version 1.9.199 support neural voices?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I tried using virtual environment and i am not getting any error after that. These are all the steps i tried to update boto3 version in my lambda function.

python3 -m venv lambda-env
source lambda-env/bin/activate
pip install boto3
deactivate
cd lambda-env/lib/python3.7/site-packages
zip -r9 ${OLDPWD}/function.zip .
cd $OLDPWD
zip -g function.zip lambda_function.py  #lambda_function.py will contain your code 
aws lambda update-function-code --function-name function-name --zip-file fileb://function.zip

These are the steps to update boto3 version in lambda function using virtual environment.