pyannote.database 5.1.0__tar.gz → 5.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyannote.database-5.1.0/pyannote.database.egg-info → pyannote.database-5.1.2}/PKG-INFO +1 -1
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/_version.py +2 -2
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/custom.py +5 -4
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/loader.py +3 -3
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/util.py +16 -17
- {pyannote.database-5.1.0 → pyannote.database-5.1.2/pyannote.database.egg-info}/PKG-INFO +1 -1
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/LICENSE +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/MANIFEST.in +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/README.md +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/__init__.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/__init__.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/cli.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/database.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/file_finder.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/__init__.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/collection.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/protocol.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/segmentation.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_diarization.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_identification.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_recognition.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_spotting.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_verification.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/registry.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/SOURCES.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/dependency_links.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/entry_points.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/namespace_packages.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/requires.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/top_level.txt +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/setup.cfg +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/setup.py +0 -0
- {pyannote.database-5.1.0 → pyannote.database-5.1.2}/versioneer.py +0 -0
|
@@ -11,8 +11,8 @@ version_json = '''
|
|
|
11
11
|
{
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "5.1.
|
|
14
|
+
"full-revisionid": "d8345c4e4df103e425a9d4dfd512da4c1817640a",
|
|
15
|
+
"version": "5.1.2"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -49,17 +49,18 @@ import string
|
|
|
49
49
|
from . import protocol as protocol_module
|
|
50
50
|
|
|
51
51
|
from pyannote.database.protocol.protocol import ProtocolFile
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
|
|
53
54
|
import warnings
|
|
54
55
|
from numbers import Number
|
|
55
56
|
from typing import Text, Dict, Callable, Any, Union
|
|
56
57
|
import functools
|
|
57
58
|
|
|
58
|
-
from .protocol.protocol import Subset
|
|
59
|
+
from .protocol.protocol import Subset
|
|
59
60
|
from .protocol.segmentation import SegmentationProtocol
|
|
60
61
|
from .protocol.speaker_diarization import SpeakerDiarizationProtocol
|
|
61
62
|
|
|
62
|
-
import
|
|
63
|
+
from importlib.metadata import entry_points
|
|
63
64
|
|
|
64
65
|
from .util import get_annotated
|
|
65
66
|
|
|
@@ -68,7 +69,7 @@ from .loader import load_lst, load_trial
|
|
|
68
69
|
# All "Loader" classes types (eg RTTMLoader, UEMLoader, ...) retrieved from the entry point.
|
|
69
70
|
LOADERS = {
|
|
70
71
|
ep.name: ep
|
|
71
|
-
for ep in
|
|
72
|
+
for ep in entry_points(group="pyannote.database.loader")
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
|
|
@@ -90,7 +90,7 @@ def load_trial(file_trial):
|
|
|
90
90
|
"""
|
|
91
91
|
|
|
92
92
|
trials = pd.read_table(
|
|
93
|
-
file_trial,
|
|
93
|
+
file_trial, sep="\s+", names=["reference", "uri1", "uri2"]
|
|
94
94
|
)
|
|
95
95
|
|
|
96
96
|
for _, reference, uri1, uri2 in trials.itertuples():
|
|
@@ -289,7 +289,7 @@ class CTMLoader:
|
|
|
289
289
|
"confidence": float,
|
|
290
290
|
}
|
|
291
291
|
self.data_ = pd.read_csv(
|
|
292
|
-
ctm, names=names, dtype=dtype,
|
|
292
|
+
ctm, names=names, dtype=dtype, sep="\s+"
|
|
293
293
|
).groupby("uri")
|
|
294
294
|
|
|
295
295
|
def __call__(self, current_file: ProtocolFile) -> Union["Doc", None]:
|
|
@@ -354,7 +354,7 @@ class MAPLoader:
|
|
|
354
354
|
"uri": str,
|
|
355
355
|
}
|
|
356
356
|
self.data_ = pd.read_csv(
|
|
357
|
-
mapping, names=names, dtype=dtype,
|
|
357
|
+
mapping, names=names, dtype=dtype, sep="\s+"
|
|
358
358
|
)
|
|
359
359
|
|
|
360
360
|
# get colum 'value' dtype, allowing us to acces it during subset
|
|
@@ -78,17 +78,17 @@ def get_unique_identifier(item):
|
|
|
78
78
|
def get_annotated(current_file):
|
|
79
79
|
"""Get part of the file that is annotated.
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
Parameters
|
|
82
|
+
----------
|
|
83
|
+
current_file : `dict`
|
|
84
|
+
File generated by a `pyannote.database` protocol.
|
|
85
|
+
|
|
86
|
+
Returns
|
|
87
|
+
-------
|
|
88
|
+
annotated : `pyannote.core.Timeline`
|
|
89
|
+
Part of the file that is annotated. Defaults to
|
|
90
|
+
`current_file["annotated"]`. When it does not exist, try to use the
|
|
91
|
+
full audio extent. When that fails, use "annotation" extent.
|
|
92
92
|
"""
|
|
93
93
|
|
|
94
94
|
# if protocol provides 'annotated' key, use it
|
|
@@ -179,7 +179,7 @@ def load_rttm(file_rttm, keep_type="SPEAKER"):
|
|
|
179
179
|
file_rttm,
|
|
180
180
|
names=names,
|
|
181
181
|
dtype=dtype,
|
|
182
|
-
|
|
182
|
+
sep="\s+",
|
|
183
183
|
keep_default_na=True,
|
|
184
184
|
)
|
|
185
185
|
|
|
@@ -213,7 +213,7 @@ def load_stm(file_stm):
|
|
|
213
213
|
dtype = {"uri": str, "speaker": str, "start": float, "end": float}
|
|
214
214
|
data = pd.read_csv(
|
|
215
215
|
file_stm,
|
|
216
|
-
|
|
216
|
+
sep="\s+",
|
|
217
217
|
usecols=[0, 2, 3, 4],
|
|
218
218
|
dtype=dtype,
|
|
219
219
|
names=list(dtype),
|
|
@@ -250,7 +250,7 @@ def load_mdtm(file_mdtm):
|
|
|
250
250
|
file_mdtm,
|
|
251
251
|
names=names,
|
|
252
252
|
dtype=dtype,
|
|
253
|
-
|
|
253
|
+
sep="\s+",
|
|
254
254
|
keep_default_na=False,
|
|
255
255
|
)
|
|
256
256
|
|
|
@@ -281,7 +281,7 @@ def load_uem(file_uem):
|
|
|
281
281
|
|
|
282
282
|
names = ["uri", "NA1", "start", "end"]
|
|
283
283
|
dtype = {"uri": str, "start": float, "end": float}
|
|
284
|
-
data = pd.read_csv(file_uem, names=names, dtype=dtype,
|
|
284
|
+
data = pd.read_csv(file_uem, names=names, dtype=dtype, sep="\s+")
|
|
285
285
|
|
|
286
286
|
timelines = dict()
|
|
287
287
|
for uri, parts in data.groupby("uri"):
|
|
@@ -306,7 +306,7 @@ def load_lab(path, uri: str = None) -> Annotation:
|
|
|
306
306
|
|
|
307
307
|
names = ["start", "end", "label"]
|
|
308
308
|
dtype = {"start": float, "end": float, "label": str}
|
|
309
|
-
data = pd.read_csv(path, names=names, dtype=dtype,
|
|
309
|
+
data = pd.read_csv(path, names=names, dtype=dtype, sep="\s+")
|
|
310
310
|
|
|
311
311
|
annotation = Annotation(uri=uri)
|
|
312
312
|
for i, turn in data.iterrows():
|
|
@@ -388,7 +388,6 @@ class LabelMapper(object):
|
|
|
388
388
|
self.keep_missing = keep_missing
|
|
389
389
|
|
|
390
390
|
def __call__(self, current_file):
|
|
391
|
-
|
|
392
391
|
if not self.keep_missing:
|
|
393
392
|
missing = set(current_file["annotation"].labels()) - set(self.mapping)
|
|
394
393
|
if missing and not self.keep_missing:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/collection.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/segmentation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote/database/protocol/speaker_spotting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannote.database-5.1.0 → pyannote.database-5.1.2}/pyannote.database.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|