Interface: StreamingSpeechGenerationModel<SETTINGS>
Type parameters
Name | Type |
---|---|
SETTINGS | extends SpeechGenerationModelSettings = SpeechGenerationModelSettings |
Hierarchy
-
SpeechGenerationModel
<SETTINGS
>↳
StreamingSpeechGenerationModel
Implemented by
Accessors
settingsForEvent
• get
settingsForEvent(): Partial
<SETTINGS
>
Returns settings that should be recorded in observability events. Security-related settings (e.g. API keys) should not be included here.
Returns
Partial
<SETTINGS
>
Inherited from
SpeechGenerationModel.settingsForEvent
Defined in
packages/modelfusion/src/model-function/Model.ts:19
Methods
doGenerateSpeechStandard
▸ doGenerateSpeechStandard(text
, options
): PromiseLike
<Uint8Array
>
Generates an mp3 audio Uint8Array that contains the speech for the given text.
Parameters
Name | Type |
---|---|
text | string |
options | FunctionCallOptions |
Returns
PromiseLike
<Uint8Array
>
Inherited from
SpeechGenerationModel.doGenerateSpeechStandard
Defined in
packages/modelfusion/src/model-function/generate-speech/SpeechGenerationModel.ts:14
doGenerateSpeechStreamDuplex
▸ doGenerateSpeechStreamDuplex(textStream
, options
): PromiseLike
<AsyncIterable
<Delta
<Uint8Array
>>>
Parameters
Name | Type |
---|---|
textStream | AsyncIterable <string > |
options | FunctionCallOptions |
Returns
PromiseLike
<AsyncIterable
<Delta
<Uint8Array
>>>
Defined in
packages/modelfusion/src/model-function/generate-speech/SpeechGenerationModel.ts:24
withSettings
▸ withSettings(additionalSettings
): this
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 | Partial <SETTINGS > |
Returns
this
Example
const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});
const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});
Inherited from
SpeechGenerationModel.withSettings
Defined in
packages/modelfusion/src/model-function/Model.ts:34
Properties
modelInformation
• modelInformation: ModelInformation
Inherited from
SpeechGenerationModel.modelInformation
Defined in
packages/modelfusion/src/model-function/Model.ts:12
settings
• Readonly
settings: SETTINGS
Inherited from
SpeechGenerationModel.settings