Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrrk committed Nov 27, 2024
1 parent d39ea12 commit ee356bd
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions src/rev_ai/apiclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,14 @@ def get_list_of_jobs(self, limit=None, starting_after=None):

return [Job.from_json(job) for job in response.json()]

def get_transcript_text(self, id_, group_channels_by=None, group_channels_threshold_ms=None):
def get_transcript_text(self, id_, group_channels_by=None, group_channels_threshold_ms=1000):
"""Get the transcript of a specific job as plain text.
: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, ms
:param group_channels_by: optional, GroupChannelsType grouping strategy for
multichannel transcripts. None for default.
:param group_channels_threshold_ms: optional, grouping threshold in milliseconds.
None for default.
:returns: transcript data as text
:raises: HTTPError
"""
Expand Down Expand Up @@ -370,8 +372,10 @@ def get_transcript_text_as_stream(self,
"""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, ms
:param group_channels_by: optional, GroupChannelsType grouping strategy for
multichannel transcripts. None for default.
:param group_channels_threshold_ms: optional, grouping threshold in milliseconds.
None for default.
:returns: requests.models.Response HTTP response which can be used to stream
the payload of the response
:raises: HTTPError
Expand Down Expand Up @@ -401,8 +405,10 @@ def get_transcript_json(self,
"""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, ms
:param group_channels_by: optional, GroupChannelsType grouping strategy for
multichannel transcripts. None for default.
:param group_channels_threshold_ms: optional, grouping threshold in milliseconds.
None for default.
:returns: transcript data as json
:raises: HTTPError
"""
Expand Down Expand Up @@ -430,8 +436,10 @@ def get_transcript_json_as_stream(self,
"""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, ms
:param group_channels_by: optional, GroupChannelsType grouping strategy for
multichannel transcripts. None for default.
:param group_channels_threshold_ms: optional, grouping threshold in milliseconds.
None for default.
:returns: requests.models.Response HTTP response which can be used to stream
the payload of the response
:raises: HTTPError
Expand All @@ -458,8 +466,10 @@ def get_transcript_object(self, id_, group_channels_by=None, group_channels_thre
"""Get the transcript of a specific job as a python object`.
: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, ms
:param group_channels_by: optional, GroupChannelsType grouping strategy for
multichannel transcripts. None for default.
:param group_channels_threshold_ms: optional, grouping threshold in milliseconds.
None for default.
:returns: transcript data as a python object
:raises: HTTPError
"""
Expand Down Expand Up @@ -868,8 +878,8 @@ def _build_transcript_url(self, id_, group_channels_by=None, group_channels_thre
"""Build the get transcript url.
: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, ms
:param group_channels_by: optional, None for default, multichannel transcript grouping strategy
:param group_channels_threshold_ms: optional, None for default, grouping threshold, milliseconds
:returns: url for getting the transcript
"""
params = []
Expand Down

0 comments on commit ee356bd

Please sign in to comment.