@@ -79,7 +79,7 @@ When you create a transcript, you can either pass in a URL to an audio file
79
79
or upload a file directly.
80
80
81
81
``` java
82
- import com.assemblyai.api.types.Transcript ;
82
+ import com.assemblyai.api.resources.transcripts. types.Transcript ;
83
83
84
84
// Transcribe file at remote URL
85
85
Transcript transcript = aai. transcripts(). transcribe(
@@ -94,7 +94,7 @@ transcript = aai.transcripts().transcribe(
94
94
If you don't want to wait until the transcript is ready, you can use submit:
95
95
96
96
``` java
97
- import com.assemblyai.api.types.Transcript ;
97
+ import com.assemblyai.api.resources.transcripts. types.Transcript ;
98
98
99
99
// Transcribe file at remote URL
100
100
Transcript transcript = aai. transcripts(). submit(
@@ -111,7 +111,7 @@ audio streams and sends data over websockets. The Realtime Transcriber
111
111
will take event handlers
112
112
113
113
``` java
114
- import com.assemblyai.api.Transcriber ;
114
+ import com.assemblyai.api.RealtimeTranscriber ;
115
115
116
116
RealtimeTranscriber realtime = RealtimeTranscriber . builder()
117
117
.apiKey(" YOUR_API_KEY" )
@@ -135,13 +135,44 @@ method on `CreateTranscriptParameters` until you have specified the mandatory
135
135
audioUrl variable.
136
136
137
137
``` java
138
- import com.assemblyai.api.TranscriptParams ;
138
+ import com.assemblyai.api.resources.transcripts.requests. 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