Skip to content

FishAudioProvider.FishSpeechModel

Namespace: Vercel.AI.FishAudio

public sealed class FishAudioProvider.FishSpeechModel : ISpeechModel, ISpeechCaller

Fish Audio speech model. Posts to /v1/tts and selects the model with a model header.

Inheritance: object

Implements: ISpeechModel, ISpeechCaller

View source

FishSpeechModel(FishAudioProvider, string, Func<DateTime>?)

Section titled “FishSpeechModel(FishAudioProvider, string, Func<DateTime>?)”
public FishSpeechModel(FishAudioProvider 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 FishAudioProvider
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

public string SpecificationVersion { get; }

Specification version.

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