FalSpeechModel
Namespace: Vercel.AI.Fal
public sealed class FalSpeechModel : ISpeechModel, ISpeechCallerFal text-to-speech model. Posts to https://fal.run/{modelId} and downloads the returned audio.
Inheritance: object
Implements: ISpeechModel, ISpeechCaller
Constructors
Section titled “Constructors”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> |
Properties
Section titled “Properties”ModelId
Section titled “ModelId”public string ModelId { get; }Model id.
Value: string
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
Methods
Section titled “Methods”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>
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>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product