§
    ‚Štjí
  ã                   ó”   — d Z ddlZddlZddlmZ ddlmZ ddlm	Z	  e	d¬¦  «        e G d	„ d
e¦  «        ¦   «         ¦   «         Z
d
gZdS )zDac model configurationé    N)Ústricté   )ÚPreTrainedConfig)Úauto_docstringzdescript/dac_16khz)Ú
checkpointc                   óø   ‡ — e Zd ZU dZdZdZeed<   dZe	e         e
edf         z  ed<   dZeed	<   d
Zeed<   dZeed<   dZeed<   dZeez  ed<   dZeed<   dZeed<   dZeed<   ˆ fd„Zedefd„¦   «         Zˆ xZS )Ú	DacConfigaÜ  
    downsampling_ratios (`list[int]`, *optional*, defaults to `[2, 4, 8, 8]`):
        Ratios for downsampling in the encoder. These are used in reverse order for upsampling in the decoder.
    quantizer_dropout (`bool`, *optional*, defaults to 0):
        Whether to apply dropout to the quantizer.
    commitment_loss_weight (float, *optional*, defaults to 0.25):
        Weight of the commitment loss term in the VQVAE loss function.
    codebook_loss_weight (float, *optional*, defaults to 1.0):
        Weight of the codebook loss term in the VQVAE loss function.

    Example:

    ```python
    >>> from transformers import DacModel, DacConfig

    >>> # Initializing a "descript/dac_16khz" style configuration
    >>> configuration = DacConfig()

    >>> # Initializing a model (with random weights) from the "descript/dac_16khz" style configuration
    >>> model = DacModel(configuration)

    >>> # Accessing the model configuration
    >>> configuration = model.config
    ```Údacé@   Úencoder_hidden_size)é   é   é   r   .Údownsampling_ratiosi   Údecoder_hidden_sizeé	   Ún_codebooksi   Úcodebook_sizer   Úcodebook_dimg        Úquantizer_dropoutg      Ð?Úcommitment_loss_weightg      ð?Úcodebook_loss_weighti€>  Úsampling_ratec                 ó  •— | j         d d d…         | _        | j        dt          | j         ¦  «        z  z  | _        t          t          j        | j         ¦  «        ¦  «        | _         t          ¦   «         j
        di |¤Ž d S )Néÿÿÿÿr   © )r   Úupsampling_ratiosr   ÚlenÚhidden_sizeÚintÚnpÚprodÚ
hop_lengthÚsuperÚ__post_init__)ÚselfÚkwargsÚ	__class__s     €úg/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/transformers/models/dac/configuration_dac.pyr%   zDacConfig.__post_init__B   sx   ø€ Ø!%Ô!9¸$¸$¸B¸$Ô!?ˆÔØÔ3°q½CÀÔ@XÑ<YÔ<YÑ7YÑZˆÔÝ�bœg dÔ&>Ñ?Ô?Ñ@Ô@ˆŒØ�‰ŒÔÐ'Ð' Ð'Ð'Ð'Ð'Ð'ó    Úreturnc                 ól   — t          j        | j        ¦  «        }t          j        | j        |z  ¦  «        S )N)r!   r"   r   ÚmathÚceilr   )r&   r#   s     r)   Ú
frame_ratezDacConfig.frame_rateH   s,   € å”W˜TÔ3Ñ4Ô4ˆ
ÝŒy˜Ô+¨jÑ8Ñ9Ô9Ð9r*   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
model_typer   r    Ú__annotations__r   ÚlistÚtupler   r   r   r   r   Úfloatr   r   r   r%   Úpropertyr/   Ú__classcell__)r(   s   @r)   r	   r	      s-  ø€ € € € € € ðð ð2 €Jà!Ð˜Ð!Ð!Ñ!Ø7CÐ˜˜cœ U¨3°¨8¤_Ñ4ÐCÐCÑCØ#Ð˜Ð#Ð#Ñ#Ø€K�ÐÐÑØ€M�3ÐÐÑØ€L�#ÐÐÑØ%(Ð�u˜s‘{Ð(Ð(Ñ(Ø$(Ð˜EÐ(Ð(Ñ(Ø"%Ð˜%Ð%Ð%Ñ%Ø€M�3ÐÐÑð(ð (ð (ð (ð (ð ð:˜Cð :ð :ð :ñ „Xð:ð :ð :ð :ð :r*   r	   )r3   r-   Únumpyr!   Úhuggingface_hub.dataclassesr   Úconfiguration_utilsr   Úutilsr   r	   Ú__all__r   r*   r)   ú<module>r@      s¶   ðð Ð à €€€à Ð Ð Ð Ø .Ð .Ð .Ð .Ð .Ð .à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø #Ð #Ð #Ð #Ð #Ð #ð €Ð/Ð0Ñ0Ô0Øð0:ð 0:ð 0:ð 0:ð 0:Ð ñ 0:ô 0:ñ „ñ 1Ô0ð0:ðf ˆ-€€€r*   