---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/type-aliases/CreateTransformersJsSttPipeline.md
description: >-
  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.
---

# 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](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/specialists/stt/transformers_js/types.ts#L90)

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

| Parameter               | Type                                                                                                                                                                                                                                                                        |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                 | { `device?`: [`TransformersJsSttDeviceType`](TransformersJsSttDeviceType.md); `dtype?`: [`TransformersJsSttDataType`](TransformersJsSttDataType.md); `model`: `string`; `onInitProgress?`: [`TransformersJsSttProgressCallback`](TransformersJsSttProgressCallback.md); } |
| `input.device?`         | [`TransformersJsSttDeviceType`](TransformersJsSttDeviceType.md)                                                                                                                                                                                                             |
| `input.dtype?`          | [`TransformersJsSttDataType`](TransformersJsSttDataType.md)                                                                                                                                                                                                                 |
| `input.model`           | `string`                                                                                                                                                                                                                                                                    |
| `input.onInitProgress?` | [`TransformersJsSttProgressCallback`](TransformersJsSttProgressCallback.md)                                                                                                                                                                                                 |

## Returns

`Promise`<[`TransformersJsSttPipeline`](TransformersJsSttPipeline.md)>
