Skip to content

API Reference

talk_tag.api

talk_tag.api

StartupContext dataclass

Startup metadata emitted by model pull and annotation startup callbacks.

Backend semantics: - cuda / mps / cpu: backend was verified by loading a TransformersAnnotator. - external: backend was not verified by talk-tag. This is used for both: - caller-managed engines (annotate_path(..., engine=...)), and - unverified pulls (pull_model(..., verify_load=False)).

Use model_source to disambiguate these two cases: - external_engine => caller supplied the engine. - any repository/local model source => backend is unknown/unverified.

annotate_path(input_path, output_dir, target_speaker, *, investigator_speaker=None, device='auto', hf_cache_dir=None, granularity='standard', error_tags=None, limit=0, show_target=False, print_debug_lines=False, speaker_field=None, text_field=None, case_insensitive_speaker=False, continue_on_error=True, show_progress=True, engine=None, startup_callback=None)

Run annotation over a single file or a folder.

If engine is provided, startup metadata reports backend="external" and model_source="external_engine" because talk-tag did not resolve/load the model runtime itself.

pull_model(*, hf_cache_dir=None, device='auto', verify_load=True)

Download/resolve model assets and optionally verify model loading.

When verify_load=False, the returned context uses backend="external" to indicate an unverified/unknown runtime backend (not a caller-supplied engine). In that case, model_source still reflects the resolved source.

talk_tag.inference

talk_tag.inference

talk_tag.config

talk_tag.config

talk_tag.models

talk_tag.models