GoogleVertexCloudSpeechModel
Namespace: Vercel.AI.Google
public sealed class GoogleVertexCloudSpeechModel : ISpeechModelCloud Text-to-Speech text:synthesize for Chirp 3 HD voices.
Inheritance: object
Implements: ISpeechModel
Constructors
Section titled “Constructors”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 |
Fields
Section titled “Fields”SynthesizeUrl
Section titled “SynthesizeUrl”public const string SynthesizeUrl = "https://texttospeech.googleapis.com/v1/text:synthesize"Synthesize endpoint. Cloud TTS uses one non-regional host.
Value: string
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
Warnings
Section titled “Warnings”public IReadOnlyList<GoogleWarning> Warnings { get; }Warnings from the last call.
Value: IReadOnlyList<GoogleWarning>
Methods
Section titled “Methods”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>
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
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product