11import  csv 
22import  os 
3- import  warnings 
43from  pathlib  import  Path 
5- from  typing  import  List , Dict , Tuple , Union ,  Optional 
4+ from  typing  import  List , Dict , Tuple , Union 
65
76from  torch  import  Tensor 
87from  torch .utils .data  import  Dataset 
@@ -40,10 +39,6 @@ class COMMONVOICE(Dataset):
4039            The name of the tsv file used to construct the metadata, such as 
4140            ``"train.tsv"``, ``"test.tsv"``, ``"dev.tsv"``, ``"invalidated.tsv"``, 
4241            ``"validated.tsv"`` and ``"other.tsv"``. (default: ``"train.tsv"``) 
43-         url (str, optional): Deprecated, not used. 
44-         folder_in_archive (str, optional): Deprecated, not used. 
45-         version (str): Deprecated, not used. 
46-         download (bool, optional): Deprecated, not used. 
4742    """ 
4843
4944    _ext_txt  =  ".txt" 
@@ -52,29 +47,7 @@ class COMMONVOICE(Dataset):
5247
5348    def  __init__ (self ,
5449                 root : Union [str , Path ],
55-                  tsv : str  =  "train.tsv" ,
56-                  url : Optional [str ] =  None ,
57-                  folder_in_archive : Optional [str ] =  None ,
58-                  version : Optional [str ] =  None ,
59-                  download : Optional [bool ] =  None ) ->  None :
60-         if  download :
61-             raise  RuntimeError (
62-                 "Common Voice dataset requires user agreement on the usage term, " 
63-                 "and torchaudio no longer provides the download feature. " 
64-                 "Please download the dataset and extract it manually." )
65- 
66-         deprecated  =  [
67-             ('url' , url ),
68-             ('folder_in_archive' , folder_in_archive ),
69-             ('version' , version ),
70-             ('download' , download )
71-         ]
72-         for  name , val  in  deprecated :
73-             if  val  is  not None :
74-                 warnings .warn (
75-                     f"`{ name }  
76-                     "It will be removed in 0.9.0 releaase. " 
77-                     "Please remove it from the function call" )
50+                  tsv : str  =  "train.tsv" ) ->  None :
7851
7952        # Get string representation of 'root' in case Path object is passed 
8053        self ._path  =  os .fspath (root )
0 commit comments