TranscriptionEndEvent
Namespace: Vercel.AI.Operations
public sealed class TranscriptionEndEvent : IOperationEndEventEvent passed to telemetry when CancellationToken) completes. Raw audio is not included. Maps to TranscriptionEndEvent.
Inheritance: object
Implements: IOperationEndEvent
Constructors
Section titled “Constructors”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 |
Properties
Section titled “Properties”AiVersion
Section titled “AiVersion”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
public TranscriptionAudioInfo Audio { get; }Input audio metadata. Byte length and media type are unknown for native URL transcription.
Value: TranscriptionAudioInfo
CallId
Section titled “CallId”public string CallId { get; }Unique identifier for this call.
Value: string
DurationInSeconds
Section titled “DurationInSeconds”public double? DurationInSeconds { get; }Duration of the input audio, when available.
Value: double?
FunctionId
Section titled “FunctionId”public string? FunctionId { get; }Copied from FunctionId.
Value: string
Language
Section titled “Language”public string? Language { get; }Detected language.
Value: string
ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
OperationId
Section titled “OperationId”public string OperationId { get; }ai.transcribe.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider metadata. Hidden when inputs or outputs are not recorded.
Value: JsonElement?
RecordInputs
Section titled “RecordInputs”public bool? RecordInputs { get; }Copied from RecordInputs.
Value: bool?
RecordOutputs
Section titled “RecordOutputs”public bool? RecordOutputs { get; }Copied from RecordOutputs.
Value: bool?
Response
Section titled “Response”public ProviderResponse Response { get; }Response metadata.
Value: ProviderResponse
Segments
Section titled “Segments”public IReadOnlyList<TranscriptSegment> Segments { get; }Segments with timing information.
Value: IReadOnlyList<TranscriptSegment>
public string Text { get; }The complete transcript.
Value: string
public JsonElement? Usage { get; }Usage reported by the provider, when available.
Value: JsonElement?
Warnings
Section titled “Warnings”public IReadOnlyList<OperationWarning> Warnings { get; }Warnings from the transcription model.
Value: IReadOnlyList<OperationWarning>
public IReadOnlyList<TranscriptSegment>? Words { get; }Word timings returned by the provider, whether requested or returned by default.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product