Skip to content

FalSpeechModel

Namespace: Vercel.AI.Fal

public sealed class FalSpeechModel : ISpeechModel, ISpeechCaller

Fal text-to-speech model. Posts to https://fal.run/{modelId} and downloads the returned audio.

Inheritance: object

Implements: ISpeechModel, ISpeechCaller

View source

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

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

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

Parameters

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

View source

public string ModelId { get; }

Model id.

Value: string

View source

public string Provider { get; }

Provider id.

Value: string

View source

DoGenerateAsync(SpeechModelCall, CancellationToken)

Section titled “DoGenerateAsync(SpeechModelCall, CancellationToken)”
public Task<SpeechModelResult> DoGenerateAsync(SpeechModelCall call, CancellationToken cancellationToken)

Generates speech audio.

Parameters

Name Type Description
call SpeechModelCall
cancellationToken CancellationToken

Returns: Task<SpeechModelResult>

View source

DoGenerateAsync(SpeechCallOptions, CancellationToken)

Section titled “DoGenerateAsync(SpeechCallOptions, CancellationToken)”
public Task<SpeechResult> DoGenerateAsync(SpeechCallOptions options, CancellationToken cancellationToken)

Synthesizes speech.

Parameters

Name Type Description
options SpeechCallOptions
cancellationToken CancellationToken

Returns: Task<SpeechResult>

View source

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