
    h                     6   S r SSKJrJr  SSKr\R
                  R                  5       rSSKJ	r	  \	S\
4S j5       r\	S\
4S j5       r\	S	\
4S
 j5       r\	S\4S j5       r\	S\\\4   4S j5       r\	S\\   4S j5       r\	S\\   4S j5       r\	S\
4S j5       rg)aB  Module to change the configuration of libsox, which is used by I/O functions like
:py:mod:`~torchaudio.backend.sox_io_backend` and :py:mod:`~torchaudio.sox_effects`.

.. warning::
    Starting with version 2.8, we are refactoring TorchAudio to transition it
    into a maintenance phase. As a result:

    - Some APIs are deprecated in 2.8 and will be removed in 2.9.
    - The decoding and encoding capabilities of PyTorch for both audio and video
      are being consolidated into TorchCodec.

    Please see https://github.com/pytorch/audio/issues/3902 for more information.
    )DictListN)dropping_supportseedc                 .    [         R                  U 5        g)z~Set libsox's PRNG

Args:
    seed (int): seed value. valid range is int32.

See Also:
    http://sox.sourceforge.net/sox.html
N)sox_extset_seed)r   s    R/var/www/auris/envauris/lib/python3.13/site-packages/torchaudio/utils/sox_utils.pyr	   r	      s     T    	verbosityc                 .    [         R                  U 5        g)a   Set libsox's verbosity

Args:
    verbosity (int): Set verbosity level of libsox.

        * ``1`` failure messages
        * ``2`` warnings
        * ``3`` details of processing
        * ``4``-``6`` increasing levels of debug messages

See Also:
    http://sox.sourceforge.net/sox.html
N)r   set_verbosity)r   s    r
   r   r   $   s     )$r   buffer_sizec                 .    [         R                  U 5        g)zSet buffer size for sox effect chain

Args:
    buffer_size (int): Set the size in bytes of the buffers used for processing audio.

See Also:
    http://sox.sourceforge.net/sox.html
N)r   set_buffer_size)r   s    r
   r   r   6   s     K(r   use_threadsc                 .    [         R                  U 5        g)a&  Set multithread option for sox effect chain

Args:
    use_threads (bool): When ``True``, enables ``libsox``'s parallel effects channels processing.
        To use mutlithread, the underlying ``libsox`` has to be compiled with OpenMP support.

See Also:
    http://sox.sourceforge.net/sox.html
N)r   set_use_threads)r   s    r
   r   r   C   s     K(r   returnc                  <    [        [        R                  5       5      $ )zlList the available sox effect names

Returns:
    Dict[str, str]: Mapping from ``effect name`` to ``usage``
)dictr   list_effects r   r
   r   r   Q   s     $$&''r   c                  *    [         R                  5       $ )zcList the supported audio formats for read

Returns:
    List[str]: List of supported audio formats
)r   list_read_formatsr   r   r
   r   r   [   s     $$&&r   c                  *    [         R                  5       $ )zdList the supported audio formats for write

Returns:
    List[str]: List of supported audio formats
)r   list_write_formatsr   r   r
   r   r   e   s     %%''r   c                  *    [         R                  5       $ )zlGet buffer size for sox effect chain

Returns:
    int: size in bytes of buffers used for processing audio.
)r   get_buffer_sizer   r   r
   r   r   o   s     ""$$r   )__doc__typingr   r   
torchaudio
_extensionlazy_import_sox_extr   !torchaudio._internal.module_utilsr   intr	   r   r   boolr   strr   r   r   r   r   r   r
   <module>r)      s    



3
3
5 >	3 	 	 %S % %" 	) 	) 	) 
) 
) 
) (d38n ( ( '49 ' ' (DI ( ( % % %r   