medkit.audio.preprocessing.downmixer
====================================

.. py:module:: medkit.audio.preprocessing.downmixer


Classes
-------

.. autoapisummary::

   medkit.audio.preprocessing.downmixer.Downmixer


Module Contents
---------------

.. py:class:: Downmixer(output_label: str, prevent_clipping: bool = True, uid: str | None = None)

   Bases: :py:obj:`medkit.core.audio.PreprocessingOperation`


   
   Downmixing operation converting multichannel audio signals to mono.


   :Parameters:

       **output_label** : str
           Label of output downmixed segments.

       **prevent_clipping** : bool, default=True
           If `True`, normalize downmixed signals by number of channels to prevent clipping.

       **uid** : str, optional
           Identifier of the downmixer.














   ..
       !! processed by numpydoc !!

   .. py:method:: run(segments: list[medkit.core.audio.Segment]) -> list[medkit.core.audio.Segment]

      
      Return a downmixed segment for each segment in `segments`.


      :Parameters:

          **segments** : list of Segment
              Audio segments to downmix.

      :Returns:

          list of Segment
              Downmixed segments, one per segment in `segments`.













      ..
          !! processed by numpydoc !!


   .. py:method:: _downmix_segment(segment: medkit.core.audio.Segment) -> medkit.core.audio.Segment


