From 49f10918f2d09fdd80009643a2a3fb97c3353ae8 Mon Sep 17 00:00:00 2001 From: Egi Okta Frima Date: Sun, 25 Sep 2022 05:43:40 +0700 Subject: [PATCH] Update aws_polly.py fixed awspolly always jump to ProfileNotFound, because profile_name in Session define as "polly", for starter user always make aws default profile as "default" in ~/.aws/credentials, and region_name is required to include as parameter for botocore/boto3 to recognise which one to use maybe you can make workaround to grab it from ~/.aws/config --- TTS/aws_polly.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TTS/aws_polly.py b/TTS/aws_polly.py index fa02079..a613d2e 100644 --- a/TTS/aws_polly.py +++ b/TTS/aws_polly.py @@ -33,7 +33,7 @@ class AWSPolly: def run(self, text, filepath, random_voice: bool = False): try: - session = Session(profile_name="polly") + session = Session(profile_name="default", region_name='us-west-1') polly = session.client("polly") if random_voice: voice = self.randomvoice()