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.
Structured speech metadata associated with a TextPart.
Used to guide speech generation for a specific piece of text, such as identifying which speaker says it and the vocal style they should use.
Signature:
export interface SpeechMetadata
Properties
| Property | Type | Description |
|---|---|---|
| speaker | string | (Public Preview) Identifies which speaker is speaking this turn. When using a MultiSpeakerVoiceConfig, this should match the SpeakerVoiceConfig.speaker of one of the configured speakers. |
| style | string | (Public Preview) A natural language description of the vocal style (such as "cheerful"). |
SpeechMetadata.speaker
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.
Identifies which speaker is speaking this turn. When using a MultiSpeakerVoiceConfig, this should match the SpeakerVoiceConfig.speaker of one of the configured speakers.
Signature:
speaker?: string;
SpeechMetadata.style
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.
A natural language description of the vocal style (such as "cheerful").
Signature:
style?: string;