|
| 1 | +"""Public types for the realtime transcription API (`client.beta.realtime`). |
| 2 | +
|
| 3 | +Import events, options, and exceptions from here: |
| 4 | +
|
| 5 | + from together.realtime import TranscriptCompleted, RealtimeConnectionError |
| 6 | +
|
| 7 | +This module is the stable import surface; the implementation lives in |
| 8 | +`together.lib.realtime` and may be reorganized without notice. |
| 9 | +""" |
| 10 | + |
| 11 | +from .lib.realtime import ( |
| 12 | + BufferGap as BufferGap, |
| 13 | + TurnEvent as TurnEvent, |
| 14 | + Reconnected as Reconnected, |
| 15 | + Reconnecting as Reconnecting, |
| 16 | + UnknownEvent as UnknownEvent, |
| 17 | + BufferOptions as BufferOptions, |
| 18 | + RealtimeError as RealtimeError, |
| 19 | + SessionStarted as SessionStarted, |
| 20 | + TranscriptDelta as TranscriptDelta, |
| 21 | + ReconnectOptions as ReconnectOptions, |
| 22 | + TranscriptFailed as TranscriptFailed, |
| 23 | + EchoResponseEvent as EchoResponseEvent, |
| 24 | + RealtimeErrorInfo as RealtimeErrorInfo, |
| 25 | + TurnDetectionParam as TurnDetectionParam, |
| 26 | + RealtimeServerEvent as RealtimeServerEvent, |
| 27 | + SessionCreatedEvent as SessionCreatedEvent, |
| 28 | + TranscriptCompleted as TranscriptCompleted, |
| 29 | + RealtimeSessionError as RealtimeSessionError, |
| 30 | + RealtimeSessionEvent as RealtimeSessionEvent, |
| 31 | + RealtimeConnectionError as RealtimeConnectionError, |
| 32 | + TranscriptionDeltaEvent as TranscriptionDeltaEvent, |
| 33 | + RealtimeIdleTimeoutError as RealtimeIdleTimeoutError, |
| 34 | + TranscriptionFailedEvent as TranscriptionFailedEvent, |
| 35 | + RealtimeInvalidStateError as RealtimeInvalidStateError, |
| 36 | + RealtimeBufferOverflowError as RealtimeBufferOverflowError, |
| 37 | + TranscriptionCompletedEvent as TranscriptionCompletedEvent, |
| 38 | + InputAudioBufferProcessedEvent as InputAudioBufferProcessedEvent, |
| 39 | +) |
| 40 | + |
| 41 | +__all__ = [ |
| 42 | + # events (wire) |
| 43 | + "RealtimeServerEvent", |
| 44 | + "SessionCreatedEvent", |
| 45 | + "TranscriptionDeltaEvent", |
| 46 | + "TranscriptionCompletedEvent", |
| 47 | + "TranscriptionFailedEvent", |
| 48 | + "TurnEvent", |
| 49 | + "InputAudioBufferProcessedEvent", |
| 50 | + "EchoResponseEvent", |
| 51 | + "UnknownEvent", |
| 52 | + "RealtimeErrorInfo", |
| 53 | + # events (normalized session) |
| 54 | + "RealtimeSessionEvent", |
| 55 | + "SessionStarted", |
| 56 | + "TranscriptDelta", |
| 57 | + "TranscriptCompleted", |
| 58 | + "TranscriptFailed", |
| 59 | + "Reconnecting", |
| 60 | + "Reconnected", |
| 61 | + "BufferGap", |
| 62 | + # options |
| 63 | + "TurnDetectionParam", |
| 64 | + "ReconnectOptions", |
| 65 | + "BufferOptions", |
| 66 | + # exceptions |
| 67 | + "RealtimeError", |
| 68 | + "RealtimeConnectionError", |
| 69 | + "RealtimeSessionError", |
| 70 | + "RealtimeIdleTimeoutError", |
| 71 | + "RealtimeBufferOverflowError", |
| 72 | + "RealtimeInvalidStateError", |
| 73 | +] |
0 commit comments