@bjelser/tts-openai
v3.0.1
Published
The OpenAI TTS provider plugin for docent. Wraps the official `openai` npm package's `audio.speech.create()` and exposes it through @bjelser/kit's TtsProviderPlugin contract.
Readme
@bjelser/tts-openai
OpenAI TTS provider for @bjelser/kit. Synthesizes per-beat narration audio against OpenAI's tts-1 / tts-1-hd / gpt-4o-mini-tts models.
Install
npm install @bjelser/tts-openai openai
# or
bun add @bjelser/tts-openai openaiopenai is a peer dependency — bring your own SDK version.
Use
Register the provider with the engine, set OPENAI_API_KEY, and reference it from your film's meta.voice block.
// docent.config.ts
import {corePlugins} from '@bjelser/core';
import {openaiTtsProvider} from '@bjelser/tts-openai';
export default {
plugins: [...corePlugins, openaiTtsProvider],
};// films/my-film.json
{
"meta": {
"voice": {
"provider": "openai",
"voice": "alloy",
"model": "tts-1-hd"
}
}
}Capabilities
nativeAlignment:null(chunk-level only — no native word timings)voiceCloning:falselanguages: per OpenAI's published list
If your scene declares requiresTtsCapabilities: { nativeAlignment: 'word' }, this provider will fail the cross-bind check at validation. Use a provider that supports word alignment (or remove the requirement).
License
MIT
