+
    ji                         ^ RI t ^ RIt^ RIHt ]! RR7       ! R R4      4       t]! 4       tR R ltR	^/R
 R lltR R ltR R lt	R# )    N)	dataclassT)frozenc                   <   a  ] tR t^t o RtRt^t^tV 3R ltRt	V t
R# )McubeAudioSpeczaudio/x-mulawi@  c                J   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   # )   encodingsample_ratesample_width_bytesnum_channels)strint)format__classdict__s   "]E:\live-kit-agent\livekit_voicebot\backend\agent_runtime\src\mcube_integration\mcube_codec.py__annotate__McubeAudioSpec.__annotate__   s9      #  	 
         N)__name__
__module____qualname____firstlineno__r	   r
   r   r   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r      s#      $HKL  r   r   c                0    V ^8  d   QhR\         R\         /# )r   pcm16_bytesreturn)bytes)r   s   "r   r   r      s     N N N% Nr   c                L    \         P                  ! V \        P                  4      # )z.PCM16 (linear signed int16 LE) -> mulaw bytes.)audiooplin2ulawMCUBE_AUDIO_SPECr   )r   s   &r   pcm16_to_mulawr%      s     K)9)L)LMMr   width_bytesc                <    V ^8  d   QhR\         R\        R\         /# )r   mulaw_bytesr&   r   )r    r   )r   s   "r   r   r      s!     6 6 6s 65 6r   c               .    \         P                  ! W4      # )z.mulaw bytes -> PCM16 (linear signed int16 LE).)r"   ulaw2lin)r(   r&   s   &$r   mulaw_to_pcm16r+      s    K55r   c                0    V ^8  d   QhR\         R\        /# )r   rawr   )r    r   )r   s   "r   r   r      s     1 1 13 1r   c                 L    \         P                  ! V 4      P                  R 4      # )ascii)base64	b64encodedecode)r-   s   &r   to_base64_bytesr3      s    C ''00r   c                0    V ^8  d   QhR\         R\        /# )r   b64r   )r   r    )r   s   "r   r   r   !   s     ! ! ! !r   c                 .    \         P                  ! V 4      # )N)r0   	b64decode)r5   s   &r   from_base64_strr8   !   s    C  r   )
r"   r0   dataclassesr   r   r$   r%   r+   r3   r8   r   r   r   <module>r:      sS      ! $   "# N6Q 6
1!r   