Skip to content

TranscriptionEndEvent

Namespace: Vercel.AI.Operations

public sealed class TranscriptionEndEvent : IOperationEndEvent

Event passed to telemetry when CancellationToken) completes. Raw audio is not included. Maps to TranscriptionEndEvent.

Inheritance: object

Implements: IOperationEndEvent

View source

TranscriptionEndEvent(string, string, string, TranscriptionAudioInfo, string, IReadOnlyList<TranscriptSegment>, IReadOnlyList<TranscriptSegment>?, string?, double?, JsonElement?, IReadOnlyList<OperationWarning>, JsonElement?, ProviderResponse, bool?, bool?, string?)

Section titled “TranscriptionEndEvent(string, string, string, TranscriptionAudioInfo, string, IReadOnlyList<TranscriptSegment>, IReadOnlyList<TranscriptSegment>?, string?, double?, JsonElement?, IReadOnlyList<OperationWarning>, JsonElement?, ProviderResponse, bool?, bool?, string?)”
public TranscriptionEndEvent(string callId, string provider, string modelId, TranscriptionAudioInfo audio, string text, IReadOnlyList<TranscriptSegment> segments, IReadOnlyList<TranscriptSegment>? words, string? language, double? durationInSeconds, JsonElement? usage, IReadOnlyList<OperationWarning> warnings, JsonElement? providerMetadata, ProviderResponse response, bool? recordInputs = null, bool? recordOutputs = null, string? functionId = null)

Creates the event.

Parameters

Name Type Description
callId string
provider string
modelId string
audio TranscriptionAudioInfo
text string
segments IReadOnlyList<TranscriptSegment>
words IReadOnlyList<TranscriptSegment>
language string
durationInSeconds double?
usage JsonElement?
warnings IReadOnlyList<OperationWarning>
providerMetadata JsonElement?
response ProviderResponse
recordInputs bool?
recordOutputs bool?
functionId string

View source

public string? AiVersion { get; init; }

The version of the SDK that emitted the event. Set only on events sent to telemetry integrations. Maps to aiVersion.

Value: string

View source

public TranscriptionAudioInfo Audio { get; }

Input audio metadata. Byte length and media type are unknown for native URL transcription.

Value: TranscriptionAudioInfo

View source

public string CallId { get; }

Unique identifier for this call.

Value: string

View source

public double? DurationInSeconds { get; }

Duration of the input audio, when available.

Value: double?

View source

public string? FunctionId { get; }

Copied from FunctionId.

Value: string

View source

public string? Language { get; }

Detected language.

Value: string

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string OperationId { get; }

ai.transcribe.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

public JsonElement? ProviderMetadata { get; }

Provider metadata. Hidden when inputs or outputs are not recorded.

Value: JsonElement?

View source

public bool? RecordInputs { get; }

Copied from RecordInputs.

Value: bool?

View source

public bool? RecordOutputs { get; }

Copied from RecordOutputs.

Value: bool?

View source

public ProviderResponse Response { get; }

Response metadata.

Value: ProviderResponse

View source

public IReadOnlyList<TranscriptSegment> Segments { get; }

Segments with timing information.

Value: IReadOnlyList<TranscriptSegment>

View source

public string Text { get; }

The complete transcript.

Value: string

View source

public JsonElement? Usage { get; }

Usage reported by the provider, when available.

Value: JsonElement?

View source

public IReadOnlyList<OperationWarning> Warnings { get; }

Warnings from the transcription model.

Value: IReadOnlyList<OperationWarning>

View source

public IReadOnlyList<TranscriptSegment>? Words { get; }

Word timings returned by the provider, whether requested or returned by default.

Value: IReadOnlyList<TranscriptSegment>

View source

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