Commit 2cf2e47e authored by Anthony Larcher's avatar Anthony Larcher
parents 71387e63 32754a7d
Pipeline #63 skipped
......@@ -25,6 +25,7 @@
Copyright 2016 Anthony Larcher
"""
import os
import numpy as np
import scipy
import copy
......@@ -365,7 +366,10 @@ class SStream(object):
collect_energy.append(energy)
collect_vad.append(vad)
except GeneratorExit:
with h5py.File(self.output_filename) as fh:
dir_name = os.path.dirname(self.output_filename)
if not os.path.exists(dir_name) and (dir_name is not ''):
os.makedirs(dir_name)
with h5py.File(self.output_filename, 'a') as fh:
sidekit.frontend.io.write_hdf5(show = self.show,
fh = fh,
feat = np.hstack([np.vstack(collect_energy), np.vstack(collect_sig)]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment