@@ -89,7 +89,7 @@ def save_annotations():
8989 wavfiles = set ()
9090 for sound in annotated_sounds :
9191 if not sound ["label" ]: continue
92- wavfiles |= set ([trim_ext ( os .path .join (* sound ["file" ]) )])
92+ wavfiles |= set ([os .path .join (* sound ["file" ])])
9393 for wavfile in wavfiles :
9494 csvfile = wavfile + "-annotated-" + songexplorer_starttime + ".csv"
9595 annotated_csvfiles_all .add (csvfile )
@@ -104,8 +104,7 @@ def save_annotations():
104104 corrected_sounds = []
105105 for annotation in annotated_sounds :
106106 if annotation ['label' ]!= "" and not annotation ['label' ].isspace ():
107- wavfile_noext = trim_ext (os .path .join (* annotation ['file' ]))
108- csvwriters [wavfile_noext ].writerow (
107+ csvwriters [os .path .join (* annotation ['file' ])].writerow (
109108 [annotation ['file' ][1 ],
110109 annotation ['ticks' ][0 ], annotation ['ticks' ][1 ],
111110 'annotated' , annotation ['label' ]])
@@ -119,8 +118,7 @@ def save_annotations():
119118 columns = ['file' ,'start' ,'stop' ,'kind' ,'label' ])
120119 wavfiles = set ()
121120 for sound in corrected_sounds :
122- wavfile_noext = trim_ext (os .path .join (* sound ["file" ]))
123- wavfiles |= set ([wavfile_noext ])
121+ wavfiles |= set ([os .path .join (* sound ["file" ])])
124122 for wavfile in wavfiles :
125123 wavdir , wavbase = os .path .split (wavfile )
126124 wavpath = os .path .join (V .groundtruth_folder .value , wavdir )
@@ -248,7 +246,7 @@ def init(_bokeh_document, _configuration_file, _use_aitch):
248246 global context_width_sec0 , context_offset_sec0
249247 global xcluster , ycluster , zcluster , ndcluster , tic2pix_max , snippet_width_pix , ilayer , ispecies , iword , inohyphen , ikind , nlayers , layers , species , words , nohyphens , kinds , used_labels , snippets_gap_sec , snippets_tic , snippets_gap_tic , snippets_decimate_by , snippets_pix , snippets_gap_pix , context_decimate_by , context_width_tic , context_offset_tic , context_sound , isnippet , xsnippet , ysnippet , file_nframes , context_midpoint_tic , ilabel , used_sounds , used_starts_sorted , used_stops , iused_stops_sorted , annotated_sounds , annotated_starts_sorted , annotated_stops , iannotated_stops_sorted , annotated_csvfiles_all , nrecent_annotations , clustered_sounds , clustered_activations , used_recording2firstsound , clustered_starts_sorted , clustered_stops , iclustered_stops_sorted , songexplorer_starttime , history_stack , history_idx , wizard , action , function , statepath , state , file_dialog_root , file_dialog_filter , nearest_sounds , status_ticker_queue , waitfor_job , dfs , remaining_isounds
250248 global user_changed_recording , user_copied_parameters
251- global audio_read , audio_read_exts , audio_read_rec2ch , audio_read_strip_rec , trim_ext
249+ global audio_read , audio_read_exts , audio_read_rec2ch , audio_read_strip_rec
252250 global video_read , detect_labels , doubleclick_annotation , context_data , context_data_istart , model , video_findfile
253251 global detect_parameters , doubleclick_parameters , model_parameters , cluster_parameters , augmentation_parameters
254252
@@ -270,7 +268,7 @@ def init(_bokeh_document, _configuration_file, _use_aitch):
270268
271269 load_audio_read_plugin (audio_read_plugin , audio_read_plugin_kwargs )
272270 load_video_read_plugin (video_read_plugin , video_read_plugin_kwargs )
273- from lib import audio_read , audio_read_exts , audio_read_rec2ch , audio_read_strip_rec , video_read , trim_ext
271+ from lib import audio_read , audio_read_exts , audio_read_rec2ch , audio_read_strip_rec , video_read
274272
275273 sys .path .insert (0 ,os .path .dirname (detect_plugin ))
276274 tmp = importlib .import_module (os .path .basename (detect_plugin ))
0 commit comments