@@ -331,6 +331,7 @@ def diarize(
331331 turn_level_confidence : bool = False ,
332332 exclusive : bool = False ,
333333 model : str = "precision-2" ,
334+ ** kwargs ,
334335 ) -> str :
335336 """Initiate a diarization job on the pyannoteAI web API
336337
@@ -354,6 +355,8 @@ def diarize(
354355 Defaults to False
355356 exclusive: bool, optional
356357 Defaults to False
358+ **kwargs : optional
359+ Extra arguments to send in the body of the request.
357360
358361 Returns
359362 -------
@@ -375,6 +378,8 @@ def diarize(
375378 "turn_level_confidence" : turn_level_confidence ,
376379 "exclusive" : exclusive ,
377380 }
381+ # add extra arguments to the request body
382+ json .update (kwargs )
378383
379384 response = self ._authenticated_post ("/diarize" , json = json )
380385 data = response .json ()
@@ -384,6 +389,7 @@ def voiceprint(
384389 self ,
385390 media_url : str ,
386391 model : str = "precision-2" ,
392+ ** kwargs ,
387393 ) -> str :
388394 """Initiate a voiceprint job on the pyannoteAI web API
389395
@@ -394,6 +400,8 @@ def voiceprint(
394400 any other public URL pointing to an audio file.
395401 model : str, optional
396402 Defaults to "precision-2".
403+ **kwargs : optional
404+ Extra arguments to send in the body of the request.
397405
398406 Returns
399407 -------
@@ -406,6 +414,8 @@ def voiceprint(
406414 """
407415
408416 json = {"url" : media_url , "model" : model }
417+ # add extra arguments to the request body
418+ json .update (kwargs )
409419
410420 response = self ._authenticated_post ("/voiceprint" , json = json )
411421 data = response .json ()
@@ -424,6 +434,7 @@ def identify(
424434 confidence : bool = False ,
425435 turn_level_confidence : bool = False ,
426436 exclusive : bool = False ,
437+ ** kwargs ,
427438 ) -> str :
428439 """Initiate an identification job on the pyannoteAI web API
429440
@@ -450,6 +461,8 @@ def identify(
450461 Maximum number of speakers. Has no effect when `num_speakers` is provided.
451462 confidence : bool, optional
452463 Defaults to False
464+ **kwargs : optional
465+ Extra arguments to send in the body of the request.
453466
454467 Returns
455468 -------
@@ -479,6 +492,8 @@ def identify(
479492 "threshold" : matching_threshold ,
480493 },
481494 }
495+ # add extra arguments to the request body
496+ json .update (kwargs )
482497
483498 response = self ._authenticated_post ("/identify" , json = json )
484499 data = response .json ()
0 commit comments