
    hm5                    <   S SK Jr  S SKJr  S SKJr  S SKrSSKJr  SSK	J
r
JrJrJrJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJr  SSKJr  SSKJr  SSKJr  SS/r  " S S\5      r! " S S\5      r" " S S5      r# " S S5      r$ " S S5      r% " S S5      r&g)    )annotations)List)LiteralN   )_legacy_response)	NOT_GIVENBodyQueryHeadersNotGiven)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)make_request_options)#transcription_session_create_params)TranscriptionSessionTranscriptionSessionsAsyncTranscriptionSessionsc                      \ rS rSr\SS j5       r\S	S j5       r\\\\\\SSS\S.
                     S
S jjrSr	g)r      c                    [        U 5      $ z
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
)$TranscriptionSessionsWithRawResponseselfs    g/var/www/html/env/lib/python3.13/site-packages/openai/resources/beta/realtime/transcription_sessions.pywith_raw_response'TranscriptionSessions.with_raw_response   s     4D99    c                    [        U 5      $ z
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response
)*TranscriptionSessionsWithStreamingResponser   s    r    with_streaming_response-TranscriptionSessions.with_streaming_response%   s     :$??r#   N
includeinput_audio_formatinput_audio_noise_reductioninput_audio_transcription
modalitiesturn_detectionextra_headersextra_query
extra_bodytimeoutc       
            SS0U=(       d    0 EnU R                  S[        UUUUUUS.[        R                  5      [	        XxXS9[
        S9$ )'
  
Create an ephemeral API token for use in client-side applications with the
Realtime API specifically for realtime transcriptions. Can be configured with
the same session parameters as the `transcription_session.update` client event.

It responds with a session object, plus a `client_secret` key which contains a
usable ephemeral API token that can be used to authenticate browser clients for
the Realtime API.

Args:
  include:
      The set of items to include in the transcription. Current available items are:

      - `item.input_audio_transcription.logprobs`

  input_audio_format: The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. For
      `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate, single channel
      (mono), and little-endian byte order.

  input_audio_noise_reduction: Configuration for input audio noise reduction. This can be set to `null` to turn
      off. Noise reduction filters audio added to the input audio buffer before it is
      sent to VAD and the model. Filtering the audio can improve VAD and turn
      detection accuracy (reducing false positives) and model performance by improving
      perception of the input audio.

  input_audio_transcription: Configuration for input audio transcription. The client can optionally set the
      language and prompt for transcription, these offer additional guidance to the
      transcription service.

  modalities: The set of modalities the model can respond with. To disable audio, set this to
      ["text"].

  turn_detection: Configuration for turn detection, ether Server VAD or Semantic VAD. This can be
      set to `null` to turn off, in which case the client must manually trigger model
      response. Server VAD means that the model will detect the start and end of
      speech based on audio volume and respond at the end of user speech. Semantic VAD
      is more advanced and uses a turn detection model (in conjuction with VAD) to
      semantically estimate whether the user has finished speaking, then dynamically
      sets a timeout based on this probability. For example, if user audio trails off
      with "uhhm", the model will score a low probability of turn end and wait longer
      for the user to continue speaking. This can be useful for more natural
      conversations, but may have a higher latency.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
OpenAI-Betaassistants=v2 /realtime/transcription_sessionsr*   r+   r,   r-   r.   r/   r0   r1   r2   r3   bodyoptionscast_to)_postr   r    TranscriptionSessionCreateParamsr   r   r   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   s              r    createTranscriptionSessions.create.   sq    H 'QM<ORQzz. &*<3N1J",&4 4TT
 )+Q[ )!  
 	
r#    )returnr   )rE   r&   r*   zList[str] | NotGivenr+   z5Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | NotGivenr,   zGtranscription_session_create_params.InputAudioNoiseReduction | NotGivenr-   zFtranscription_session_create_params.InputAudioTranscription | NotGivenr.   z)List[Literal['text', 'audio']] | NotGivenr/   z<transcription_session_create_params.TurnDetection | NotGivenr0   zHeaders | Noner1   zQuery | Noner2   zBody | Noner3   z'float | httpx.Timeout | None | NotGivenrE   r   
__name__
__module____qualname____firstlineno__r   r!   r'   r   rB   __static_attributes__rD   r#   r    r   r      s    : : @ @ )2T]lu@IW` )-$("&;DV
 &V
 R	V

&V
 $jV
 >V
 UV
 &V
 "V
  V
 9V
  
!V
 V
r#   c                      \ rS rSr\SS j5       r\S	S j5       r\\\\\\SSS\S.
                     S
S jjrSr	g)r      c                    [        U 5      $ r   ))AsyncTranscriptionSessionsWithRawResponser   s    r    r!   ,AsyncTranscriptionSessions.with_raw_response   s     9>>r#   c                    [        U 5      $ r%   )/AsyncTranscriptionSessionsWithStreamingResponser   s    r    r'   2AsyncTranscriptionSessions.with_streaming_response   s     ?tDDr#   Nr)   c       
           #    SS0U=(       d    0 EnU R                  S[        UUUUUUS.[        R                  5      I Sh  vN [	        XxXS9[
        S9I Sh  vN $  N N7f)r5   r6   r7   r8   r9   Nr:   r;   )r?   r   r   r@   r   r   rA   s              r    rB   !AsyncTranscriptionSessions.create   s     H 'QM<ORQZZ.,&*<3N1J",&4 4TT
 
 )+Q[ )!   
 
 	


s$   A A#A
A#A!A#!A#rD   )rE   rP   )rE   rS   rF   rG   rD   r#   r    r   r      s    ? ? E E )2T]lu@IW` )-$("&;DV
 &V
 R	V

&V
 $jV
 >V
 UV
 &V
 "V
  V
 9V
  
!V
 V
r#   c                      \ rS rSrSS jrSrg)r      c                Z    Xl         [        R                  " UR                  5      U l        g N)_transcription_sessionsr   to_raw_response_wrapperrB   r   transcription_sessionss     r    __init__-TranscriptionSessionsWithRawResponse.__init__   s#    '=$&>>"))
r#   r[   rB   Nr^   r   rE   NonerH   rI   rJ   rK   r_   rL   rD   r#   r    r   r          
r#   r   c                      \ rS rSrSS jrSrg)rP      c                Z    Xl         [        R                  " UR                  5      U l        g rZ   )r[   r   async_to_raw_response_wrapperrB   r]   s     r    r_   2AsyncTranscriptionSessionsWithRawResponse.__init__   s#    '=$&DD"))
r#   ra   Nr^   r   rE   rc   rd   rD   r#   r    rP   rP      re   r#   rP   c                      \ rS rSrSS jrSrg)r&   i  c                D    Xl         [        UR                  5      U l        g rZ   )r[   r   rB   r]   s     r    r_   3TranscriptionSessionsWithStreamingResponse.__init__  s    '=$2"))
r#   ra   Nrb   rd   rD   r#   r    r&   r&     re   r#   r&   c                      \ rS rSrSS jrSrg)rS   i  c                D    Xl         [        UR                  5      U l        g rZ   )r[   r   rB   r]   s     r    r_   8AsyncTranscriptionSessionsWithStreamingResponse.__init__  s    '=$8"))
r#   ra   Nrk   rd   rD   r#   r    rS   rS     re   r#   rS   )'
__future__r   typingr   typing_extensionsr   httpx r   _typesr   r	   r
   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.beta.realtimer   )types.beta.realtime.transcription_sessionr   __all__r   r   r   rP   r&   rS   rD   r#   r    <module>r      s    #  %  ! @ @ ( ; Z 1 G N"$@
Aj
O j
Zj
!1 j
Z
 

 

 

 
r#   