changeset 265:73a01556cd5e

Rename first argument in AudioDataSource
author Amine Sehili <amine.sehili@gmail.com>
date Thu, 12 Sep 2019 21:08:33 +0100
parents ca5449269024
children c5d2d9988195
files auditok/util.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/auditok/util.py	Thu Sep 12 20:59:12 2019 +0100
+++ b/auditok/util.py	Thu Sep 12 21:08:33 2019 +0100
@@ -854,26 +854,26 @@
 
     def __init__(
         self,
-        source,
+        input,
         block_dur=0.01,
         hop_dur=None,
         record=False,
         max_read=None,
         **kwargs
     ):
-        if not isinstance(source, AudioSource):
-            source = get_audio_source(source, **kwargs)
+        if not isinstance(input, AudioSource):
+            input = get_audio_source(input, **kwargs)
         self._record = record
         if record:
-            source = _Recorder(source)
+            input = _Recorder(input)
         if max_read is not None:
-            source = _Limiter(source, max_read)
+            input = _Limiter(input, max_read)
             self._max_read = max_read
         if hop_dur is not None:
-            source = _OverlapAudioReader(source, block_dur, hop_dur)
+            input = _OverlapAudioReader(input, block_dur, hop_dur)
         else:
-            source = _FixedSizeAudioReader(source, block_dur)
-        self._audio_source = source
+            input = _FixedSizeAudioReader(input, block_dur)
+        self._audio_source = input
 
     def __repr__(self):
         block_dur, hop_dur, max_read = None, None, None