@@ -138,10 +138,41 @@ audioUrl variable.
138
138
import com.assemblyai.api.TranscriptParams ;
139
139
140
140
TranscriptParams params = TranscriptParams . builder()
141
- .audioUrl(" https://..." )
142
- .build();
141
+ .audioUrl(" https://..." )
142
+ .build();
143
+ ```
144
+
145
+ ## Timeouts
146
+
147
+ The SDK uses the default timeouts of OkHttpClient:
148
+ - 10 seconds for connection timeout
149
+ - 10 seconds for read timeout
150
+ - 10 seconds for write timeout
151
+ - No timeout for call timeout
152
+
153
+ However, there are ** no timeouts for any LeMUR** HTTP request.
154
+
155
+ To specify your own timeout, you can pass ` RequestOptions ` to each request method:
156
+
157
+ ``` java
158
+ import com.assemblyai.api.core.RequestOptions ;
159
+
160
+ // initialize client
161
+
162
+ client. transcripts()
163
+ .get(
164
+ " 50c54d73-7a3f-44dc-af6b-f4579841b1ce" ,
165
+ RequestOptions . builder()
166
+ .timeout(30 , TimeUnit . SECONDS )
167
+ .build()
168
+ );
143
169
```
144
170
171
+ For this operation, the call timeout will be 30 seconds, and the other timeouts will be turned off.
172
+
173
+ The default timeout should be sufficient for most use cases.
174
+ However, depending on your network speed and distance, you may occasionally experience timeouts, in which case you can increase the timeout.
175
+
145
176
## Contributing
146
177
While we value open-source contributions to this SDK, this library
147
178
is generated programmatically. Additions made directly to this library
0 commit comments