@nhtio/adk/batteries/tts/transformers_js/adapter
transformers.js (ONNX, dual-environment) TTS (text-to-speech) adapter battery.
Remarks
Battery backed by transformers.js's text-to-speech (TextToAudio) pipeline. Environment-neutral — runs in Node (via onnxruntime-node) and the browser (via onnxruntime-web / WebGPU), auto-selected by the package; there is no WebGPU requirement, mirroring the transformers.js STT and Embeddings batteries this adapter is modeled on.
Accepts plain text input, resolves speaker embeddings / speed / inference steps from the merged constructor + per-call options, and returns a WAV-encoded GeneratedMediaOutput.
@huggingface/transformers is an optional peer dependency, imported lazily.
Classes
| Class | Description |
|---|---|
| TransformersJsTtsAdapter | TTS adapter for transformers.js's text-to-speech (TextToAudio) pipeline. |