---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/type-aliases/TransformersJsSttModelSource.md
description: >-
  Custom model-source resolver — the dual-environment seam for serving model
  files from OPFS, a different source, or bundled bytes (see the LLM battery's
  `model_source` module). Called once per file; return bytes / a path-or-URL
  string / a `Response`, or `undefined` to fall through to HF.
---

# Type Alias: TransformersJsSttModelSource

```ts
type TransformersJsSttModelSource = (req: {
  filename: string;
  repo: string;
}) =>
  | Promise<Uint8Array | string | Response | undefined>
  | Uint8Array
  | string
  | Response
  | undefined;
```

Defined in: [src/batteries/specialists/stt/transformers\_js/types.ts:75](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/specialists/stt/transformers_js/types.ts#L75)

Custom model-source resolver — the dual-environment seam for serving model files from OPFS, a
different source, or bundled bytes (see the LLM battery's `model_source` module). Called once per
file; return bytes / a path-or-URL string / a `Response`, or `undefined` to fall through to HF.

## Parameters

| Parameter      | Type                                          |
| -------------- | --------------------------------------------- |
| `req`          | { `filename`: `string`; `repo`: `string`; } |
| `req.filename` | `string`                                      |
| `req.repo`     | `string`                                      |

## Returns

| `Promise`<`Uint8Array` | `string` | `Response` | `undefined`>
| `Uint8Array`
| `string`
| `Response`
| `undefined`
