changeset 45:771dde08349a

Fixed a bug where generating the validation .csv files would not show end_time if it wasn't defined in the recipe files.
author Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk>
date Tue, 10 Oct 2017 11:55:05 +0100
parents b7b1672b3c3b
children 40f8b4b5750b
files python/simscene.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/python/simscene.py	Mon Oct 09 11:55:03 2017 +0100
+++ b/python/simscene.py	Tue Oct 10 11:55:05 2017 +0100
@@ -106,6 +106,8 @@
         if np.isnan(end_time) or float(end_time) == -1:
             duration_samples = len(wav)            
             end_time_samples = start_time_samples + duration_samples
+            end_time = end_time_samples/float(SR)
+
         elif end_time - start_time > len(wav)/float(SR):
             
             # If given end_time is more than start_time + duration of sample