Commit 9777d7dc authored by Anthony Larcher's avatar Anthony Larcher
Browse files

seqtoseq

parent 01885d7c
......@@ -189,5 +189,5 @@ __maintainer__ = "Anthony Larcher"
__email__ = "anthony.larcher@univ-lemans.fr"
__status__ = "Production"
__docformat__ = 'reStructuredText'
__version__="1.3.6.6"
__version__="1.3.6.8"
......@@ -589,6 +589,11 @@ class IdMapSet(Dataset):
else:
start = int(self.idmap.start[index])
stop = int(self.idmap.stop[index])
# add this in case the segment is too short
if stop - start < 14400:
middle = (stop - start)//2
start = max(0, int(middle - 0.45 * 16000))
stop = int(start + 0.9 * 16000)
sig, _ = soundfile.read(f"{self.data_root_path}/{self.idmap.rightids[index]}.{self.file_extension}",
start=start,
stop=stop)
......
......@@ -134,6 +134,7 @@ def speech_to_probs(model, speech):
def plot_classes_preds(model, speech, labels):
'''
Generates matplotlib Figure using a trained network, along with images
and labels from a batch, that shows the network's top prediction along
with its probability, alongside the actual label, coloring this
......
Supports Markdown
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