# HG changeset patch # User Amine Sehili # Date 1718913071 -7200 # Node ID 5a6685f1e42d9a26f610f0151929772102ec1d05 # Parent 0e938065a2db80686dff72d4834a7bb8f47cc739 Remove unused code and update documentation for AudioRegion diff -r 0e938065a2db -r 5a6685f1e42d auditok/core.py --- a/auditok/core.py Thu Jun 20 21:45:08 2024 +0200 +++ b/auditok/core.py Thu Jun 20 21:51:11 2024 +0200 @@ -578,14 +578,9 @@ number of bytes of one audio sample channels : int number of channels of audio data - meta : dict, default: None - any collection of elements used to build metadata for - this `AudioRegion`. Meta data can be accessed via `region.meta.key` - if `key` is a valid python attribute name, or via `region.meta[key]` - if not. Note that the :func:`split` function (or the - :meth:`AudioRegion.split` method) returns `AudioRegions` with a ``start`` - and a ``stop`` meta values that indicate the location in seconds of the - region in original audio data. + start : float, default: None + optional start time of the region. This is typically provided by the + `split` function. See also -------- @@ -598,27 +593,6 @@ channels: int start: float = field(default=None, repr=None) - def init__(self, data, sampling_rate, sample_width, channels, meta=None): - check_audio_data(data, sample_width, channels) - self.data = data - self.sampling_rate = sampling_rate - self.sample_width = sample_width - self.channels = channels - self._samples = None - self.splitp = self.split_and_plot - - if meta is not None: - self._meta = _AudioRegionMetadata(meta) - else: - self._meta = None - - self._seconds_view = _SecondsView(self) - self.sec = self.seconds - self.s = self.seconds - - self._millis_view = _MillisView(self) - self.ms = self.millis - def __post_init__(self): check_audio_data(self.data, self.sample_width, self.channels)