StephennFernandes's picture
Anuvani-Diarization 1.0.0
63dd946
Raw History Blame Contribute Delete
1.25 kB
# Copyright (c) 2026 The Anuvani-Diarization authors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""Indic speaker diarization: the release's pipeline on a Rust engine, byte-identical to release 1.0.
from anuvani_diar import Diarizer
Diarizer()("meeting.wav").save_rttm("meeting.rttm")
"""
import os as _os
from pathlib import Path as _Path
# The engine loads its own copies of OpenBLAS (numpy 1.26.4's) and libsndfile (soundfile 0.14.0's) and its clustering
# constants from this package (_libs/, assets/; tools/stage_wheel_files.py puts them there in a source tree). It
# reads where they are from these variables, so they are set before `_core` loads; a value the user set (non-empty)
# is kept.
_HERE = _Path(__file__).resolve().parent
for _var, _path in (("ANUVANI_DIAR_OPENBLAS_DIR", _HERE / "_libs"),
("ANUVANI_DIAR_SNDFILE", _HERE / "_libs" / "libsndfile_x86_64.so"),
("ANUVANI_DIAR_ASSETS", _HERE / "assets")):
if not _os.environ.get(_var) and _path.exists():
_os.environ[_var] = str(_path)
del _var, _path
from . import _core # noqa: E402,F401
from .api import Diarization, Diarizer # noqa: E402,F401
from .client import Client # noqa: E402,F401
__version__ = "1.0.0"