代码之家  ›  专栏  ›  技术社区  ›  petezurich rdelmar

“Polly”对象没有“start\u speech\u synthesis\u task”属性

  •  0
  • petezurich rdelmar  · 技术社区  · 6 年前

    StartSpeechSynthesisTask AWS Polly的代码:

    client = boto3.client('polly')
    response = client.start_speech_synthesis_task(
                OutputFormat= "mp3",
                Text = text,
                TextType = "ssml",
                VoiceId= VOICE, 
                OutputS3BucketName=BUCKET,
                OutputS3KeyPrefix=filename)
    

    “Polly”对象没有“start\u speech\u synthesis\u task”属性

    我还用 boto3.Session(...).client(...) 同样的错误。

    similar post in the AWS forums 似乎没有答案。

    我怎样才能解决这个问题?

    提前谢谢!

    1 回复  |  直到 6 年前
        1
  •  0
  •   petezurich rdelmar    6 年前

    region_name :

    client = boto3.Session(region_name='eu-west-2').client('polly')