-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REVAI-4324: Multichannel transcript grouping #119
Conversation
@@ -337,95 +337,144 @@ 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_): | |||
def get_transcript_text(self, id_, group_channels_by=None, group_channels_threshold_ms=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would use type hints if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see we use type hints in this code. I consider this to be python 2.x compatibility
if group_channels_by is not None: | ||
params.append('group_channels_by={}'.format(group_channels_by)) | ||
if group_channels_threshold_ms is not None: | ||
params.append('group_channels_threshold_ms={}'.format(group_channels_threshold_ms)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmtrrk i think you were saying you have doubts about this, i thiunk this is right, we are dealing with these two parameters independently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
Overview
Add new optional parameters to
get_transcript_xx
functions that are available for multichannel media files:group_channels_by
Specifies how to group multiple channels in the transcript. This parameter determines the atomic entity for breaking down the transcript into monologues. Only applicable when the submitted media has multiple channels (speaker_channels_count > 1):
speaker
- groups by speakersword
- groups by individual wordssentence
- groups by complete sentencesgroup_channels_threshold_ms
Threshold in milliseconds for handling speaker interruptions. When a speaker interrupts another speaker, this parameter determines how to group the segments. Only applicable when the submitted media has multiple channels (speaker_channels_count > 1):
Usage