Skip to content

Commit

Permalink
[style] Add spaces (E226)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Apr 2, 2024
1 parent b196ea1 commit e5cb915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ def recognize_amazon(self, audio_data, bucket_name=None, access_key_id=None, sec
try:
status = transcribe.get_transcription_job(TranscriptionJobName=job_name)
except ClientError as exc:
print('!'*80)
print('!' * 80)
print('Error getting job:', exc.response)
if exc.response['Error']['Code'] == 'BadRequestException' and "The requested job couldn't be found" in str(exc):
# Some error caused the job we recorded to not exist on AWS.
Expand Down Expand Up @@ -1152,7 +1152,7 @@ def recognize_amazon(self, audio_data, bucket_name=None, access_key_id=None, sec
confidences.append(float(item['alternatives'][0]['confidence']))
confidence = 0.5
if confidences:
confidence = sum(confidences)/float(len(confidences))
confidence = sum(confidences) / float(len(confidences))
transcript = d['results']['transcripts'][0]['transcript']

# Delete job.
Expand Down Expand Up @@ -1210,7 +1210,7 @@ def recognize_amazon(self, audio_data, bucket_name=None, access_key_id=None, sec
exc.file_key = None
raise exc
except ClientError as exc:
print('!'*80)
print('!' * 80)
print('Error starting job:', exc.response)
if exc.response['Error']['Code'] == 'LimitExceededException':
# Could not start job. Cancel everything.
Expand Down

0 comments on commit e5cb915

Please sign in to comment.