asc package¶
Submodules¶
asc.audio module¶
asc.cli module¶
asc.data module¶
Data module
This module lets the program to download the data from the server.
-
class
asc.data.
Data
[source]¶ Bases:
object
Data collection.
-
clear_zip
(url_list, tmp_dir)[source]¶ Clear the archives
Delete the downloaded archives.
- Args:
- url_list (str): list of strings containing the urls tmp_dir (str): path where are store the archives
-
download
(url_list, dest_dir)[source]¶ Download data from a list of URLs
Download data from a list of URLs and display a progress according to the size of the file.
- Args:
- url_list(list): list containing URLs of files to download. dest_dir (str): path to where download the data.
-
file_to_list
(filename)[source]¶ Parse a file and transform it into a list
Parse a file line by line to make a list with the urls contained inside.
- Args:
- filename (str): path to the file containing the URLs.
-
move_files
(url_list, origin_dir, dest_dir)[source]¶ Move the audio files into the data folder
Move the audio folder created by the unzipped archives into the data root folder. The function can specify the origin and destination folder but assumes that the audio files are located into an folder called ‘audio’ and can’t be changed.
- Args:
- url_list (list): list of all the archive URLs. origin_dir (str): directory of origin. dest_dir (str): directory of destination.
- Returns:
- None
- Todo:
- The fact that the ‘audio’ folder is hard coded makes this function rather bad and should be corrected in the future.
-
unzip_data
(url_list, origin_dir, dest_dir)[source]¶ Unzip data files
Unzip data files given a list of file names, the path where they are store and where they will be unzipped.
- Args:
- url_list (str): list of strings containing the urls origin_dir (str): directory where are stored the files dest_dir (str): directory where the files will be extracted
-
asc.utils module¶
Module contents¶
Top-level package for Acoustic Scene Classification.