@nhtio/adk/batteries/media/engines/transformers_asr
A cross-environment transcription @nhtio/adk/batteries/media/contracts!MediaEngine backed by @huggingface/transformers Whisper (ONNX in Node, WASM/WebGPU in browsers).
Remarks
The local-by-default speech-to-text engine: no external API, no binary. Declares one convert capability: the virtual pcm token to txt/srt/vtt/json (transcription is a format conversion — PCM in, text out). The Whisper model id is REQUIRED — models are multi-hundred-megabyte downloads on first use and the battery never triggers one silently (the loud-config rule). Input is 16 kHz mono PCM, exactly what the transcribe step supplies; lang/translate ride request.options. srt/vtt output is assembled from chunk timestamps; json returns the chunk structure verbatim.
@huggingface/transformers is an optional peer dependency, lazily imported on first actual use.
Interfaces
| Interface | Description |
|---|---|
| TransformersAsrEngineOptions | Options for transformersAsrEngine. |
Functions
| Function | Description |
|---|---|
| transformersAsrEngine | Construct the transformers.js Whisper ASR engine. |