@@ -597,6 +597,13 @@ class RawTranscriptionConfig(BaseModel):
597
597
"""
598
598
The speech model to use for the transcription.
599
599
"""
600
+
601
+ prompt : Optional [str ] = None
602
+ "The prompt used to generate the transcript with the Slam-1 speech model. Can't be used together with `keyterms_prompt`."
603
+
604
+ keyterms_prompt : Optional [List [str ]] = None
605
+ "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`."
606
+
600
607
model_config = ConfigDict (extra = "allow" )
601
608
602
609
@@ -640,6 +647,8 @@ def __init__(
640
647
speech_threshold : Optional [float ] = None ,
641
648
raw_transcription_config : Optional [RawTranscriptionConfig ] = None ,
642
649
speech_model : Optional [SpeechModel ] = None ,
650
+ prompt : Optional [str ] = None ,
651
+ keyterms_prompt : Optional [List [str ]] = None ,
643
652
) -> None :
644
653
"""
645
654
Args:
@@ -728,6 +737,8 @@ def __init__(
728
737
self .language_confidence_threshold = language_confidence_threshold
729
738
self .speech_threshold = speech_threshold
730
739
self .speech_model = speech_model
740
+ self .prompt = prompt
741
+ self .keyterms_prompt = keyterms_prompt
731
742
732
743
@property
733
744
def raw (self ) -> RawTranscriptionConfig :
@@ -756,6 +767,26 @@ def speech_model(self, speech_model: Optional[SpeechModel]) -> None:
756
767
"Sets the speech model to use for the transcription."
757
768
self ._raw_transcription_config .speech_model = speech_model
758
769
770
+ @property
771
+ def prompt (self ) -> Optional [str ]:
772
+ "The prompt to use for the transcription."
773
+ return self ._raw_transcription_config .prompt
774
+
775
+ @prompt .setter
776
+ def prompt (self , prompt : Optional [str ]) -> None :
777
+ "Sets the prompt to use for the transcription."
778
+ self ._raw_transcription_config .prompt = prompt
779
+
780
+ @property
781
+ def keyterms_prompt (self ) -> Optional [List [str ]]:
782
+ "The keyterms_prompt to use for the transcription."
783
+ return self ._raw_transcription_config .keyterms_prompt
784
+
785
+ @keyterms_prompt .setter
786
+ def keyterms_prompt (self , keyterms_prompt : Optional [List [str ]]) -> None :
787
+ "Sets the prompt to use for the transcription."
788
+ self ._raw_transcription_config .keyterms_prompt = keyterms_prompt
789
+
759
790
@property
760
791
def punctuate (self ) -> Optional [bool ]:
761
792
"Returns the status of the Automatic Punctuation feature."
0 commit comments