Skip to main content

Class: WhisperCppTranscriptionModel

Hierarchy

Implements

Accessors

modelInformation

get modelInformation(): ModelInformation

Returns

ModelInformation

Implementation of

TranscriptionModel.modelInformation

Inherited from

AbstractModel.modelInformation

Defined in

packages/modelfusion/src/model-function/AbstractModel.ts:17


settingsForEvent

get settingsForEvent(): Partial<WhisperCppTranscriptionModelSettings>

Returns settings that should be recorded in observability events. Security-related settings (e.g. API keys) should not be included here.

Returns

Partial<WhisperCppTranscriptionModelSettings>

Implementation of

TranscriptionModel.settingsForEvent

Overrides

AbstractModel.settingsForEvent

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:110

Constructors

constructor

new WhisperCppTranscriptionModel(settings): WhisperCppTranscriptionModel

Parameters

NameType
settingsWhisperCppTranscriptionModelSettings

Returns

WhisperCppTranscriptionModel

Overrides

AbstractModel&lt;WhisperCppTranscriptionModelSettings&gt;.constructor

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:32

Methods

callAPI

callAPI(input, callOptions): Promise<{ text: string }>

Parameters

NameType
inputObject
input.audioDataUint8Array
input.fileExtensionstring
callOptionsFunctionCallOptions

Returns

Promise<{ text: string }>

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:63


doTranscribe

doTranscribe(«destructured», options): Promise<{ rawResponse: { text: string } ; transcription: string = rawResponse.text }>

Parameters

NameType
«destructured»Object
› audioDataDataContent
› mimeTypestring
optionsFunctionCallOptions

Returns

Promise<{ rawResponse: { text: string } ; transcription: string = rawResponse.text }>

Implementation of

TranscriptionModel.doTranscribe

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:39


withSettings

withSettings(additionalSettings): WhisperCppTranscriptionModel

The withSettings method creates a new model with the same configuration as the original model, but with the specified settings changed.

Parameters

NameType
additionalSettingsWhisperCppTranscriptionModelSettings

Returns

WhisperCppTranscriptionModel

Example

const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});

const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});

Implementation of

TranscriptionModel.withSettings

Overrides

AbstractModel.withSettings

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:116

Properties

modelName

Readonly modelName: null

Overrides

AbstractModel.modelName

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:37


provider

Readonly provider: "whispercpp"

Overrides

AbstractModel.provider

Defined in

packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:36


settings

Readonly settings: WhisperCppTranscriptionModelSettings

Implementation of

TranscriptionModel.settings

Inherited from

AbstractModel.settings

Defined in

packages/modelfusion/src/model-function/AbstractModel.ts:7