Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrrk committed Nov 26, 2024
1 parent 0e0f242 commit 4ba95f4
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/rev_ai/apiclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,15 @@ def get_transcript_text(self, id_, group_channels_by=None, group_channels_thresh

return response.text

def get_transcript_text_as_stream(self, id_, group_channels_by=None, group_channels_threshold_ms=None):
def get_transcript_text_as_stream(self,
id_,
group_channels_by=None,
group_channels_threshold_ms=None):
"""Get the transcript of a specific job as a plain text stream.
:param id_: id of job to be requested
:param group_channels_by: optional, group channels by speaker or time
:param group_channels_threshold_ms: optional, group channels by time threshold in milliseconds
:param group_channels_threshold_ms: optional, group channels by time threshold, ms
:returns: requests.models.Response HTTP response which can be used to stream
the payload of the response
:raises: HTTPError
Expand All @@ -391,12 +394,15 @@ def get_transcript_text_as_stream(self, id_, group_channels_by=None, group_chann

return response

def get_transcript_json(self, id_, group_channels_by=None, group_channels_threshold_ms=None):
def get_transcript_json(self,
id_,
group_channels_by=None,
group_channels_threshold_ms=None):
"""Get the transcript of a specific job as json.
:param id_: id of job to be requested
:param group_channels_by: optional, group channels by speaker or time
:param group_channels_threshold_ms: optional, group channels by time threshold in milliseconds
:param group_channels_threshold_ms: optional, group channels by time threshold, ms
:returns: transcript data as json
:raises: HTTPError
"""
Expand All @@ -417,12 +423,15 @@ def get_transcript_json(self, id_, group_channels_by=None, group_channels_thresh

return response.json()

def get_transcript_json_as_stream(self, id_, group_channels_by=None, group_channels_threshold_ms=None):
def get_transcript_json_as_stream(self,
id_,
group_channels_by=None,
group_channels_threshold_ms=None):
"""Get the transcript of a specific job as streamed json.
:param id_: id of job to be requested
:param group_channels_by: optional, group channels by speaker or time
:param group_channels_threshold_ms: optional, group channels by time threshold in milliseconds
:param group_channels_threshold_ms: optional, group channels by time threshold, ms
:returns: requests.models.Response HTTP response which can be used to stream
the payload of the response
:raises: HTTPError
Expand Down Expand Up @@ -450,7 +459,7 @@ def get_transcript_object(self, id_, group_channels_by=None, group_channels_thre
:param id_: id of job to be requested
:param group_channels_by: optional, group channels by speaker or time
:param group_channels_threshold_ms: optional, group channels by time threshold in milliseconds
:param group_channels_threshold_ms: optional, group channels by time threshold, ms
:returns: transcript data as a python object
:raises: HTTPError
"""
Expand Down

0 comments on commit 4ba95f4

Please sign in to comment.