3232 ClientSecretsWithStreamingResponse ,
3333 AsyncClientSecretsWithStreamingResponse ,
3434)
35- from ...types .realtime import session_update_event_param , transcription_session_update_param
35+ from ...types .realtime import session_update_event_param
3636from ...types .websocket_connection_options import WebsocketConnectionOptions
3737from ...types .realtime .realtime_client_event import RealtimeClientEvent
3838from ...types .realtime .realtime_server_event import RealtimeServerEvent
@@ -199,7 +199,6 @@ class AsyncRealtimeConnection:
199199 input_audio_buffer : AsyncRealtimeInputAudioBufferResource
200200 conversation : AsyncRealtimeConversationResource
201201 output_audio_buffer : AsyncRealtimeOutputAudioBufferResource
202- transcription_session : AsyncRealtimeTranscriptionSessionResource
203202
204203 _connection : AsyncWebsocketConnection
205204
@@ -211,7 +210,6 @@ def __init__(self, connection: AsyncWebsocketConnection) -> None:
211210 self .input_audio_buffer = AsyncRealtimeInputAudioBufferResource (self )
212211 self .conversation = AsyncRealtimeConversationResource (self )
213212 self .output_audio_buffer = AsyncRealtimeOutputAudioBufferResource (self )
214- self .transcription_session = AsyncRealtimeTranscriptionSessionResource (self )
215213
216214 async def __aiter__ (self ) -> AsyncIterator [RealtimeServerEvent ]:
217215 """
@@ -381,7 +379,6 @@ class RealtimeConnection:
381379 input_audio_buffer : RealtimeInputAudioBufferResource
382380 conversation : RealtimeConversationResource
383381 output_audio_buffer : RealtimeOutputAudioBufferResource
384- transcription_session : RealtimeTranscriptionSessionResource
385382
386383 _connection : WebsocketConnection
387384
@@ -393,7 +390,6 @@ def __init__(self, connection: WebsocketConnection) -> None:
393390 self .input_audio_buffer = RealtimeInputAudioBufferResource (self )
394391 self .conversation = RealtimeConversationResource (self )
395392 self .output_audio_buffer = RealtimeOutputAudioBufferResource (self )
396- self .transcription_session = RealtimeTranscriptionSessionResource (self )
397393
398394 def __iter__ (self ) -> Iterator [RealtimeServerEvent ]:
399395 """
@@ -565,8 +561,7 @@ def update(self, *, session: session_update_event_param.Session, event_id: str |
565561 """
566562 Send this event to update the session’s configuration.
567563 The client may send this event at any time to update any field
568- except for `voice` and `model`. `voice` can be updated only if there have been no other
569- audio outputs yet.
564+ except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
570565
571566 When the server receives a `session.update`, it will respond
572567 with a `session.updated` event showing the full, effective configuration.
@@ -800,19 +795,6 @@ def clear(self, *, event_id: str | NotGiven = NOT_GIVEN) -> None:
800795 )
801796
802797
803- class RealtimeTranscriptionSessionResource (BaseRealtimeConnectionResource ):
804- def update (
805- self , * , session : transcription_session_update_param .Session , event_id : str | NotGiven = NOT_GIVEN
806- ) -> None :
807- """Send this event to update a transcription session."""
808- self ._connection .send (
809- cast (
810- RealtimeClientEventParam ,
811- strip_not_given ({"type" : "transcription_session.update" , "session" : session , "event_id" : event_id }),
812- )
813- )
814-
815-
816798class BaseAsyncRealtimeConnectionResource :
817799 def __init__ (self , connection : AsyncRealtimeConnection ) -> None :
818800 self ._connection = connection
@@ -825,8 +807,7 @@ async def update(
825807 """
826808 Send this event to update the session’s configuration.
827809 The client may send this event at any time to update any field
828- except for `voice` and `model`. `voice` can be updated only if there have been no other
829- audio outputs yet.
810+ except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
830811
831812 When the server receives a `session.update`, it will respond
832813 with a `session.updated` event showing the full, effective configuration.
@@ -1058,16 +1039,3 @@ async def clear(self, *, event_id: str | NotGiven = NOT_GIVEN) -> None:
10581039 await self ._connection .send (
10591040 cast (RealtimeClientEventParam , strip_not_given ({"type" : "output_audio_buffer.clear" , "event_id" : event_id }))
10601041 )
1061-
1062-
1063- class AsyncRealtimeTranscriptionSessionResource (BaseAsyncRealtimeConnectionResource ):
1064- async def update (
1065- self , * , session : transcription_session_update_param .Session , event_id : str | NotGiven = NOT_GIVEN
1066- ) -> None :
1067- """Send this event to update a transcription session."""
1068- await self ._connection .send (
1069- cast (
1070- RealtimeClientEventParam ,
1071- strip_not_given ({"type" : "transcription_session.update" , "session" : session , "event_id" : event_id }),
1072- )
1073- )
0 commit comments