Skip to content

Commit 774fecc

Browse files
committed
add audio response modality and fix voiceName
1 parent 34d094d commit 774fecc

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

common/api-review/ai.api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ export const POSSIBLE_ROLES: readonly ["user", "model", "function", "system"];
866866

867867
// @beta
868868
export interface PrebuiltVoiceConfig {
869-
voiceConfig?: string;
869+
voiceName?: string;
870870
}
871871

872872
// @public
@@ -888,6 +888,7 @@ export interface RequestOptions {
888888
export const ResponseModality: {
889889
readonly TEXT: "TEXT";
890890
readonly IMAGE: "IMAGE";
891+
readonly AUDIO: "AUDIO";
891892
};
892893

893894
// @beta

docs-devsite/ai.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ Generation modalities to be returned in generation responses.
663663
ResponseModality: {
664664
readonly TEXT: "TEXT";
665665
readonly IMAGE: "IMAGE";
666+
readonly AUDIO: "AUDIO";
666667
}
667668
```
668669

docs-devsite/ai.prebuiltvoiceconfig.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export interface PrebuiltVoiceConfig
2525

2626
| Property | Type | Description |
2727
| --- | --- | --- |
28-
| [voiceConfig](./ai.prebuiltvoiceconfig.md#prebuiltvoiceconfigvoiceconfig) | string | <b><i>(Public Preview)</i></b> The voice name to use for speech synthesis.<!-- -->For a full list of names and demos of what each voice sounds like, see [Chirp 3: HD Voices](https://cloud.google.com/text-to-speech/docs/chirp3-hd)<!-- -->. |
28+
| [voiceName](./ai.prebuiltvoiceconfig.md#prebuiltvoiceconfigvoicename) | string | <b><i>(Public Preview)</i></b> The voice name to use for speech synthesis.<!-- -->For a full list of names and demos of what each voice sounds like, see [Chirp 3: HD Voices](https://cloud.google.com/text-to-speech/docs/chirp3-hd)<!-- -->. |
2929

30-
## PrebuiltVoiceConfig.voiceConfig
30+
## PrebuiltVoiceConfig.voiceName
3131

3232
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
3333
>
@@ -39,5 +39,5 @@ For a full list of names and demos of what each voice sounds like, see [Chirp 3:
3939
<b>Signature:</b>
4040

4141
```typescript
42-
voiceConfig?: string;
42+
voiceName?: string;
4343
```

packages/ai/src/types/enums.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,12 @@ export const ResponseModality = {
325325
* Image.
326326
* @beta
327327
*/
328-
IMAGE: 'IMAGE'
328+
IMAGE: 'IMAGE',
329+
/**
330+
* Audio.
331+
* @beta
332+
*/
333+
AUDIO: 'AUDIO'
329334
} as const;
330335

331336
/**

packages/ai/src/types/requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ export interface PrebuiltVoiceConfig {
369369
*
370370
* For a full list of names and demos of what each voice sounds like, see {@link https://cloud.google.com/text-to-speech/docs/chirp3-hd | Chirp 3: HD Voices}.
371371
*/
372-
voiceConfig?: string;
372+
voiceName?: string;
373373
}
374374

375375
/**

0 commit comments

Comments
 (0)