我试图在下面的代码中使用AWS Polly的StartSpeechSynthesisTask:
client = boto3.client('polly')
response = client.start_speech_synthesis_task(
OutputFormat= "mp3",
Text = text,
TextType = "ssml",
VoiceId= VOICE,
OutputS3BucketName=BUCKET,
OutputS3KeyPrefix=filename)但是,它会抛出此错误:
‘'Polly’对象没有属性'start_speech_synthesis_task‘
我还用boto3.Session(...).client(...) -相同的错误实例化了客户机。
我试图更新boto3,但没有结果。AWS论坛上类似的帖子似乎没有答案。
我怎么才能解决这个问题?
提前感谢!
发布于 2018-09-05 08:45:26
解决了。我必须用region_name实例化
client = boto3.Session(region_name='eu-west-2').client('polly')https://stackoverflow.com/questions/52180758
复制相似问题