@@ -71,6 +71,7 @@ def submit_job_url(
7171 skip_postprocessing = False ,
7272 remove_atmospherics = False ,
7373 speakers_count = None ,
74+ diarization_type = None ,
7475 summarization_config : SummarizationOptions = None ,
7576 translation_config : TranslationOptions = None ):
7677 """Submit media given a URL for transcription.
@@ -122,21 +123,36 @@ def submit_job_url(
122123 :param remove_atmospherics: Atmospherics such as <laugh>, <affirmative>, etc. will not
123124 appear in the transcript.
124125 :param speakers_count: Use to specify the total number of unique speakers in the audio.
126+ :param diarization_type: Use to specify diarization type.
125127 :param summarization_config: Use to request transcript summary.
126128 :param translation_config: Use to request transcript translation.
127129 :returns: raw response data
128130 :raises: HTTPError
129131 """
130- payload = self ._create_job_options_payload (media_url , metadata , callback_url ,
131- skip_diarization , skip_punctuation ,
132- speaker_channels_count ,
133- custom_vocabularies , filter_profanity ,
134- remove_disfluencies , delete_after_seconds ,
135- language , custom_vocabulary_id , transcriber ,
136- verbatim , rush , test_mode ,
137- segments_to_transcribe , speaker_names ,
138- source_config , notification_config ,
139- skip_postprocessing ,
132+ payload = self ._create_job_options_payload (media_url = media_url ,
133+ metadata = metadata ,
134+ callback_url = callback_url ,
135+ skip_diarization = skip_diarization ,
136+ skip_punctuation = skip_punctuation ,
137+ speaker_channels_count = speaker_channels_count ,
138+ custom_vocabularies = custom_vocabularies ,
139+ filter_profanity = filter_profanity ,
140+ remove_disfluencies = remove_disfluencies ,
141+ delete_after_seconds = delete_after_seconds ,
142+ language = language ,
143+ custom_vocabulary_id = custom_vocabulary_id ,
144+ transcriber = transcriber ,
145+ verbatim = verbatim ,
146+ rush = rush ,
147+ test_mode = test_mode ,
148+ segments_to_transcribe = segments_to_transcribe ,
149+ speaker_names = speaker_names ,
150+ source_config = source_config ,
151+ notification_config = notification_config ,
152+ skip_postprocessing = skip_postprocessing ,
153+ remove_atmospherics = remove_atmospherics ,
154+ speakers_count = speakers_count ,
155+ diarization_type = diarization_type ,
140156 summarization_config = summarization_config ,
141157 translation_config = translation_config )
142158
@@ -172,6 +188,7 @@ def submit_job_local_file(
172188 skip_postprocessing = False ,
173189 remove_atmospherics = False ,
174190 speakers_count = None ,
191+ diarization_type = None ,
175192 summarization_config : SummarizationOptions = None ,
176193 translation_config : TranslationOptions = None ):
177194 """Submit a local file for transcription.
@@ -220,6 +237,7 @@ def submit_job_local_file(
220237 :param remove_atmospherics: Atmospherics such as <laugh>, <affirmative>, etc. will not
221238 appear in the transcript.
222239 :param speakers_count: Use to specify the total number of unique speakers in the audio.
240+ :param diarization_type: Use to specify diarization type.
223241 :param summarization_config: Use to request transcript summary.
224242 :param translation_config: Use to request transcript translation.
225243 :returns: raw response data
@@ -228,15 +246,30 @@ def submit_job_local_file(
228246 if not filename :
229247 raise ValueError ('filename must be provided' )
230248
231- payload = self ._create_job_options_payload (None , metadata , callback_url ,
232- skip_diarization , skip_punctuation ,
233- speaker_channels_count ,
234- custom_vocabularies , filter_profanity ,
235- remove_disfluencies , delete_after_seconds ,
236- language , custom_vocabulary_id , transcriber ,
237- verbatim , rush , test_mode ,
238- segments_to_transcribe , speaker_names , None ,
239- notification_config , skip_postprocessing ,
249+ payload = self ._create_job_options_payload (media_url = None ,
250+ metadata = metadata ,
251+ callback_url = callback_url ,
252+ skip_diarization = skip_diarization ,
253+ skip_punctuation = skip_punctuation ,
254+ speaker_channels_count = speaker_channels_count ,
255+ custom_vocabularies = custom_vocabularies ,
256+ filter_profanity = filter_profanity ,
257+ remove_disfluencies = remove_disfluencies ,
258+ delete_after_seconds = delete_after_seconds ,
259+ language = language ,
260+ custom_vocabulary_id = custom_vocabulary_id ,
261+ transcriber = transcriber ,
262+ verbatim = verbatim ,
263+ rush = rush ,
264+ test_mode = test_mode ,
265+ segments_to_transcribe = segments_to_transcribe ,
266+ speaker_names = speaker_names ,
267+ source_config = None ,
268+ notification_config = notification_config ,
269+ skip_postprocessing = skip_postprocessing ,
270+ remove_atmospherics = remove_atmospherics ,
271+ speakers_count = speakers_count ,
272+ diarization_type = diarization_type ,
240273 summarization_config = summarization_config ,
241274 translation_config = translation_config )
242275
@@ -714,6 +747,7 @@ def _create_job_options_payload(
714747 skip_postprocessing = False ,
715748 remove_atmospherics = None ,
716749 speakers_count = None ,
750+ diarization_type = None ,
717751 summarization_config : SummarizationOptions = None ,
718752 translation_config : TranslationOptions = None ):
719753 payload = {}
@@ -764,6 +798,8 @@ def _create_job_options_payload(
764798 payload ['remove_atmospherics' ] = remove_atmospherics
765799 if speakers_count :
766800 payload ['speakers_count' ] = speakers_count
801+ if diarization_type :
802+ payload ['diarization_type' ] = diarization_type
767803 if summarization_config :
768804 payload ['summarization_config' ] = summarization_config .to_dict ()
769805 if translation_config :
0 commit comments