Skip to content

Commit

Permalink
merge branch timgates42/bugfix_typo_convert
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Mar 5, 2022
2 parents 77a5b27 + 14f038f commit 0658a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def get_aiff_data(self, convert_rate=None, convert_width=None):
sample_rate = self.sample_rate if convert_rate is None else convert_rate
sample_width = self.sample_width if convert_width is None else convert_width

# the AIFF format is big-endian, so we need to covnert the little-endian raw data to big-endian
# the AIFF format is big-endian, so we need to convert the little-endian raw data to big-endian
if hasattr(audioop, "byteswap"): # ``audioop.byteswap`` was only added in Python 3.4
raw_data = audioop.byteswap(raw_data, sample_width)
else: # manually reverse the bytes of each sample, which is slower but works well enough as a fallback
Expand Down

0 comments on commit 0658a48

Please sign in to comment.