@nhtio/adk/batteries/tts/native/types
Option and seam types for the OS-native TTS (text-to-speech) adapter.
Remarks
Node-only. This engine synthesizes by shelling out to the operating system's own speech binary — macOS say, Linux espeak-ng, or Windows PowerShell System.Speech — and reading back the WAV file it writes. It is model-less: it extends the shared BaseTtsAdapterOptions (voice/rate) but adds NO model field.
All shell-out and filesystem access is injectable so unit tests stay hermetic (no real child_process, no real files): TtsBinaryExecutor (default: a lazy node:child_processexecFile wrapper), TtsFsLike (default: node:fs/promises), plus tmpdir()/randomName() seams for the scratch output path.
Interfaces
| Interface | Description |
|---|---|
| NativeSynthesizeOptions | Per-call options for NativeTtsAdapter.synthesize. Extends the shared SynthesizeOptions (voice/rate) with the native per-call knobs; each field overrides the constructor default of the same name for this one call. |
| NativeTtsAdapterOptions | Constructor options for the OS-native TTS adapter. All optional — a zero-config new NativeTtsAdapter() is valid and auto-detects the platform. |
| TtsBinaryExecutor | A pluggable runner for the native TTS binary — the seam that lets a consumer swap the default node:child_process execFile for execa, a sandbox, a container shim, or a remote runner. |
| TtsBinaryExecutorResult | The result of running a single native TTS binary invocation. |
| TtsFsLike | The minimal filesystem surface the native engine needs: read the synthesized WAV, then delete it. Default: node:fs/promises. Injectable so unit tests supply canned bytes and record the unlink. |
Type Aliases
| Type Alias | Description |
|---|---|
| NativeTtsPlatform | The operating-system platforms this engine can synthesize on. |
References
BaseTtsAdapterOptions
Re-exports BaseTtsAdapterOptions
GeneratedMediaOutput
Re-exports GeneratedMediaOutput
SynthesizeOptions
Re-exports SynthesizeOptions
TtsSynthesisResult
Re-exports TtsSynthesisResult