@@ -961,6 +961,9 @@ class RawTranscriptionConfig(BaseModel):
961961 speech_understanding : Optional [SpeechUnderstandingRequest ] = None
962962 "Speech understanding configuration for LLM Gateway features"
963963
964+ domain : Optional [str ] = None
965+ "The domain to use for the transcription (e.g. 'medical-v1')."
966+
964967 model_config = ConfigDict (extra = "allow" )
965968
966969
@@ -1014,6 +1017,7 @@ def __init__(
10141017 keyterms_prompt : Optional [List [str ]] = None ,
10151018 keyterms_prompt_options : Optional [KeytermsPromptOptions ] = None ,
10161019 speech_understanding : Optional [SpeechUnderstandingRequest ] = None ,
1020+ domain : Optional [str ] = None ,
10171021 ) -> None :
10181022 """
10191023 Args:
@@ -1060,6 +1064,7 @@ def __init__(
10601064 temperature: Change how deterministic the response is, with 0 being the most deterministic and 1 being the least deterministic.
10611065 remove_audio_tags: When set to 'all', removes all bracketed audio/speaker tags from the transcript. Only supported for Universal-3 Pro.
10621066 keyterms_prompt_options: Options for controlling keyterms boosting behavior when using `keyterms_prompt`.
1067+ domain: The domain to use for the transcription (e.g. 'medical-v1').
10631068 """
10641069 self ._raw_transcription_config = (
10651070 raw_transcription_config
@@ -1118,6 +1123,7 @@ def __init__(
11181123 self .keyterms_prompt = keyterms_prompt
11191124 self .keyterms_prompt_options = keyterms_prompt_options
11201125 self .speech_understanding = speech_understanding
1126+ self .domain = domain
11211127
11221128 @property
11231129 def raw (self ) -> RawTranscriptionConfig :
@@ -1222,6 +1228,16 @@ def speech_understanding(
12221228 "Sets the speech understanding configuration for LLM Gateway features."
12231229 self ._raw_transcription_config .speech_understanding = speech_understanding
12241230
1231+ @property
1232+ def domain (self ) -> Optional [str ]:
1233+ "The domain used for the transcription."
1234+ return self ._raw_transcription_config .domain
1235+
1236+ @domain .setter
1237+ def domain (self , domain : Optional [str ]) -> None :
1238+ "Set the domain for the transcription."
1239+ self ._raw_transcription_config .domain = domain
1240+
12251241 @property
12261242 def punctuate (self ) -> Optional [bool ]:
12271243 "Returns the status of the Automatic Punctuation feature."
@@ -2321,13 +2337,25 @@ class BaseTranscript(BaseModel):
23212337 speech_understanding : Optional [SpeechUnderstandingRequest ] = None
23222338 "Speech understanding configuration for LLM Gateway features"
23232339
2340+ domain : Optional [str ] = None
2341+ "The domain used for the transcription."
2342+
23242343
23252344class TranscriptRequest (BaseTranscript ):
23262345 """
23272346 Transcript request schema
23282347 """
23292348
23302349
2350+ class TranscriptMetadata (BaseModel ):
2351+ "Metadata returned from the transcription API."
2352+
2353+ domain_used : Optional [str ] = None
2354+ "The domain that was actually used for the transcription."
2355+ warning : Optional [str ] = None
2356+ "An optional warning message, if applicable."
2357+
2358+
23312359class TranscriptResponse (BaseTranscript ):
23322360 """
23332361 Transcript response schema
@@ -2407,6 +2435,9 @@ class TranscriptResponse(BaseTranscript):
24072435 translated_texts : Optional [Dict [str , str ]] = None
24082436 "Translations of the full transcript text when translation is enabled"
24092437
2438+ metadata : Optional [TranscriptMetadata ] = None
2439+ "Metadata returned by the transcription API."
2440+
24102441 def __init__ (self , ** data : Any ):
24112442 # cleanup the response before creating the object
24122443 if not data .get ("iab_categories_result" ) or (
0 commit comments