parser.add_argument('-f','--file',type=str,required=True,help='Name of the file that contain the recording to print')
parser.add_argument('-p','--path_to_data',type=arg_directory,help='Path of the folder that contain the recordings',required=True)
parser.add_argument('-d','--direction',type=arg_directory,help='Directory to wich spectrogram will be stored',required=True)
parser.add_argument('-m','--mode',type=str,choices=['unique','multiple'],help='Direction of the saved spectrogram',required=True)
parser.add_argument('-n','--columns_name',type=str,help='Name of the columns that contain the path of the .wav',required=True)
args=parser.parse_args()
path_to_data=args.path_to_data
direction=args.direction
folder='Spectrogram/'
DURATION=5
OVERLAP=0#2
ifargs.mode=='multiple':
NB_IMG_PER_REC=30#10
elifargs.mode=='unique':
NB_IMG_PER_REC=1
df=pd.read_csv(args.file,low_memory=False)
df['Path']=df[args.columns_name]
defprocess(x):
_,(i)=x
forcount,jinenumerate(range (NB_IMG_PER_REC)):#30*8 secondes - 30*2 secondes (overlap) = 180 secondes affichées sur 30 images : n'affiche que les 3 premières minutes d'un enregistrement