# HG changeset patch # User Amine Sehili # Date 1546786062 -3600 # Node ID 382f30f8dab5e3f66686f2ab9794b5b6a5168f5e # Parent a2ad7085c2627036a92461e3f8f97ef0e281042c Check audio data validity at AudioRegion creation diff -r a2ad7085c262 -r 382f30f8dab5 auditok/core.py --- a/auditok/core.py Sun Jan 06 14:28:33 2019 +0100 +++ b/auditok/core.py Sun Jan 06 15:47:42 2019 +0100 @@ -10,6 +10,7 @@ """ from auditok.util import DataValidator +from auditok.io import check_audio_data __all__ = ["AudioRegion", "StreamTokenizer"] @@ -33,6 +34,7 @@ channels: int number of channels of audio data """ + check_audio_data(data, sample_width, channels) self._data = data self._start = start self._sampling_rate = sampling_rate