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
pull/1266/head
Egi Okta Frima 4 years ago committed by GitHub
parent dcd0ff5b12
commit 49f10918f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,7 +33,7 @@ class AWSPolly:
def run(self, text, filepath, random_voice: bool = False): def run(self, text, filepath, random_voice: bool = False):
try: try:
session = Session(profile_name="polly") session = Session(profile_name="default", region_name='us-west-1')
polly = session.client("polly") polly = session.client("polly")
if random_voice: if random_voice:
voice = self.randomvoice() voice = self.randomvoice()

Loading…
Cancel
Save