Mercurial > hg > auditok
changeset 96:382f30f8dab5
Check audio data validity at AudioRegion creation
author | Amine Sehili <amine.sehili@gmail.com> |
---|---|
date | Sun, 06 Jan 2019 15:47:42 +0100 |
parents | a2ad7085c262 |
children | ceebd8e331c4 |
files | auditok/core.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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