Skip to content

FalTranscriptionModel

Namespace: Vercel.AI.Fal

public sealed class FalTranscriptionModel : ITranscriptionModel, ITranscriptionCaller

Fal transcription model. Submits the audio to the Fal queue and polls until the transcript is ready.

Inheritance: object

Implements: ITranscriptionModel, ITranscriptionCaller

View source

FalTranscriptionModel(FalProvider, string, Func<DateTime>?)

Section titled “FalTranscriptionModel(FalProvider, string, Func<DateTime>?)”
public FalTranscriptionModel(FalProvider provider, string modelId, Func<DateTime>? clock = null)

Creates a transcription model. <code class=“paramref”>clock</code> sets the response timestamp.

Parameters

Name Type Description
provider FalProvider
modelId string
clock Func<DateTime>

View source

public bool CanStream { get; }

True when CancellationToken) is implemented.

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.

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)

Starts a stream, or null when streaming is unsupported.

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