@@ -71,6 +71,7 @@ def submit_job_url(
71
71
skip_postprocessing = False ,
72
72
remove_atmospherics = False ,
73
73
speakers_count = None ,
74
+ diarization_type = None ,
74
75
summarization_config : SummarizationOptions = None ,
75
76
translation_config : TranslationOptions = None ):
76
77
"""Submit media given a URL for transcription.
@@ -122,21 +123,36 @@ def submit_job_url(
122
123
:param remove_atmospherics: Atmospherics such as <laugh>, <affirmative>, etc. will not
123
124
appear in the transcript.
124
125
:param speakers_count: Use to specify the total number of unique speakers in the audio.
126
+ :param diarization_type: Use to specify diarization type.
125
127
:param summarization_config: Use to request transcript summary.
126
128
:param translation_config: Use to request transcript translation.
127
129
:returns: raw response data
128
130
:raises: HTTPError
129
131
"""
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 ,
140
156
summarization_config = summarization_config ,
141
157
translation_config = translation_config )
142
158
@@ -172,6 +188,7 @@ def submit_job_local_file(
172
188
skip_postprocessing = False ,
173
189
remove_atmospherics = False ,
174
190
speakers_count = None ,
191
+ diarization_type = None ,
175
192
summarization_config : SummarizationOptions = None ,
176
193
translation_config : TranslationOptions = None ):
177
194
"""Submit a local file for transcription.
@@ -220,6 +237,7 @@ def submit_job_local_file(
220
237
:param remove_atmospherics: Atmospherics such as <laugh>, <affirmative>, etc. will not
221
238
appear in the transcript.
222
239
:param speakers_count: Use to specify the total number of unique speakers in the audio.
240
+ :param diarization_type: Use to specify diarization type.
223
241
:param summarization_config: Use to request transcript summary.
224
242
:param translation_config: Use to request transcript translation.
225
243
:returns: raw response data
@@ -228,15 +246,30 @@ def submit_job_local_file(
228
246
if not filename :
229
247
raise ValueError ('filename must be provided' )
230
248
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 ,
240
273
summarization_config = summarization_config ,
241
274
translation_config = translation_config )
242
275
@@ -714,6 +747,7 @@ def _create_job_options_payload(
714
747
skip_postprocessing = False ,
715
748
remove_atmospherics = None ,
716
749
speakers_count = None ,
750
+ diarization_type = None ,
717
751
summarization_config : SummarizationOptions = None ,
718
752
translation_config : TranslationOptions = None ):
719
753
payload = {}
@@ -764,6 +798,8 @@ def _create_job_options_payload(
764
798
payload ['remove_atmospherics' ] = remove_atmospherics
765
799
if speakers_count :
766
800
payload ['speakers_count' ] = speakers_count
801
+ if diarization_type :
802
+ payload ['diarization_type' ] = diarization_type
767
803
if summarization_config :
768
804
payload ['summarization_config' ] = summarization_config .to_dict ()
769
805
if translation_config :
0 commit comments