32
32
ClientSecretsWithStreamingResponse ,
33
33
AsyncClientSecretsWithStreamingResponse ,
34
34
)
35
- from ...types .realtime import session_update_event_param , transcription_session_update_param
35
+ from ...types .realtime import session_update_event_param
36
36
from ...types .websocket_connection_options import WebsocketConnectionOptions
37
37
from ...types .realtime .realtime_client_event import RealtimeClientEvent
38
38
from ...types .realtime .realtime_server_event import RealtimeServerEvent
@@ -199,7 +199,6 @@ class AsyncRealtimeConnection:
199
199
input_audio_buffer : AsyncRealtimeInputAudioBufferResource
200
200
conversation : AsyncRealtimeConversationResource
201
201
output_audio_buffer : AsyncRealtimeOutputAudioBufferResource
202
- transcription_session : AsyncRealtimeTranscriptionSessionResource
203
202
204
203
_connection : AsyncWebsocketConnection
205
204
@@ -211,7 +210,6 @@ def __init__(self, connection: AsyncWebsocketConnection) -> None:
211
210
self .input_audio_buffer = AsyncRealtimeInputAudioBufferResource (self )
212
211
self .conversation = AsyncRealtimeConversationResource (self )
213
212
self .output_audio_buffer = AsyncRealtimeOutputAudioBufferResource (self )
214
- self .transcription_session = AsyncRealtimeTranscriptionSessionResource (self )
215
213
216
214
async def __aiter__ (self ) -> AsyncIterator [RealtimeServerEvent ]:
217
215
"""
@@ -381,7 +379,6 @@ class RealtimeConnection:
381
379
input_audio_buffer : RealtimeInputAudioBufferResource
382
380
conversation : RealtimeConversationResource
383
381
output_audio_buffer : RealtimeOutputAudioBufferResource
384
- transcription_session : RealtimeTranscriptionSessionResource
385
382
386
383
_connection : WebsocketConnection
387
384
@@ -393,7 +390,6 @@ def __init__(self, connection: WebsocketConnection) -> None:
393
390
self .input_audio_buffer = RealtimeInputAudioBufferResource (self )
394
391
self .conversation = RealtimeConversationResource (self )
395
392
self .output_audio_buffer = RealtimeOutputAudioBufferResource (self )
396
- self .transcription_session = RealtimeTranscriptionSessionResource (self )
397
393
398
394
def __iter__ (self ) -> Iterator [RealtimeServerEvent ]:
399
395
"""
@@ -565,8 +561,7 @@ def update(self, *, session: session_update_event_param.Session, event_id: str |
565
561
"""
566
562
Send this event to update the session’s configuration.
567
563
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.
570
565
571
566
When the server receives a `session.update`, it will respond
572
567
with a `session.updated` event showing the full, effective configuration.
@@ -800,19 +795,6 @@ def clear(self, *, event_id: str | NotGiven = NOT_GIVEN) -> None:
800
795
)
801
796
802
797
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
-
816
798
class BaseAsyncRealtimeConnectionResource :
817
799
def __init__ (self , connection : AsyncRealtimeConnection ) -> None :
818
800
self ._connection = connection
@@ -825,8 +807,7 @@ async def update(
825
807
"""
826
808
Send this event to update the session’s configuration.
827
809
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.
830
811
831
812
When the server receives a `session.update`, it will respond
832
813
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:
1058
1039
await self ._connection .send (
1059
1040
cast (RealtimeClientEventParam , strip_not_given ({"type" : "output_audio_buffer.clear" , "event_id" : event_id }))
1060
1041
)
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