an.audio.providers#
Provider factory: name → concrete TTS/LipSync provider instance.
Used by the CLI and orchestrator to map --tts elevenlabs (and similar)
strings into instantiated providers without callers having to import the
specific classes.
>>> from an.audio.providers import make_tts, make_lipsync
>>> make_tts("offline").name
'offline'
>>> make_lipsync("none").name
'none'
Module Attributes
A factory takes no arguments, or |
|
The language a provider aligns for when the caller says nothing. |
|
The lip-sync providers the core itself offers. |
|
The provider |
Functions
Return the registered LipSync provider names. |
|
Return the registered TTS provider names. |
|
Every lip-sync factory by name: the core's, then the loaded genres' services. |
|
|
The TTS providers a host may list voices from with its own key: those whose factory takes |
|
Instantiate a LipSync provider by name. |
|
Instantiate a TTS provider by name. |
- an.audio.providers.DEFAULT_LANGUAGE: str = 'en'#
The language a provider aligns for when the caller says nothing. Only Rhubarb reads it today (its recognizer follows the language, an#96).
- an.audio.providers.DFLT_LIPSYNC: str = 'offline'#
The provider
default_lipsync()prefers when a genre registered it.
- an.audio.providers.LIPSYNC_FACTORIES: dict[str, Callable[..., LipSyncProvider]] = {'none': <function <lambda>>}#
The lip-sync providers the core itself offers. A genre adds its own through the
lipsync.<name>service (cutan:offline,rhubarb,whisper); seelipsync_factories().
- an.audio.providers.TTS_FACTORIES: dict[str, Callable[..., TTSProvider]] = {'elevenlabs': <function <lambda>>, 'mac_say': <function <lambda>>, 'offline': <function <lambda>>, 'recorded': <function _recorded_factory>}#
A factory takes no arguments, or
mall=when the provider reads a project store (recorded), orapi_key=when a host may hand it its own key (elevenlabs):make_tts()passes each only to those that accept it, andlistable_providers()reads the latter, so a provider registered here withapi_key=is listable by hosts with nothing else to change.
- an.audio.providers.lipsync_factories()[source]#
Every lip-sync factory by name: the core’s, then the loaded genres’ services.
- Return type:
- an.audio.providers.listable_providers(*, factories={'elevenlabs': <function <lambda>>, 'mac_say': <function <lambda>>, 'offline': <function <lambda>>, 'recorded': <function _recorded_factory>})[source]#
The TTS providers a host may list voices from with its own key: those whose factory takes
api_key=(an#712). Hand one, with the key, toan.audio.list_voices().>>> listable_providers() ['elevenlabs'] >>> listable_providers(factories={"a": lambda *, api_key=None: None, "b": lambda: None}) ['a']
- an.audio.providers.make_lipsync(name, *, language='en')[source]#
Instantiate a LipSync provider by name.
language(BCP-47) reaches providers that select behaviour by language — Rhubarb’s recognizer today; a future aligner’s weight allowlist.The default name (
"offline") resolves toNullLipSyncwhen no loaded genre provides it, so voicing a line needs no genre; any other name that nothing provides is an error that says how to get it.>>> make_lipsync("offline").name in {"offline", "none"} True
- Return type:
- an.audio.providers.make_tts(name, *, mall=None, api_key=None)[source]#
Instantiate a TTS provider by name.
mall(the project mall) reaches the factories that take it — therecordedprovider reads the project’srecordingsstore;api_key(a host’s own key) reaches those that take one (ElevenLabs, an#712); the others are built as before. RaisesValueErrorfor unknown names with a list of known options.>>> make_tts("recorded").name 'recorded'
- Return type: