
    9i	                     P   S SK r S SKJrJr  S SKrS SKJr  S SKJr  S SK	J
r
  S SKJr  S SKJrJr  S/r\R"                  " \R$                  \R
                  S	9\R"                  " \R&                  \R
                  S	9\R"                  " \R(                  \R
                  S	9\R"                  " \R*                  \R
                  S	9\R"                  " \R,                  \R
                  S	9\R"                  " \R.                  \R
                  S	9\R"                  " \R0                  \R
                  S	9\R"                  " \R2                  \R
                  S	9\R"                  " \R4                  \R
                  S	9 " S
 S\
5      5       5       5       5       5       5       5       5       5       rg)    N)AnyDict)	AutoModel)Models)Model)MODELS)
FrameworksTasksGenericFunASR)module_namec                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )r      c                   > [         TU ]  " U/UQ70 UD6  [        R                  " [	        [
        R                  R                  US5      5      R                  5       5      nSU;  a#  SU;   a  US   US'   UR                  SS5      US'   SU;  a#  SU;   a  US   US'   UR                  SS5      US'   SU;  a#  SU;   a  US   US'   UR                  SS5      US'   [        S
S	U0UD6U l        g)zinitialize the info of model.

Args:
    model_dir (str): the model path.
    am_model_name (str): the am model name from configuration.json
    model_config (Dict[str, Any]): the detail config about model from configuration.json
zconfiguration.json	vad_modelvad_model_revisionN
punc_modelpunc_model_revision	spk_modelspk_model_revisionmodel )super__init__jsonloadsopenospathjoinreadgetr   r   )self	model_dirargskwargs	model_cfg	__class__s        d/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/modelscope/models/audio/funasr/model.pyr   GenericFunASR.__init__   s    	4T4V4JJi)=>?DDFH	f$	)A"+K"8F;+4==$d,,F'(v%,)*C#,\#:F< ,5MM%t--F()f$	)A"+K"8F;+4==$d,,F'( 9Y9&9
    c                 >    U R                   R                  " U0 UD6nU$ )z7preload model and return the info of the model
        )r   generate)r"   r$   r%   outputs       r(   forwardGenericFunASR.forward9   s"     $$d5f5r*   )r   )__name__
__module____qualname____firstlineno__r   r.   __static_attributes____classcell__)r'   s   @r(   r   r      s    :4 r*   )r   typingr   r   r   funasrr   modelscope.metainfor   modelscope.models.baser   modelscope.models.builderr   modelscope.utils.constantr	   r
   __all__register_moduleauto_speech_recognitionvoice_activity_detectionlanguage_score_predictionpunctuationspeaker_diarizationspeaker_verificationspeech_separationspeech_timestampemotion_recognitionr   r   r*   r(   <module>rG      sb   
    & ( , 7
 	!!v}}>	""?	##@))v}}E11v}}M22N//V]]K..FMMJ11v}}M!E ! N K L O N F@?>!r*   