Skip to content
1 min read · 83 words

Type Alias: CreateTransformersJsSttPipeline

ts
type CreateTransformersJsSttPipeline = (input: {
  device?: TransformersJsSttDeviceType;
  dtype?: TransformersJsSttDataType;
  model: string;
  onInitProgress?: TransformersJsSttProgressCallback;
}) => Promise<TransformersJsSttPipeline>;

Defined in: src/batteries/specialists/stt/transformers_js/types.ts:90

Factory for lazily creating an automatic-speech-recognition pipeline. Defaults to a dynamic import of @huggingface/transformers + pipeline('automatic-speech-recognition', …); override to inject a pre-built pipeline or a test double.

Parameters

ParameterType
input{ device?: TransformersJsSttDeviceType; dtype?: TransformersJsSttDataType; model: string; onInitProgress?: TransformersJsSttProgressCallback; }
input.device?TransformersJsSttDeviceType
input.dtype?TransformersJsSttDataType
input.modelstring
input.onInitProgress?TransformersJsSttProgressCallback

Returns

Promise<TransformersJsSttPipeline>