diff --git a/packages/sdk-js/src/v2/live/generated-types.ts b/packages/sdk-js/src/v2/live/generated-types.ts index 83ddbf7..97672cc 100644 --- a/packages/sdk-js/src/v2/live/generated-types.ts +++ b/packages/sdk-js/src/v2/live/generated-types.ts @@ -252,7 +252,7 @@ export type LiveV2TranslationLanguageCode = | 'yo' | 'zh' -export type LiveV2TranslationModel = 'base' | 'enhanced' +export type LiveV2TranslationModel = 'base' | 'batch' | 'enhanced' export interface LiveV2TranslationConfig { /** Target language in `iso639-1` format you want the transcription translated to */ @@ -302,7 +302,7 @@ export interface LiveV2PostProcessingConfig { summarization?: boolean /** Summarization configuration, if `summarization` is enabled */ summarization_config?: LiveV2SummarizationConfig - /** If true, generates chapters for the whole transcription. */ + /** Deprecated: this parameter is ignored. */ chapterization?: boolean } @@ -558,19 +558,6 @@ export interface LiveV2SentimentAnalysis { results: string } -export interface LiveV2Chapterization { - /** The audio intelligence model succeeded to get a valid output */ - success: boolean - /** The audio intelligence model returned an empty value */ - is_empty: boolean - /** Time audio intelligence model took to complete the task */ - exec_time: number - /** `null` if `success` is `true`. Contains the error details of the failed model */ - error: LiveV2AddonError | null - /** If `chapterization` has been enabled, will generate chapters name for different parts of the given audio. */ - results: Record -} - export interface LiveV2TranscriptionResultWithMessages { /** Metadata for the given transcription & audio file */ metadata: LiveV2TranscriptionMetadata @@ -584,8 +571,6 @@ export interface LiveV2TranscriptionResultWithMessages { named_entity_recognition?: LiveV2NamedEntityRecognition /** If `sentiment_analysis` has been enabled, sentiment analysis of the audio speech transcription */ sentiment_analysis?: LiveV2SentimentAnalysis - /** If `chapterization` has been enabled, will generate chapters name for different parts of the given audio. */ - chapterization?: LiveV2Chapterization /** Real-Time messages sent by the server during the live transcription */ messages?: Array } @@ -629,31 +614,6 @@ export interface LiveV2NamedEntityRecognitionData { results: Array } -export interface LiveV2ChapterizationSentence { - sentence: string - start: number - end: number - words: Array -} - -export interface LiveV2PostChapterizationResult { - abstractive_summary?: string - extractive_summary?: string - summary?: string - headline: string - gist: string - keywords: Array - start: number - end: number - sentences: Array - text: string -} - -export interface LiveV2PostChapterizationMessageData { - /** The chapters */ - results: Array -} - export interface LiveV2TranscriptionResult { /** Metadata for the given transcription & audio file */ metadata: LiveV2TranscriptionMetadata @@ -667,8 +627,6 @@ export interface LiveV2TranscriptionResult { named_entity_recognition?: LiveV2NamedEntityRecognition /** If `sentiment_analysis` has been enabled, sentiment analysis of the audio speech transcription */ sentiment_analysis?: LiveV2SentimentAnalysis - /** If `chapterization` has been enabled, will generate chapters name for different parts of the given audio. */ - chapterization?: LiveV2Chapterization } export interface LiveV2PostSummarizationMessageData { @@ -867,18 +825,6 @@ export interface LiveV2NamedEntityRecognitionMessage { data: LiveV2NamedEntityRecognitionData | null } -export interface LiveV2PostChapterizationMessage { - /** Id of the live session */ - session_id: string - /** Date of creation of the message. The date is formatted as an ISO 8601 string */ - created_at: string - /** Error message if the addon failed */ - error: LiveV2Error | null - type: 'post_chapterization' - /** The message data. "null" if the addon failed */ - data: LiveV2PostChapterizationMessageData | null -} - export interface LiveV2PostFinalTranscriptMessage { /** Id of the live session */ session_id: string @@ -990,7 +936,6 @@ export type LiveV2WebSocketMessage = | LiveV2EndSessionMessage | LiveV2TranslationMessage | LiveV2NamedEntityRecognitionMessage - | LiveV2PostChapterizationMessage | LiveV2PostFinalTranscriptMessage | LiveV2PostSummarizationMessage | LiveV2PostTranscriptMessage @@ -1043,14 +988,6 @@ export interface LiveV2CallbackNamedEntityRecognitionMessage { payload: LiveV2NamedEntityRecognitionMessage } -export interface LiveV2CallbackPostChapterizationMessage { - /** Id of the job */ - id: string - event: 'live.post_chapterization' - /** The live message payload as sent to the WebSocket */ - payload: LiveV2PostChapterizationMessage -} - export interface LiveV2CallbackPostFinalTranscriptMessage { /** Id of the job */ id: string @@ -1138,7 +1075,6 @@ export type LiveV2CallbackMessage = | LiveV2CallbackEndSessionMessage | LiveV2CallbackTranslationMessage | LiveV2CallbackNamedEntityRecognitionMessage - | LiveV2CallbackPostChapterizationMessage | LiveV2CallbackPostFinalTranscriptMessage | LiveV2CallbackPostSummarizationMessage | LiveV2CallbackPostTranscriptMessage diff --git a/packages/sdk-js/src/v2/prerecorded/generated-types.ts b/packages/sdk-js/src/v2/prerecorded/generated-types.ts index 9343930..6dbc9e0 100644 --- a/packages/sdk-js/src/v2/prerecorded/generated-types.ts +++ b/packages/sdk-js/src/v2/prerecorded/generated-types.ts @@ -279,7 +279,7 @@ export type PreRecordedV2TranslationLanguageCode = | 'yo' | 'zh' -export type PreRecordedV2TranslationModel = 'base' | 'enhanced' +export type PreRecordedV2TranslationModel = 'base' | 'batch' | 'enhanced' export interface PreRecordedV2TranslationConfig { /** Target language in `iso639-1` format you want the transcription translated to */ @@ -415,6 +415,8 @@ export interface PreRecordedV2LanguageConfig { code_switching?: boolean } +export type PreRecordedV2TranscriptionModel = 'solaria-1' | 'solaria-3' | 'solaria-fusion' + export interface PreRecordedV2FileResponse { /** The file id */ id: string @@ -477,6 +479,8 @@ export interface PreRecordedV2RequestParamsResponse { punctuation_enhanced?: boolean /** Specify the language configuration */ language_config?: PreRecordedV2LanguageConfig + /** The model used to process the audio. "solaria-1" is used by default. */ + model?: PreRecordedV2TranscriptionModel audio_url: string | null } @@ -647,7 +651,7 @@ export interface PreRecordedV2NamesConsistency { /** `null` if `success` is `true`. Contains the error details of the failed model */ error: PreRecordedV2AddonError | null /** Deprecated, If `name_consistency` has been enabled, Gladia will improve the consistency of the names across the transcription */ - results: string + results: string | null } export interface PreRecordedV2StructuredDataExtraction { @@ -660,7 +664,7 @@ export interface PreRecordedV2StructuredDataExtraction { /** `null` if `success` is `true`. Contains the error details of the failed model */ error: PreRecordedV2AddonError | null /** If `structured_data_extraction` has been enabled, results of the AI structured data extraction for the defined classes. */ - results: string + results: string | null } export interface PreRecordedV2SentimentAnalysis { @@ -722,19 +726,6 @@ export interface PreRecordedV2DisplayMode { results: Array | null } -export interface PreRecordedV2Chapterization { - /** The audio intelligence model succeeded to get a valid output */ - success: boolean - /** The audio intelligence model returned an empty value */ - is_empty: boolean - /** Time audio intelligence model took to complete the task */ - exec_time: number - /** `null` if `success` is `true`. Contains the error details of the failed model */ - error: PreRecordedV2AddonError | null - /** If `chapterization` has been enabled, will generate chapters name for different parts of the given audio. */ - results: Record -} - export interface PreRecordedV2Diarization { /** The audio intelligence model succeeded to get a valid output */ success: boolean @@ -773,8 +764,6 @@ export interface PreRecordedV2TranscriptionResult { sentences?: PreRecordedV2Sentences /** If `display_mode` has been enabled, the output will be reordered, creating new utterances when speakers overlapped */ display_mode?: PreRecordedV2DisplayMode - /** If `chapterization` has been enabled, will generate chapters name for different parts of the given audio. */ - chapterization?: PreRecordedV2Chapterization /** If `diarization` has been requested and an error has occurred, the result will appear here */ diarization?: PreRecordedV2Diarization } @@ -845,6 +834,8 @@ export interface PreRecordedV2InitTranscriptionRequest { punctuation_enhanced?: boolean /** Specify the language configuration */ language_config?: PreRecordedV2LanguageConfig + /** The model used to process the audio. "solaria-1" is used by default. */ + model?: PreRecordedV2TranscriptionModel /** URL to a Gladia file or to an external audio or video file */ audio_url: string } diff --git a/packages/sdk-python/src/gladiaio_sdk/v2/live/generated_types.py b/packages/sdk-python/src/gladiaio_sdk/v2/live/generated_types.py index f63f526..049420c 100644 --- a/packages/sdk-python/src/gladiaio_sdk/v2/live/generated_types.py +++ b/packages/sdk-python/src/gladiaio_sdk/v2/live/generated_types.py @@ -284,7 +284,7 @@ class LiveV2CustomSpellingConfig(BaseDataClass): "zh", ] -LiveV2TranslationModel = Literal["base", "enhanced"] +LiveV2TranslationModel = Literal["base", "batch", "enhanced"] @dataclass(frozen=True, slots=True) @@ -341,7 +341,7 @@ class LiveV2PostProcessingConfig(BaseDataClass): summarization: bool | None = None # Summarization configuration, if `summarization` is enabled summarization_config: LiveV2SummarizationConfig | None = None - # If true, generates chapters for the whole transcription. + # Deprecated: this parameter is ignored. chapterization: bool | None = None @@ -618,21 +618,6 @@ class LiveV2SentimentAnalysis(BaseDataClass): error: LiveV2AddonError | None = None -@dataclass(frozen=True, slots=True) -class LiveV2Chapterization(BaseDataClass): - # The audio intelligence model succeeded to get a valid output - success: bool - # The audio intelligence model returned an empty value - is_empty: bool - # Time audio intelligence model took to complete the task - exec_time: float - # If `chapterization` has been enabled, will generate chapters name for different parts of the - # given audio. - results: dict[str, Any] - # `null` if `success` is `true`. Contains the error details of the failed model - error: LiveV2AddonError | None = None - - @dataclass(frozen=True, slots=True) class LiveV2TranscriptionResultWithMessages(BaseDataClass): # Metadata for the given transcription & audio file @@ -647,9 +632,6 @@ class LiveV2TranscriptionResultWithMessages(BaseDataClass): named_entity_recognition: LiveV2NamedEntityRecognition | None = None # If `sentiment_analysis` has been enabled, sentiment analysis of the audio speech transcription sentiment_analysis: LiveV2SentimentAnalysis | None = None - # If `chapterization` has been enabled, will generate chapters name for different parts of the - # given audio. - chapterization: LiveV2Chapterization | None = None # Real-Time messages sent by the server during the live transcription messages: list[str] | None = None @@ -698,34 +680,6 @@ class LiveV2NamedEntityRecognitionData(BaseDataClass): results: list[LiveV2NamedEntityRecognitionResult] -@dataclass(frozen=True, slots=True) -class LiveV2ChapterizationSentence(BaseDataClass): - sentence: str - start: float - end: float - words: list[LiveV2Word] - - -@dataclass(frozen=True, slots=True) -class LiveV2PostChapterizationResult(BaseDataClass): - headline: str - gist: str - keywords: list[str] - start: float - end: float - sentences: list[LiveV2ChapterizationSentence] - text: str - abstractive_summary: str | None = None - extractive_summary: str | None = None - summary: str | None = None - - -@dataclass(frozen=True, slots=True) -class LiveV2PostChapterizationMessageData(BaseDataClass): - # The chapters - results: list[LiveV2PostChapterizationResult] - - @dataclass(frozen=True, slots=True) class LiveV2TranscriptionResult(BaseDataClass): # Metadata for the given transcription & audio file @@ -740,9 +694,6 @@ class LiveV2TranscriptionResult(BaseDataClass): named_entity_recognition: LiveV2NamedEntityRecognition | None = None # If `sentiment_analysis` has been enabled, sentiment analysis of the audio speech transcription sentiment_analysis: LiveV2SentimentAnalysis | None = None - # If `chapterization` has been enabled, will generate chapters name for different parts of the - # given audio. - chapterization: LiveV2Chapterization | None = None @dataclass(frozen=True, slots=True) @@ -962,19 +913,6 @@ class LiveV2NamedEntityRecognitionMessage(BaseDataClass): data: LiveV2NamedEntityRecognitionData | None = None -@dataclass(frozen=True, slots=True) -class LiveV2PostChapterizationMessage(BaseDataClass): - # Id of the live session - session_id: str - # Date of creation of the message. The date is formatted as an ISO 8601 string - created_at: str - type: Literal["post_chapterization"] - # Error message if the addon failed - error: LiveV2Error | None = None - # The message data. "null" if the addon failed - data: LiveV2PostChapterizationMessageData | None = None - - @dataclass(frozen=True, slots=True) class LiveV2PostFinalTranscriptMessage(BaseDataClass): # Id of the live session @@ -1096,7 +1034,6 @@ class LiveV2SpeechEndMessage(BaseDataClass): | LiveV2EndSessionMessage | LiveV2TranslationMessage | LiveV2NamedEntityRecognitionMessage - | LiveV2PostChapterizationMessage | LiveV2PostFinalTranscriptMessage | LiveV2PostSummarizationMessage | LiveV2PostTranscriptMessage @@ -1114,7 +1051,6 @@ class LiveV2SpeechEndMessage(BaseDataClass): "end_session": LiveV2EndSessionMessage, "translation": LiveV2TranslationMessage, "named_entity_recognition": LiveV2NamedEntityRecognitionMessage, - "post_chapterization": LiveV2PostChapterizationMessage, "post_final_transcript": LiveV2PostFinalTranscriptMessage, "post_summarization": LiveV2PostSummarizationMessage, "post_transcript": LiveV2PostTranscriptMessage, @@ -1198,15 +1134,6 @@ class LiveV2CallbackNamedEntityRecognitionMessage(BaseDataClass): payload: LiveV2NamedEntityRecognitionMessage -@dataclass(frozen=True, slots=True) -class LiveV2CallbackPostChapterizationMessage(BaseDataClass): - # Id of the job - id: str - event: Literal["live.post_chapterization"] - # The live message payload as sent to the WebSocket - payload: LiveV2PostChapterizationMessage - - @dataclass(frozen=True, slots=True) class LiveV2CallbackPostFinalTranscriptMessage(BaseDataClass): # Id of the job @@ -1304,7 +1231,6 @@ class LiveV2CallbackSpeechEndMessage(BaseDataClass): | LiveV2CallbackEndSessionMessage | LiveV2CallbackTranslationMessage | LiveV2CallbackNamedEntityRecognitionMessage - | LiveV2CallbackPostChapterizationMessage | LiveV2CallbackPostFinalTranscriptMessage | LiveV2CallbackPostSummarizationMessage | LiveV2CallbackPostTranscriptMessage @@ -1322,7 +1248,6 @@ class LiveV2CallbackSpeechEndMessage(BaseDataClass): "live.end_session": LiveV2CallbackEndSessionMessage, "live.translation": LiveV2CallbackTranslationMessage, "live.named_entity_recognition": LiveV2CallbackNamedEntityRecognitionMessage, - "live.post_chapterization": LiveV2CallbackPostChapterizationMessage, "live.post_final_transcript": LiveV2CallbackPostFinalTranscriptMessage, "live.post_summarization": LiveV2CallbackPostSummarizationMessage, "live.post_transcript": LiveV2CallbackPostTranscriptMessage, diff --git a/packages/sdk-python/src/gladiaio_sdk/v2/prerecorded/generated_types.py b/packages/sdk-python/src/gladiaio_sdk/v2/prerecorded/generated_types.py index e450a45..161095d 100644 --- a/packages/sdk-python/src/gladiaio_sdk/v2/prerecorded/generated_types.py +++ b/packages/sdk-python/src/gladiaio_sdk/v2/prerecorded/generated_types.py @@ -310,7 +310,7 @@ class PreRecordedV2DiarizationConfig(BaseDataClass): "zh", ] -PreRecordedV2TranslationModel = Literal["base", "enhanced"] +PreRecordedV2TranslationModel = Literal["base", "batch", "enhanced"] @dataclass(frozen=True, slots=True) @@ -461,6 +461,9 @@ class PreRecordedV2LanguageConfig(BaseDataClass): code_switching: bool | None = None +PreRecordedV2TranscriptionModel = Literal["solaria-1", "solaria-3", "solaria-fusion"] + + @dataclass(frozen=True, slots=True) class PreRecordedV2FileResponse(BaseDataClass): # The file id @@ -529,6 +532,8 @@ class PreRecordedV2RequestParamsResponse(BaseDataClass): punctuation_enhanced: bool | None = None # Specify the language configuration language_config: PreRecordedV2LanguageConfig | None = None + # The model used to process the audio. "solaria-1" is used by default. + model: PreRecordedV2TranscriptionModel | None = None @dataclass(frozen=True, slots=True) @@ -709,11 +714,11 @@ class PreRecordedV2NamesConsistency(BaseDataClass): is_empty: bool # Time audio intelligence model took to complete the task exec_time: float - # Deprecated, If `name_consistency` has been enabled, Gladia will improve the consistency of the - # names across the transcription - results: str # `null` if `success` is `true`. Contains the error details of the failed model error: PreRecordedV2AddonError | None = None + # Deprecated, If `name_consistency` has been enabled, Gladia will improve the consistency of the + # names across the transcription + results: str | None = None @dataclass(frozen=True, slots=True) @@ -724,11 +729,11 @@ class PreRecordedV2StructuredDataExtraction(BaseDataClass): is_empty: bool # Time audio intelligence model took to complete the task exec_time: float - # If `structured_data_extraction` has been enabled, results of the AI structured data extraction - # for the defined classes. - results: str # `null` if `success` is `true`. Contains the error details of the failed model error: PreRecordedV2AddonError | None = None + # If `structured_data_extraction` has been enabled, results of the AI structured data extraction + # for the defined classes. + results: str | None = None @dataclass(frozen=True, slots=True) @@ -796,21 +801,6 @@ class PreRecordedV2DisplayMode(BaseDataClass): results: list[str] | None = None -@dataclass(frozen=True, slots=True) -class PreRecordedV2Chapterization(BaseDataClass): - # The audio intelligence model succeeded to get a valid output - success: bool - # The audio intelligence model returned an empty value - is_empty: bool - # Time audio intelligence model took to complete the task - exec_time: float - # If `chapterization` has been enabled, will generate chapters name for different parts of the - # given audio. - results: dict[str, Any] - # `null` if `success` is `true`. Contains the error details of the failed model - error: PreRecordedV2AddonError | None = None - - @dataclass(frozen=True, slots=True) class PreRecordedV2Diarization(BaseDataClass): # The audio intelligence model succeeded to get a valid output @@ -854,9 +844,6 @@ class PreRecordedV2TranscriptionResult(BaseDataClass): # If `display_mode` has been enabled, the output will be reordered, creating new utterances when # speakers overlapped display_mode: PreRecordedV2DisplayMode | None = None - # If `chapterization` has been enabled, will generate chapters name for different parts of the - # given audio. - chapterization: PreRecordedV2Chapterization | None = None # If `diarization` has been requested and an error has occurred, the result will appear here diarization: PreRecordedV2Diarization | None = None @@ -936,6 +923,8 @@ class PreRecordedV2InitTranscriptionRequest(BaseDataClass): punctuation_enhanced: bool | None = None # Specify the language configuration language_config: PreRecordedV2LanguageConfig | None = None + # The model used to process the audio. "solaria-1" is used by default. + model: PreRecordedV2TranscriptionModel | None = None @dataclass(frozen=True, slots=True)