Skip to content

GoogleSpeechTranslation

Namespace: Vercel.AI.Google

public static class GoogleSpeechTranslation

Speech translation configuration for the Gemini Live API. The socket itself is not opened here.

Inheritance: object

View source

public const string LivePath = "google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent"

Live translation WebSocket path.

Value: string

View source

public static IReadOnlyList<GoogleWarning> WarningsFor(string? sourceLanguage, string? outputAudioFormat)

Warnings for options the Live translation API does not accept.

Parameters

Name Type Description
sourceLanguage string
outputAudioFormat string

Returns: IReadOnlyList<GoogleWarning>

View source

public static Uri WebSocketUrl(string baseUrl, string? apiKey)

Builds a wss URL and strips a trailing /v1beta or /v1alpha segment.

Parameters

Name Type Description
baseUrl string
apiKey string

Returns: Uri

View source

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