@google/genai 2.9.0-rc.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -322,9 +322,14 @@ declare interface AudioChunk {
322
322
 
323
323
  /** The audio transcription configuration in Setup. */
324
324
  declare interface AudioTranscriptionConfig {
325
- /** The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio
326
- */
325
+ /** Deprecated: use LanguageAuto or LanguageHints instead. */
327
326
  languageCodes?: string[];
327
+ /** The model will detect the language automatically. Do not use together with LanguageHints. */
328
+ languageAuto?: LanguageAuto;
329
+ /** Specifies one or more languages in the audio. Do not use together with LanguageAuto. */
330
+ languageHints?: LanguageHints;
331
+ /** A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms. */
332
+ adaptationPhrases?: string[];
328
333
  }
329
334
 
330
335
  /**
@@ -4335,6 +4340,16 @@ declare enum Language {
4335
4340
  PYTHON = "PYTHON"
4336
4341
  }
4337
4342
 
4343
+ /** Indicates the language of the audio should be automatically detected. */
4344
+ declare interface LanguageAuto {
4345
+ }
4346
+
4347
+ /** Provides hints to the model about possible languages present in the audio. */
4348
+ declare interface LanguageHints {
4349
+ /** BCP-47 language codes. At least one must be specified. */
4350
+ languageCodes?: string[];
4351
+ }
4352
+
4338
4353
  /** An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. */
4339
4354
  declare interface LatLng {
4340
4355
  /** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
@@ -5084,6 +5099,8 @@ declare interface LiveServerContent {
5084
5099
  it is waiting for more input from the user, e.g. because it expects the
5085
5100
  user to continue talking. */
5086
5101
  waitingForInput?: boolean;
5102
+ /** Low latency transcription updated while the user is speaking. */
5103
+ interimInputTranscription?: Transcription;
5087
5104
  }
5088
5105
 
5089
5106
  /** Server will not be able to service client soon. */
@@ -7144,7 +7161,7 @@ declare enum TrafficType {
7144
7161
  PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT"
7145
7162
  }
7146
7163
 
7147
- /** Audio transcription in Server Conent. */
7164
+ /** Audio transcription in Server Content. */
7148
7165
  declare interface Transcription {
7149
7166
  /** Optional. Transcription text. */
7150
7167
  text?: string;
@@ -8081,6 +8098,8 @@ declare namespace types {
8081
8098
  SessionResumptionConfig,
8082
8099
  SlidingWindow,
8083
8100
  ContextWindowCompressionConfig,
8101
+ LanguageAuto,
8102
+ LanguageHints,
8084
8103
  AudioTranscriptionConfig,
8085
8104
  ProactivityConfig,
8086
8105
  CustomizedAvatar,
@@ -8734,6 +8753,8 @@ declare enum VideoOrientation {
8734
8753
  declare interface VoiceActivity {
8735
8754
  /** The type of the voice activity signal. */
8736
8755
  voiceActivityType?: VoiceActivityType;
8756
+ /** The time voice activity detected in audio time, relative to the start of the audio stream. */
8757
+ audioOffset?: string;
8737
8758
  }
8738
8759
 
8739
8760
  declare interface VoiceActivityDetectionSignal {
@@ -2146,7 +2146,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2146
2146
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2147
2147
  const USER_AGENT_HEADER = 'User-Agent';
2148
2148
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2149
- const SDK_VERSION = '2.9.0-rc.0'; // x-release-please-version
2149
+ const SDK_VERSION = '2.9.0'; // x-release-please-version
2150
2150
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2151
2151
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2152
2152
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';