Class: WhisperCppTranscriptionModel
Hierarchy
-
AbstractModel
<WhisperCppTranscriptionModelSettings
>↳
WhisperCppTranscriptionModel
Implements
Accessors
modelInformation
• get
modelInformation(): ModelInformation
Returns
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
Name | Type |
---|---|
settings | WhisperCppTranscriptionModelSettings |
Returns
Overrides
AbstractModel<WhisperCppTranscriptionModelSettings>.constructor
Defined in
packages/modelfusion/src/model-provider/whispercpp/WhisperCppTranscriptionModel.ts:32
Methods
callAPI
▸ callAPI(input
, callOptions
): Promise
<{ text
: string
}>
Parameters
Name | Type |
---|---|
input | Object |
input.audioData | Uint8Array |
input.fileExtension | string |
callOptions | FunctionCallOptions |
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
Name | Type |
---|---|
«destructured» | Object |
› audioData | DataContent |
› mimeType | string |
options | FunctionCallOptions |
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
Name | Type |
---|---|
additionalSettings | WhisperCppTranscriptionModelSettings |
Returns
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
Inherited from
AbstractModel.settings