
    Nj                         d dl Z d dlmZmZmZ d dlZd dlmZ  e j                  e      Z	 ed      Z
 G d de      Z G d dej                  ee
         Zy)	    N)Generic
NamedTupleTypeVar)nnPreparedc                   ,    e Zd ZU ej                  ed<   y)TokenizedTexttokensN)__name__
__module____qualname__torchTensor__annotations__     m/Users/ahmed/devFolder/Ultron/claude-voice/.venv/lib/python3.12/site-packages/pocket_tts/conditioners/base.pyr	   r	      s    LLr   r	   c            	       \     e Zd ZdZ	 d
dedededef fdZdedej                  fd	Z
 xZS )BaseConditionera  Base model for all conditioner modules.

    Args:
        dim (int): internal dim of the model.
        output_dim (int): Output dim of the conditioner.
        force_linear (bool, optional): Force linear projection even when `dim == output_dim`.
        output_bias (bool): if True, the output projection will have a bias.
        learn_padding (bool): if True, the padding value will be learnt, zero otherwise.
    dim
output_dimoutput_biasforce_linearc                 X    t         |           || _        || _        |s||k7  sJ |rJ y N)super__init__r   r   )selfr   r   r   r   	__class__s        r   r   zBaseConditioner.__init__   s8     	$sj000;r   inputsreturnc                 $    | j                  |      S r   )_get_condition)r   r    s     r   forwardzBaseConditioner.forward%   s    ""6**r   )FT)r   r   r   __doc__intboolr   r	   r   r   r$   __classcell__)r   s   @r   r   r      sK     Z^$'6:RV+m + +r   r   )loggingtypingr   r   r   r   r   	getLoggerr   loggerr   r	   Moduler   r   r   r   <module>r.      sU     / /  			8	$ :J +bii!2 +r   