Skip to main content

Functions and classes

Errors and logging

Stage functions never call sys.exit and never print. They raise subclasses of DeckTalkError. A ConfigError means the input is bad or inconsistent. A MissingInputError means an earlier stage has not run. A ProviderError means ElevenLabs refused or failed a request. A ToolError means ffmpeg or Chromium failed. Progress goes to the decktalk logger at the INFO level, so attach a handler to see it.

Stability

The file formats are stable already. That covers decktalk.toml, cues.json, the build artifacts, and the page contract. The Python names may move until version 1.0. Modules under decktalk.media and decktalk.providers, and any name that starts with an underscore, are internal.

Adding a speech provider

DeckTalk needs one thing from a voice: audio plus a start and end time for every word. The boundary is decktalk.providers.speech.SpeechProvider, a protocol with two methods. The speak(request) method returns the mp3 bytes and a list of Word objects. The cache_key(request) method returns everything that changes the audio apart from the text. ElevenLabs is the built-in provider and the only one today. There is no plugin loading yet. A new provider is a pull request that adds a module under src/decktalk/providers/ and registers it with register("name", factory), after which [voice] with provider = "name" selects it. A local text-to-speech engine paired with a forced aligner is the obvious next candidate, and an issue that proposes one is welcome.