
    qiof                        d Z ddlZddlmZ ddlmZmZ ddlm	Z	m
Z
mZmZmZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZ dd	lmZmZmZmZ dd
lm Z  ddl!m"Z"m#Z# ddl$m%Z%m&Z& ddl'm(Z( ddl)m*Z* 	 ddl+Z,de%dee1   fdZ2e G d de             Z3e G d de             Z4 G d de#      Z5 G d de"      Z6y# e-$ r7Z. ej^                  de.         ej^                  d        e0de.       dZ.[.ww xY w)zYNVIDIA Riva Speech-to-Text service implementations for real-time and batch transcription.    N)CancelledError)	dataclassfield)AnyAsyncGeneratorListMappingOptional)logger)	BaseModel)CancelFrameEndFrame
ErrorFrameFrameInterimTranscriptionFrame
StartFrameTranscriptionFrame)	NOT_GIVENSTTSettings	_NotGiven_warn_deprecated_param)NVIDIA_TTFS_P99)SegmentedSTTService
STTService)Languageresolve_language)time_now_iso8601)
traced_sttzException: zNIn order to use NVIDIA Riva STT, you need to `pip install pipecat-ai[nvidia]`.zMissing module: languagereturnc                 (   i t         j                  dt         j                  dt         j                  dt         j                  dt         j
                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  dt         j                  d	t         j                   d	t         j"                  d
t         j$                  d
t         j&                  dt         j(                  dt         j*                  dt         j,                  dt         j.                  di}t1        | |d      S )a@  Maps Language enum to NVIDIA Riva ASR language codes.

    Source:
    https://docs.nvidia.com/deeplearning/riva/user-guide/docs/asr/asr-riva-build-table.html?highlight=fr%20fr

    Args:
        language: Language enum value.

    Returns:
        Optional[str]: NVIDIA Riva language code or None if not supported.
    zar-ARen-USzen-GBzfr-FRzde-DEzhi-INzit-ITzja-JPzko-KRzpt-BRzru-RUzes-ESzes-USF)use_base_code)r   ARENEN_USEN_GBFRFR_FRDEDE_DEHIHI_INITIT_ITJAJA_JPKOKO_KRPTPT_BRRURU_RUESES_ESES_USr   )r   LANGUAGE_MAPs     M/opt/pipecat/venv/lib/python3.12/site-packages/pipecat/services/nvidia/stt.py language_to_nvidia_riva_languager=   *   sg   #W# 	W	#
 	# 	# 	W# 	# 	W# 	# 	W# 	#" 	W##$ 	%#( 	W)#* 	+#. 	W/#0 	1#4 	W5#6 	WWE#LJ Hl%HH    c                       e Zd ZdZy)NvidiaSTTSettingszSettings for NvidiaSTTService.N)__name__
__module____qualname____doc__ r>   r<   r@   r@   ^   s    (r>   r@   c                       e Zd ZU dZ ed       Zeez  ed<    ed       Z	eez  ed<    ed       Z
eez  ed<    ed	       Zee   d
z  ez  ed<    ed       Zeez  ed<   y
)NvidiaSegmentedSTTSettingsa  Settings for NvidiaSegmentedSTTService.

    Parameters:
        profanity_filter: Whether to filter profanity from results.
        automatic_punctuation: Whether to add automatic punctuation.
        verbatim_transcripts: Whether to return verbatim transcripts.
        boosted_lm_words: List of words to boost in language model.
        boosted_lm_score: Score boost for specified words.
    c                      t         S Nr   rE   r>   r<   <lambda>z#NvidiaSegmentedSTTSettings.<lambda>q   s    y r>   )default_factoryprofanity_filterc                      t         S rI   rJ   rE   r>   r<   rK   z#NvidiaSegmentedSTTSettings.<lambda>r   s    I r>   automatic_punctuationc                      t         S rI   rJ   rE   r>   r<   rK   z#NvidiaSegmentedSTTSettings.<lambda>s   s    9 r>   verbatim_transcriptsc                      t         S rI   rJ   rE   r>   r<   rK   z#NvidiaSegmentedSTTSettings.<lambda>t   s    S\ r>   Nboosted_lm_wordsc                      t         S rI   rJ   rE   r>   r<   rK   z#NvidiaSegmentedSTTSettings.<lambda>u   s    	 r>   boosted_lm_score)rA   rB   rC   rD   r   rM   boolr   __annotations__rO   rQ   rS   r   strrU   floatrE   r>   r<   rG   rG   e   s     */?P)QdY&Q.3DU.V4)+V-2CT-U$*U5:K\5]d3i$&2]*/@Q*Rei'Rr>   rG   c                   d    e Zd ZU dZeZeed<    G d de      Zddddd	d	d
d	e	dde
de
dee
e
f   dee   dee   dedee   dee   f fdZd Zd ZdefdZde
fdZdef fdZdef fdZdef fdZd Zd  Zd! Ze	 d+d"e
d#ed$ee   fd%       Z d& Z!d'e"de#e$d	f   fd(Z%de"fd)Z&d* Z' xZ(S ),NvidiaSTTServicea  Real-time speech-to-text service using NVIDIA Riva streaming ASR.

    Provides real-time transcription capabilities using NVIDIA's Riva ASR models
    through streaming recognition. Supports interim results and continuous audio
    processing for low-latency applications.
    	_settingsc                   :    e Zd ZU dZej
                  Zee   ed<   y)NvidiaSTTService.InputParamszConfiguration parameters for NVIDIA Riva STT service.

        .. deprecated:: 0.0.105
            Use ``settings=NvidiaSTTSettings(...)`` instead.

        Parameters:
            language: Target language for transcription. Defaults to EN_US.
        r   N)	rA   rB   rC   rD   r   r&   r   r
   rW   rE   r>   r<   InputParamsr^      s    	 (0~~(8$5r>   r_   grpc.nvcf.nvidia.com:443z$1598d209-5e27-4d3c-8079-4751568b1081zparakeet-ctc-1.1b-asrfunction_id
model_nameNTservermodel_function_mapsample_rateparamsuse_sslsettingsttfs_p99_latencyapi_keyre   rf   rg   rh   ri   rj   rk   c                   t        |j                  d      t        j                        }
|#t	        dt                |s|j
                  |
_        ||
j                  |       t        |    d
|||
d|	 || _	        || _
        || _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        |j                  d	      | _        d| _        d| _        d| _        d| _        y)a'  Initialize the NVIDIA Riva STT service.

        Args:
            api_key: NVIDIA API key for authentication.
            server: NVIDIA Riva server address. Defaults to NVIDIA Cloud Function endpoint.
            model_function_map: Mapping containing 'function_id' and 'model_name' for the ASR model.
            sample_rate: Audio sample rate in Hz. If None, uses pipeline default.
            params: Additional configuration parameters for NVIDIA Riva.

                .. deprecated:: 0.0.105
                    Use ``settings=NvidiaSTTSettings(...)`` instead.

            use_ssl: Whether to use SSL for the NVIDIA Riva server. Defaults to True.
            settings: Runtime-updatable settings. When provided alongside deprecated
                parameters, ``settings`` values take precedence.
            ttfs_p99_latency: P99 latency from speech end to final transcript in seconds.
                Override for your deployment. See https://github.com/pipecat-ai/stt-benchmark
            **kwargs: Additional arguments passed to STTService.
        rc   )modelr   Nrh   rg   rk   rj          rb   rE   )r@   getr   r&   r   r   apply_updatesuper__init___server_api_key_use_ssl_start_history_start_threshold_stop_history_stop_threshold_stop_history_eou_stop_threshold_eou_custom_configuration_function_id_asr_service_queue_config_thread_taskselfrl   re   rf   rg   rh   ri   rj   rk   kwargsdefault_settings	__class__s              r<   rv   zNvidiaSTTService.__init__   s   H -$((6^^
 "8->?,2OO ) ))(3 	
#-%	
 		
   $#!##' %'".22=A  r>   c                     d| j                   gdd| j                   gg}t        j                  j	                  d | j
                  | j                  |      }t        j                  j                  |      | _        y )Nfunction-idauthorizationBearer )	r   rx   rivaclientAuthry   rw   
ASRServicer   r   metadataauths      r<   _initialize_clientz#NvidiaSTTService._initialize_client   se    D--.78
 {{dmmT\\8L KK2248r>   c                 *   t         j                  j                  t         j                  j                  t         j                  j                  j
                  | j                  j                  ddddd| j                  d	      d      }t         j                  j                  || j                  | j                  | j                  | j                  | j                  | j                         t         j                  j!                  || j"                         |S )5Create the NVIDIA Riva ASR recognition configuration.rr      FT)	encodinglanguage_codern   max_alternativesrM   enable_automatic_punctuationrQ   sample_rate_hertzaudio_channel_count)configinterim_results)r   r   StreamingRecognitionConfigRecognitionConfigAudioEncoding
LINEAR_PCMr\   r   rg   !add_endpoint_parameters_to_configrz   r{   r|   r~   r}   r   "add_custom_configuration_to_configr   )r   r   s     r<   _create_recognition_configz+NvidiaSTTService._create_recognition_config   s    77;;0022=="nn55!"!&-1%)"&"2"2$% 1 
 ! 8 
 	55!!""  $$	
 	66vt?Y?YZr>   r    c                      y)zCheck if this service can generate processing metrics.

        Returns:
            False - this service does not support metrics generation.
        FrE   r   s    r<   can_generate_metricsz%NvidiaSTTService.can_generate_metrics  s     r>   rn   c                    K   ddl }|j                         5  |j                  d       |j                  dt        d       ddd       y# 1 sw Y   yxY ww)a  Set the ASR model for transcription.

        .. deprecated:: 0.0.104
            Model cannot be changed after initialization for NVIDIA Riva streaming STT.
            Set model and function id in the constructor instead, e.g.::

                NvidiaSTTService(
                    api_key=...,
                    model_function_map={"function_id": "<UUID>", "model_name": "<model_name>"},
                )

        Args:
            model: Model name to set.
        r   Nalwaysa  'set_model' is deprecated. Model cannot be changed after initialization for NVIDIA Riva streaming STT. Set model and function id in the constructor instead, e.g.: NvidiaSTTService(api_key=..., model_function_map={'function_id': '<UUID>', 'model_name': '<model_name>'})   )
stacklevel)warningscatch_warningssimplefilterwarnDeprecationWarning)r   rn   r   s      r<   	set_modelzNvidiaSTTService.set_model  sX      	$$& 
	!!(+MMK
 #  
	 
	 
	s   A*A
	A
AAframec                 t  K   t         |   |       d{    | j                          | j                         | _        t        j                         | _        | j                  s$| j                  | j                               | _        t        j                  d| j                  j                          y7 w)zStart the NVIDIA Riva STT service and initialize streaming configuration.

        Args:
            frame: StartFrame indicating pipeline start.
        Nz)Initialized NvidiaSTTService with model: )ru   startr   r   r   asyncioQueuer   r   create_task_thread_task_handlerr   debugr\   rn   r   r   r   s     r<   r   zNvidiaSTTService.start(  s      gmE"""!668mmo   $ 0 01J1J1L MD@AUAU@VWX 	#s   B8B6B B8c                 t   K   t         |   |       d{    | j                          d{    y7 7 w)zStop the NVIDIA Riva STT service and clean up resources.

        Args:
            frame: EndFrame indicating pipeline stop.
        N)ru   stop_stop_tasksr   s     r<   r   zNvidiaSTTService.stop9  s6      gl5!!!    	"    848688c                 t   K   t         |   |       d{    | j                          d{    y7 7 w)zCancel the NVIDIA Riva STT service operation.

        Args:
            frame: CancelFrame indicating operation cancellation.
        N)ru   cancelr   r   s     r<   r   zNvidiaSTTService.cancelB  s6      gnU###    	$ r   c                 ~   K   | j                   r+| j                  | j                          d {    d | _         y y 7 wrI   )r   cancel_taskr   s    r<   r   zNvidiaSTTService._stop_tasksK  s9     ""4#4#4555 $D 5s   +=;=c                     | j                   j                  | | j                        }|D ]B  }|j                  st	        j
                  | j                  |      | j                                D y )N)audio_chunksstreaming_config)r   streaming_response_generatorr   resultsr   run_coroutine_threadsafe_handle_responseget_event_loop)r   	responsesresponses      r<   _response_handlerz"NvidiaSTTService._response_handlerP  sk    %%BB!\\ C 
	 " 	eH##,,T-B-B8-LdNaNaNcd	er>   c                    K   	 d| _         t        j                  | j                         d {    y 7 # t        j                  $ r	 d| _          w xY ww)NTF)_thread_runningr   	to_threadr   r   r   s    r<   r   z%NvidiaSTTService._thread_task_handlerZ  sL     	#'D ##D$:$:;;;%% 	#(D 	s%   A)5 35 A5 AA
transcriptis_finalr   c                    K   ywz+Handle a transcription result with tracing.NrE   r   r   r   r   s       r<   _handle_transcriptionz&NvidiaSTTService._handle_transcriptionb       
 	   c           
        K   |j                   D ]6  }|r|j                  s|j                  d   j                  }|s/t        |      dkD  s>|j                  r| j                          d {    | j                  t        || j                  t               | j                  j                  |             d {    | j                  ||j                  | j                  j                         d {    | j                  t        || j                  t               | j                  j                  |             d {    9 y 7 7 7 Z7 w)Nr   )result)r   r   r   )r   alternativesr   lenr   stop_processing_metrics
push_framer   _user_idr   r\   r   r   r   )r   r   r   r   s       r<   r   z!NvidiaSTTService._handle_responsei  s1    && 	Ff11,,Q/::Jc*o1??66888//*& MM,. NN33#)   44#-!'!%!8!8 5    //1& MM,. NN33#)  /	 9sT   ;EEE,E
-AE9E:9E3E4AEE	EEEEaudioc                   K   | j                          d{    | j                  j                  |       d{    d y7 -7 w)zProcess audio data for speech-to-text transcription.

        Args:
            audio: Raw audio bytes to transcribe.

        Yields:
            None - transcription results are pushed to the pipeline via frames.
        N)start_processing_metricsr   put)r   r   s     r<   run_sttzNvidiaSTTService.run_stt  s>      ++---kkooe$$$
 	.$s   AA"AAAAc                     | j                   st        	 t        j                  | j                  j                         | j                               }|j                         S # t        $ r t        w xY w)zGet the next audio chunk for NVIDIA Riva processing.

        Returns:
            Audio bytes from the queue.

        Raises:
            StopIteration: When the thread is no longer running.
        )	r   StopIterationr   r   r   rs   r   r   FuturesCancelledError)r   futures     r<   __next__zNvidiaSTTService.__next__  s_     ##	 55dkkoo6GI\I\I^_F==?"$ 	 	 s   AA   A0c                     | S )zdReturn iterator for audio chunk processing.

        Returns:
            Self as iterator.
        rE   r   s    r<   __iter__zNvidiaSTTService.__iter__  s	     r>   rI   ))rA   rB   rC   rD   r@   SettingsrW   r   r_   r   rX   r	   r
   intrV   rY   rv   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   bytesr   r   r   r   r   __classcell__r   s   @r<   r[   r[   x   s|    !H  
6i 
6  1A11
 &*(,04,;K! K! 	K!
 $CH-K! c]K! %K! K! ,-K! #5/K!Z9<d S :Y Y"! !!+ !%
e NR)-9A(9K  D5 ^E4K-H  %  $r>   r[   c                   N    e Zd ZU dZeZeed<    G d de      Zddddd	d	d
d	e	dde
de
dee
e
f   dee   dee   dedee   dee   f fdZdedee
   fdZd Zde
fdZd ZdefdZdef fdZdedee
ef   f fdZe	 d%d e
d!edee   fd"       Zd#ede e!d	f   fd$Z" xZ#S )&NvidiaSegmentedSTTServicea  Speech-to-text service using NVIDIA Riva's offline/batch models.

    By default, his service uses NVIDIA's Riva Canary ASR API to perform speech-to-text
    transcription on audio segments. It inherits from SegmentedSTTService to handle
    audio buffering and speech detection.
    r\   c                       e Zd ZU dZej
                  Zee   ed<   dZ	e
ed<   dZe
ed<   dZe
ed<   dZeee      ed	<   d
Zeed<   y)%NvidiaSegmentedSTTService.InputParamsar  Configuration parameters for NVIDIA Riva segmented STT service.

        .. deprecated:: 0.0.105
            Use ``settings=NvidiaSegmentedSTTSettings(...)`` instead.

        Parameters:
            language: Target language for transcription. Defaults to EN_US.
            profanity_filter: Whether to filter profanity from results.
            automatic_punctuation: Whether to add automatic punctuation.
            verbatim_transcripts: Whether to return verbatim transcripts.
            boosted_lm_words: List of words to boost in language model.
            boosted_lm_score: Score boost for specified words.
        r   FrM   TrO   rQ   NrS         @rU   )rA   rB   rC   rD   r   r&   r   r
   rW   rM   rV   rO   rQ   rS   r   rX   rU   rY   rE   r>   r<   r_   r     s\    	 (0~~(8$5!&$&&*t*%*d*04(49-4"%%%r>   r_   r`   z$ee8dc628-76de-4acc-8595-1836e7e857bdzcanary-1b-asrra   NTrd   rl   re   rf   rg   rh   ri   rj   rk   c          	         t        |j                  d      t        t        j                        xs dddddd      }
|t        dt                |st        |j                  xs t        j                        xs d|
_        |j                  |
_        |j                  |
_        |j                  |
_	        |j                  |
_
        |j                  |
_        ||
j                  |       t        | 8  d|||
d	|	 || _        || _        || _        |j                  d
      | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        y)aJ  Initialize the NVIDIA Riva segmented STT service.

        Args:
            api_key: NVIDIA API key for authentication
            server: NVIDIA Riva server address (defaults to NVIDIA Cloud Function endpoint)
            model_function_map: Mapping of model name and its corresponding NVIDIA Cloud Function ID
            sample_rate: Audio sample rate in Hz. If not provided, uses the pipeline's rate
            params: Additional configuration parameters for NVIDIA Riva

                .. deprecated:: 0.0.105
                    Use ``settings=NvidiaSegmentedSTTSettings(...)`` instead.

            use_ssl: Whether to use SSL for the NVIDIA Riva server. Defaults to True.
            settings: Runtime-updatable settings. When provided alongside deprecated
                parameters, ``settings`` values take precedence.
            ttfs_p99_latency: P99 latency from speech end to final transcript in seconds.
                Override for your deployment. See https://github.com/pipecat-ai/stt-benchmark
            **kwargs: Additional arguments passed to SegmentedSTTService
        rc   r"   FTNr   )rn   r   rM   rO   rQ   rS   rU   rh   ro   rb   rp   rq   rr   rE   )rG   rs   r=   r   r&   r   r   rM   rO   rQ   rS   rU   rt   ru   rv   rx   rw   ry   r   rz   r{   r|   r}   r~   r   r   r   r   r   s              r<   rv   z"NvidiaSegmentedSTTService.__init__  ss   H 6$((65hnnEP""&!&! 
 "8-GH4V__5VWb[b !) 5;4K4K 19?9U9U 68>8S8S 54:4K4K 14:4K4K 1 ))(3 	
#-%	
 		
  .22=A ! $#!##' %'" r>   r   r    c                     t        |      S )zConvert pipecat Language enum to NVIDIA Riva's language code.

        Args:
            language: Language enum value.

        Returns:
            NVIDIA Riva language code or None if not supported.
        )r=   )r   r   s     r<   language_to_service_languagez6NvidiaSegmentedSTTService.language_to_service_language.  s     099r>   c                    | j                   yd| j                  gdd| j                   gg}t        j                  j                  d| j                  | j                  |      }t        j                  j                  |      | _         y)zCInitialize the NVIDIA Riva ASR client with authentication metadata.Nr   r   r   )	r   r   rx   r   r   r   ry   rw   r   r   s      r<   r   z,NvidiaSegmentedSTTService._initialize_client9  sv    ( D--.78
 {{dmmT\\8L KK2248r>   c                 6    | j                   j                  xs dS )z1Get the current NVIDIA Riva language code string.r"   )r\   r   r   s    r<   _get_language_codez,NvidiaSegmentedSTTService._get_language_codeH  s    ~~&&1'1r>   c           	      n   | j                   }t        j                  j                  | j	                         d|j
                  |j                  |j                        }|j                  r5t        j                  j                  ||j                  |j                         t        j                  j                  || j                  | j                  | j                  | j                  | j                   | j"                         | j$                  r*t        j                  j'                  || j$                         |S )r   r   )r   r   rM   r   rQ   )r\   r   r   r   r   rM   rO   rQ   rS   add_word_boosting_to_configrU   r   rz   r{   r|   r~   r}   r   r   r   )r   sr   s      r<   r   z4NvidiaSegmentedSTTService._create_recognition_configL  s     NN..113//)*)@)@!"!7!7 / 
 KK33FA<N<NPQPbPbc 	55!!""  $$	
 %%KK::64C]C]^r>   c                      y)zCheck if this service can generate processing metrics.

        Returns:
            True - this service supports metrics generation.
        TrE   r   s    r<   r   z.NvidiaSegmentedSTTService.can_generate_metricsm  s     r>   r   c                    K   t         |   |       d{    | j                          | j                         | _        t        j                  d| j                  j                          y7 Vw)zInitialize the service when the pipeline starts.

        Args:
            frame: StartFrame indicating pipeline start.
        Nz2Initialized NvidiaSegmentedSTTService with model: )	ru   r   r   r   r   r   r   r\   rn   r   s     r<   r   zNvidiaSegmentedSTTService.startu  s[      gmE"""!668I$..J^J^I_`a 	#s   A/A-AA/deltac                 p   K   t         |   |       d{   }|r| j                         | _        |S 7 w)zApply a settings delta and sync internal state.

        Args:
            delta: A :class:`STTSettings` (or ``NvidiaSegmentedSTTSettings``) delta.

        Returns:
            Dict mapping changed field names to their previous values.
        N)ru   _update_settingsr   r   )r   r  changedr   s      r<   r  z*NvidiaSegmentedSTTService._update_settings  s8      077::<DL 8s   646r   r   c                    K   ywr   rE   r   s       r<   r   z/NvidiaSegmentedSTTService._handle_transcription  r   r   r   c                2  K   	 | j                   J d       | j                  J d       | j                          d{    | j                   j                  || j                  d      }| j	                          d{    t        |d      r|j                         }n|}d}t        |dg       }|D ]  }t        |dg       }|s|d	   j                  j                         }|s3t        j                  d
| d       t        || j                  t               | j                  j                          d}| j#                  |d| j                  j                          d{     |st        j                  |  d       yy7 G7 
7 (# t$        $ r@}	t        j&                  |  d|	        t)        |  dt+        |	              Y d}	~	yd}	~	wt,        $ r8}
t        j&                  |  d|
        t)        |  d|
        Y d}
~
yd}
~
ww xY ww)zTranscribe an audio segment.

        Args:
            audio: Raw audio bytes in WAV format (already converted by base class).

        Yields:
            Frame: TranscriptionFrame containing the transcribed text.
        NzASR service not initializedzRecognition config not createdF)r   r   r   r   r   zTranscription: []Tz8: No transcription results found in NVIDIA Riva responsez2: Unexpected response structure from NVIDIA Riva: z*: Unexpected NVIDIA Riva response format: z exception: z error: )error)r   r   r   offline_recognizer   hasattrr   getattrr   stripr   r   r   r   r   r\   r   r   AttributeErrorr  r   rX   	Exception)r   r   raw_responser   transcription_foundr   r   r   textaees              r<   r   z!NvidiaSegmentedSTTService.run_stt  s    0	9$$0O2OO0<<+M-MM+//111  ,,>>udll[`>aL..000 |X.'..0' #( h	26G! ^&v~rB'?55;;=D'7vQ%?@0  MM,. NN33	  /3+"88tT^^E\E\]]]^  'v%]^_ 'K 2
 1< ^  	[LLD6!STVSWXYv%OPSTVPWyYZZZ 	9LLD6aS12dV8A3#7888	9s   H9F F?F =F>AF F %A<F !F
" F HF F 
F 	H6GHH.H
HHHrI   )$rA   rB   rC   rD   rG   r   rW   r   r_   r   rX   r	   r
   r   rV   rY   rv   r   r   r   r   r   r   r   r   r   dictr   r  r   r   r   r   r   r   r   r   s   @r<   r   r     sp    *H))&i &4 1A)1
 &*(,9=,;X! X! 	X!
 $CH-X! c]X! %X! X! 56X! #5/X!t	:X 	:(3- 	:92C 2Bd 	b 	bK DcN   NR)-9A(9K 995 99^E4K-H 99r>   r   )7rD   r   concurrent.futuresr   r   dataclassesr   r   typingr   r   r   r	   r
   logurur   pydanticr   pipecat.frames.framesr   r   r   r   r   r   r   pipecat.services.settingsr   r   r   r   pipecat.services.stt_latencyr   pipecat.services.stt_servicer   r   pipecat.transcriptions.languager   r   pipecat.utils.timer   (pipecat.utils.tracing.service_decoratorsr   riva.clientr   ModuleNotFoundErrorr  r  r  rX   r=   r@   rG   r[   r   rE   r>   r<   <module>r'     s   `  F ( ? ?     ` _ 8 H F / ?,1Ix 1IHSM 1Ih 	 	 	 S S S$xz xv	]9 3 ]9_  ,FLL;qc"#FLLab
&qc*
++,s   0B6 6C2;2C--C2