Skip to content

GoogleVertexGeminiTranscriptionModel

Namespace: Vercel.AI.Google

public sealed class GoogleVertexGeminiTranscriptionModel : ITranscriptionModel, ITranscriptionCaller

Vertex Gemini transcription through generateContent.

Inheritance: object

Implements: ITranscriptionModel, ITranscriptionCaller

View source

GoogleVertexGeminiTranscriptionModel(GoogleVertexProvider, string)

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

Creates a Gemini transcription model.

Parameters

Name Type Description
provider GoogleVertexProvider
modelId string

View source

public bool CanStream { get; }

False. The Vertex Live WebSocket is not opened by this port.

Value: bool

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

public string SpecificationVersion { get; }

Specification version.

Value: string

View source

DoGenerateAsync(TranscriptionModelCall, CancellationToken)

Section titled “DoGenerateAsync(TranscriptionModelCall, CancellationToken)”
public Task<TranscriptionModelResult> DoGenerateAsync(TranscriptionModelCall call, CancellationToken cancellationToken)

Transcribes audio. Options are read from googleVertex, then vertex, then google. Text parts win over the audioTranscription text, which also carries the language and word timings.

Parameters

Name Type Description
call TranscriptionModelCall
cancellationToken CancellationToken

Returns: Task<TranscriptionModelResult>

View source

DoStreamAsync(TranscriptionStreamCall, CancellationToken)

Section titled “DoStreamAsync(TranscriptionStreamCall, CancellationToken)”
public Task<TranscriptionStreamStart?> DoStreamAsync(TranscriptionStreamCall call, CancellationToken cancellationToken)

Returns null. The Vertex Live WebSocket is not opened by this port.

Parameters

Name Type Description
call TranscriptionStreamCall
cancellationToken CancellationToken

Returns: Task<TranscriptionStreamStart>

View source

DoTranscribeAsync(AudioInput, CancellationToken)

Section titled “DoTranscribeAsync(AudioInput, CancellationToken)”
public Task<TranscriptionResult> DoTranscribeAsync(AudioInput audio, CancellationToken cancellationToken)

Transcribes audio.

Parameters

Name Type Description
audio AudioInput
cancellationToken CancellationToken

Returns: Task<TranscriptionResult>

View source

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