1515from ..types .do_dubbing_response import DoDubbingResponse
1616from ..types .dubbing_metadata_response import DubbingMetadataResponse
1717from ..types .http_validation_error import HttpValidationError
18+ from .types .get_transcript_for_dub_v_1_dubbing_dubbing_id_transcript_language_code_get_request_format_type import (
19+ GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType ,
20+ )
1821
1922# this is used as the default value for optional parameters
2023OMIT = typing .cast (typing .Any , ...)
@@ -394,7 +397,14 @@ def get_dubbed_file(
394397 raise ApiError (status_code = _response .status_code , body = _response_json )
395398
396399 def get_transcript_for_dub (
397- self , dubbing_id : str , language_code : str , * , request_options : typing .Optional [RequestOptions ] = None
400+ self ,
401+ dubbing_id : str ,
402+ language_code : str ,
403+ * ,
404+ format_type : typing .Optional [
405+ GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
406+ ] = None ,
407+ request_options : typing .Optional [RequestOptions ] = None ,
398408 ) -> typing .Any :
399409 """
400410 Returns transcript for the dub as an SRT file.
@@ -407,6 +417,9 @@ def get_transcript_for_dub(
407417 language_code : str
408418 ID of the language.
409419
420+ format_type : typing.Optional[GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType]
421+ Format to use for the subtitle file, either 'srt' or 'webvtt'
422+
410423 request_options : typing.Optional[RequestOptions]
411424 Request-specific configuration.
412425
@@ -434,7 +447,16 @@ def get_transcript_for_dub(
434447 f"v1/dubbing/{ jsonable_encoder (dubbing_id )} /transcript/{ jsonable_encoder (language_code )} " ,
435448 ),
436449 params = jsonable_encoder (
437- request_options .get ("additional_query_parameters" ) if request_options is not None else None
450+ remove_none_from_dict (
451+ {
452+ "format_type" : format_type ,
453+ ** (
454+ request_options .get ("additional_query_parameters" , {})
455+ if request_options is not None
456+ else {}
457+ ),
458+ }
459+ )
438460 ),
439461 headers = jsonable_encoder (
440462 remove_none_from_dict (
@@ -837,7 +859,14 @@ async def get_dubbed_file(
837859 raise ApiError (status_code = _response .status_code , body = _response_json )
838860
839861 async def get_transcript_for_dub (
840- self , dubbing_id : str , language_code : str , * , request_options : typing .Optional [RequestOptions ] = None
862+ self ,
863+ dubbing_id : str ,
864+ language_code : str ,
865+ * ,
866+ format_type : typing .Optional [
867+ GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType
868+ ] = None ,
869+ request_options : typing .Optional [RequestOptions ] = None ,
841870 ) -> typing .Any :
842871 """
843872 Returns transcript for the dub as an SRT file.
@@ -850,6 +879,9 @@ async def get_transcript_for_dub(
850879 language_code : str
851880 ID of the language.
852881
882+ format_type : typing.Optional[GetTranscriptForDubV1DubbingDubbingIdTranscriptLanguageCodeGetRequestFormatType]
883+ Format to use for the subtitle file, either 'srt' or 'webvtt'
884+
853885 request_options : typing.Optional[RequestOptions]
854886 Request-specific configuration.
855887
@@ -877,7 +909,16 @@ async def get_transcript_for_dub(
877909 f"v1/dubbing/{ jsonable_encoder (dubbing_id )} /transcript/{ jsonable_encoder (language_code )} " ,
878910 ),
879911 params = jsonable_encoder (
880- request_options .get ("additional_query_parameters" ) if request_options is not None else None
912+ remove_none_from_dict (
913+ {
914+ "format_type" : format_type ,
915+ ** (
916+ request_options .get ("additional_query_parameters" , {})
917+ if request_options is not None
918+ else {}
919+ ),
920+ }
921+ )
881922 ),
882923 headers = jsonable_encoder (
883924 remove_none_from_dict (
0 commit comments