Coverage for src/bob/bio/spear/database/asvspoof2017.py: 100%
0 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-06 22:04 +0100
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-06 22:04 +0100
1"""Database interface for ASV Spoof 2017
3This database has a custom class as there is only probe data in the sets (instead of
4enrollment and probes).
5It was defined for PAD experiments and should not belong in a bio package.
7WIP YD 2022
8"""
10# "asvspoof2017": {
11# "local_filename": "asvspoof2017.tar.gz",
12# "definition_file": "asvspoof2017-db087bb7.tar.gz", # TODO new format
13# "crc": "db087bb7",
14# },
17# from bob.pipelines import FileListDatabase
18# from typing import Optional
19# from sklearn.pipeline import make_pipeline
21# from bob.bio.spear.transformer import PathToAudio
23# def ASVSpoof2017CSVDatabase(
24# name:str = "ASVSpoof2017",
25# protocol: Optional[str] = None,
26# dataset_protocols_path: Optional[str] = None,
27# data_path: Optional[str] = None,
28# data_ext: str = ".wav",
29# annotations_path: Optional[str] = None,
30# annotations_ext: str = ".json",
31# force_sample_rate: Optional[int] = None,
32# force_channel: Optional[int] = None,
33# **kwargs,
34# ) -> FileListDatabase:
36# # Load a path into the data of the sample
37# sample_loader = FileSampleLoader( # TODO: use a non-biometric class
38# data_loader=path_loader,
39# dataset_original_directory=data_path,
40# extension=data_ext,
41# )
43# # Read the file at path and set the data and metadata of a sample
44# path_to_sample = PathToAudio(
45# forced_channel=force_channel, forced_sr=force_sample_rate
46# )
47# return FileListDatabase(
48# protocol=protocol,
49# dataset_protocols_path=dataset_protocols_path,
50# transformer=path_to_sample,
51# )