Beispiel #1
0
 def download(self, force_download=False):
     zenodo_url = "https://zenodo.org/record/1203745/files"
     zenodo_files = ["UrbanSound8K.tar.gz"]
     downloaded = super().download(zenodo_url, zenodo_files, force_download)
     if downloaded:
         move_all_files_to_parent(self.dataset_path, "UrbanSound8K")
         self.set_as_downloaded()
Beispiel #2
0
 def download(self, force_download=False):
     github_url = "https://github.com/karoldvl/ESC-50/archive/"
     github_files = ["master.zip"]
     downloaded = super().download(github_url, github_files, force_download)
     if downloaded:
         move_all_files_to_parent(self.dataset_path, "ESC-50-master")
         self.set_as_downloaded()
Beispiel #3
0
    def download(self, force_download=False):
        zenodo_url = "https://zenodo.org/record/1324404/files"
        zenodo_files = ["URBAN-SED_v2.0.0.tar.gz"]

        downloaded = super().download(zenodo_url, zenodo_files, force_download)
        if downloaded:
            move_all_files_to_parent(self.dataset_path, "URBAN-SED_v2.0.0")
            self.set_as_downloaded()
Beispiel #4
0
def test_move_all_files_to_parent():
    parent = "./new_parent"
    mkdir_if_not_exists("./new_parent/new_child", parents=True)
    mkdir_if_not_exists("./new_parent/new_child2")
    move_all_files_to_parent("./", "new_parent")
    assert os.path.exists("./new_child")
    assert os.path.exists("./new_child2")
    _clean("./new_child")
    _clean("./new_child2")
    _clean("./new_parent")
Beispiel #5
0
    def download(self, force_download=False):
        zenodo_url = "https://zenodo.org/record/2589280/files"
        zenodo_files = [
            "TAU-urban-acoustic-scenes-2019-development.audio.%d.zip" % j
            for j in range(1, 22)
        ]
        zenodo_files.append(
            'TAU-urban-acoustic-scenes-2019-development.doc.zip')
        zenodo_files.append(
            'TAU-urban-acoustic-scenes-2019-development.meta.zip')

        downloaded = super().download(zenodo_url, zenodo_files, force_download)
        if downloaded:
            move_all_files_to_parent(
                self.dataset_path,
                "TAU-urban-acoustic-scenes-2019-development")
            self.set_as_downloaded()
Beispiel #6
0
    def download(self, force_download=False):
        zenodo_url = "https://zenodo.org/record/814831/files"

        zenodo_files = [
            'TUT-sound-events-2017-development.audio.1.zip',
            'TUT-sound-events-2017-development.audio.2.zip',
            'TUT-sound-events-2017-development.doc.zip',
            'TUT-sound-events-2017-development.meta.zip'
        ]
        downloaded = super().download(zenodo_url, zenodo_files, force_download)
        if downloaded:
            move_all_files_to_parent(self.dataset_path,
                                     "TUT-sound-events-2017-development")

        zenodo_url = "https://zenodo.org/record/1040179/files"

        zenodo_files = [
            'TUT-sound-events-2017-evaluation.audio.zip',
            'TUT-sound-events-2017-evaluation.meta.zip',
        ]
        downloaded = super().download(zenodo_url, zenodo_files, force_download)
        if downloaded:
            move_all_files_to(
                os.path.join(self.dataset_path,
                             "TUT-sound-events-2017-evaluation/audio/street"),
                os.path.join(self.dataset_path, "audio/street"))
            move_all_files_to(
                os.path.join(self.dataset_path,
                             "TUT-sound-events-2017-evaluation/meta/street"),
                os.path.join(self.dataset_path, "meta/street"))
            move_all_files_to(
                os.path.join(
                    self.dataset_path,
                    "TUT-sound-events-2017-evaluation/evaluation_setup"),
                os.path.join(self.dataset_path, "evaluation_setup"))
            self.set_as_downloaded()