
    1;ji                     X    d Z ddlmZ ddlmZmZ ddlmZ d Zd Z	d Z
g Zdd	ZddZd
S )z-Multi-library, cross-platform audio decoding.   )ffdec)DecodeErrorNoBackendError)	AudioFilec                      	 ddl } n# t          $ r Y dS w xY w	 |                     dd           n# t          t          f$ r Y dS w xY w	 ddlm} n# t          $ r Y dS w xY wdS )zSDetermine whether Gstreamer and the Python GObject bindings are
    installed.
        NFGstz1.0)r	   T)giImportErrorrequire_version
ValueErrorAttributeErrorgi.repositoryr	   )r
   r	   s     L/root/voice-cloning/.venv/lib/python3.11/site-packages/audioread/__init__.py_gst_availabler      s    				   uu
5%(((('   uu%%%%%%%   uu 4s-    
0 AA	A 
AAc                  F    ddl } | j                            d          }|duS )zUDetermines whether CoreAudio is available (i.e., we're running on
    Mac OS X).
    r   NAudioToolbox)ctypes.utilutilfind_library)ctypeslibs     r   _ca_availabler   ,   s/     
+
"
">
2
2Cd?    c                  2    	 ddl } dS # t          $ r Y dS w xY w)z4Determines whether the pymad bindings are available.r   NTF)madr   )r   s    r   _mad_availabler   5   s;    


 t    uus    
Fc                    t           r	| st           S ddlm} |j        g}t	                      r ddlm} |                    |j                   t                      r ddlm	} |                    |j
                   t                      r ddlm} |                    |j                   t          j                    r|                    t          j                   |t           dd<   t           S )a   Returns a list of backends that are available on this system.

    The list of backends is cached after the first call.
    If the parameter `flush_cache` is set to `True`, then the cache
    will be flushed and the backend list will be reconstructed.
    r   )rawread)macca)gstdec)maddecN)BACKENDS r   RawAudioFiler   r    appendExtAudioFiler   r!   GstAudioFiler   r"   MadAudioFiler   	availableFFmpegAudioFile)flush_cacher   resultr    r!   r"   s         r   available_backendsr.   C   s       "#F  *e()))  +f)***  +f)***  -e+,,, HQQQKOr   Nc                     |t                      }|D ]}	  ||           c S # t          $ r Y w xY wt                      )a$  Open an audio file using a library that is available on this
    system.

    The optional `backends` parameter can be a list of audio file
    classes to try opening the file with. If it is not provided,
    `audio_open` tries all available backends. If you call this function
    many times, you can avoid the cost of checking for available
    backends every time by calling `available_backends` once and passing
    the result to each `audio_open` call.

    If all backends fail to read the file, a NoBackendError exception is
    raised.
    )r.   r   r   )pathbackendsBackendClasss      r   
audio_openr3   k   sm     %''   	<%%%%% 	 	 	D	 

s   
#
00)F)N)__doc__r$   r   
exceptionsr   r   baser   r   r   r   r#   r.   r3    r   r   <module>r8      s    4 3       3 3 3 3 3 3 3 3        ,     % % % %P     r   