Skip to content

GoogleVertexCloudSpeechModel

Namespace: Vercel.AI.Google

public sealed class GoogleVertexCloudSpeechModel : ISpeechModel

Cloud Text-to-Speech text:synthesize for Chirp 3 HD voices.

Inheritance: object

Implements: ISpeechModel

View source

GoogleVertexCloudSpeechModel(GoogleVertexProvider, string)

Section titled “GoogleVertexCloudSpeechModel(GoogleVertexProvider, string)”
public GoogleVertexCloudSpeechModel(GoogleVertexProvider provider, string modelId)

Creates a Cloud TTS model.

Parameters

Name Type Description
provider GoogleVertexProvider
modelId string

View source

public const string SynthesizeUrl = "https://texttospeech.googleapis.com/v1/text:synthesize"

Synthesize endpoint. Cloud TTS uses one non-regional host.

Value: string

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

public IReadOnlyList<GoogleWarning> Warnings { get; }

Warnings from the last call.

Value: IReadOnlyList<GoogleWarning>

View source

DoGenerateAsync(SpeechCallOptions, CancellationToken)

Section titled “DoGenerateAsync(SpeechCallOptions, CancellationToken)”
public Task<SpeechResult> DoGenerateAsync(SpeechCallOptions options, CancellationToken cancellationToken)

Synthesizes speech.

Parameters

Name Type Description
options SpeechCallOptions
cancellationToken CancellationToken

Returns: Task<SpeechResult>

View source

Prepare(string, string?, string?, double?, string?)

Section titled “Prepare(string, string?, string?, double?, string?)”
public static GoogleSpeechPreparation Prepare(string text, string? voice, string? language, double? speed, string? instructions)

Builds the synthesize body.

Parameters

Name Type Description
text string
voice string
language string
speed double?
instructions string

Returns: GoogleSpeechPreparation

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product