@@ -78,27 +78,67 @@ def with_streaming_response(self) -> AsyncAudioWithStreamingResponse:
78
78
79
79
class AudioWithRawResponse :
80
80
def __init__ (self , audio : Audio ) -> None :
81
- self .transcriptions = TranscriptionsWithRawResponse (audio .transcriptions )
82
- self .translations = TranslationsWithRawResponse (audio .translations )
83
- self .speech = SpeechWithRawResponse (audio .speech )
81
+ self ._audio = audio
82
+
83
+ @cached_property
84
+ def transcriptions (self ) -> TranscriptionsWithRawResponse :
85
+ return TranscriptionsWithRawResponse (self ._audio .transcriptions )
86
+
87
+ @cached_property
88
+ def translations (self ) -> TranslationsWithRawResponse :
89
+ return TranslationsWithRawResponse (self ._audio .translations )
90
+
91
+ @cached_property
92
+ def speech (self ) -> SpeechWithRawResponse :
93
+ return SpeechWithRawResponse (self ._audio .speech )
84
94
85
95
86
96
class AsyncAudioWithRawResponse :
87
97
def __init__ (self , audio : AsyncAudio ) -> None :
88
- self .transcriptions = AsyncTranscriptionsWithRawResponse (audio .transcriptions )
89
- self .translations = AsyncTranslationsWithRawResponse (audio .translations )
90
- self .speech = AsyncSpeechWithRawResponse (audio .speech )
98
+ self ._audio = audio
99
+
100
+ @cached_property
101
+ def transcriptions (self ) -> AsyncTranscriptionsWithRawResponse :
102
+ return AsyncTranscriptionsWithRawResponse (self ._audio .transcriptions )
103
+
104
+ @cached_property
105
+ def translations (self ) -> AsyncTranslationsWithRawResponse :
106
+ return AsyncTranslationsWithRawResponse (self ._audio .translations )
107
+
108
+ @cached_property
109
+ def speech (self ) -> AsyncSpeechWithRawResponse :
110
+ return AsyncSpeechWithRawResponse (self ._audio .speech )
91
111
92
112
93
113
class AudioWithStreamingResponse :
94
114
def __init__ (self , audio : Audio ) -> None :
95
- self .transcriptions = TranscriptionsWithStreamingResponse (audio .transcriptions )
96
- self .translations = TranslationsWithStreamingResponse (audio .translations )
97
- self .speech = SpeechWithStreamingResponse (audio .speech )
115
+ self ._audio = audio
116
+
117
+ @cached_property
118
+ def transcriptions (self ) -> TranscriptionsWithStreamingResponse :
119
+ return TranscriptionsWithStreamingResponse (self ._audio .transcriptions )
120
+
121
+ @cached_property
122
+ def translations (self ) -> TranslationsWithStreamingResponse :
123
+ return TranslationsWithStreamingResponse (self ._audio .translations )
124
+
125
+ @cached_property
126
+ def speech (self ) -> SpeechWithStreamingResponse :
127
+ return SpeechWithStreamingResponse (self ._audio .speech )
98
128
99
129
100
130
class AsyncAudioWithStreamingResponse :
101
131
def __init__ (self , audio : AsyncAudio ) -> None :
102
- self .transcriptions = AsyncTranscriptionsWithStreamingResponse (audio .transcriptions )
103
- self .translations = AsyncTranslationsWithStreamingResponse (audio .translations )
104
- self .speech = AsyncSpeechWithStreamingResponse (audio .speech )
132
+ self ._audio = audio
133
+
134
+ @cached_property
135
+ def transcriptions (self ) -> AsyncTranscriptionsWithStreamingResponse :
136
+ return AsyncTranscriptionsWithStreamingResponse (self ._audio .transcriptions )
137
+
138
+ @cached_property
139
+ def translations (self ) -> AsyncTranslationsWithStreamingResponse :
140
+ return AsyncTranslationsWithStreamingResponse (self ._audio .translations )
141
+
142
+ @cached_property
143
+ def speech (self ) -> AsyncSpeechWithStreamingResponse :
144
+ return AsyncSpeechWithStreamingResponse (self ._audio .speech )
0 commit comments