Skip to content

Commit

Permalink
Fix get_segment bug and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Uberi committed Dec 5, 2017
1 parent 47fed77 commit b24d057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import uuid

__author__ = "Anthony Zhang (Uberi)"
__version__ = "3.8.0"
__version__ = "3.8.1"
__license__ = "BSD"

try: # attempt to use the Python 2 modules
Expand Down Expand Up @@ -311,7 +311,7 @@ def get_segment(self, start_ms=None, end_ms=None):
If not specified, ``start_ms`` defaults to the beginning of the audio, and ``end_ms`` defaults to the end.
"""
assert start_ms is None or start_ms >= 0, "``start_ms`` must be a non-negative number"
assert end_ms is None or end_ms >= start_ms, "``end_ms`` must be a number greater or equal to ``start_ms``"
assert end_ms is None or end_ms >= (0 if start_ms is None else start_ms), "``end_ms`` must be a non-negative number greater or equal to ``start_ms``"
if start_ms is None:
start_byte = 0
else:
Expand Down

0 comments on commit b24d057

Please sign in to comment.