@transcribe-api/sdk 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,7 +52,8 @@ console.log(result);
|
|
|
52
52
|
The SDK automatically chooses the right API flow:
|
|
53
53
|
|
|
54
54
|
- One small local file is sent through the direct synchronous upload path.
|
|
55
|
-
-
|
|
55
|
+
- One remote URL is sent through the direct `/v1/transcribe` endpoint and the API decides whether it can finish immediately or should continue as an async job.
|
|
56
|
+
- Multiple files, files larger than 30 MB, and files estimated over 10 minutes are sent through the async job flow.
|
|
56
57
|
- Large local async uploads use signed R2 upload URLs returned by the API.
|
|
57
58
|
- Multipart upload is used automatically when the backend returns multipart upload instructions.
|
|
58
59
|
- If `polling` is configured, async calls wait until the job reaches a terminal status.
|
|
@@ -131,7 +132,7 @@ const job = await client.transcribe({
|
|
|
131
132
|
});
|
|
132
133
|
```
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
For one remote URL, the SDK submits the request to the direct `/v1/transcribe` endpoint and lets the API decide the final route. Small remote files may complete immediately, while larger or longer remote files automatically fall back to the async job flow.
|
|
135
136
|
|
|
136
137
|
## Batch and mixed input transcription
|
|
137
138
|
|
|
@@ -184,6 +185,8 @@ You can also pass a comma-separated string:
|
|
|
184
185
|
exclude: "metadata,billing"
|
|
185
186
|
```
|
|
186
187
|
|
|
188
|
+
If `exclude` leaves only one transcript field and removes metadata, billing, and detected language, the API returns that remaining value directly instead of a JSON object. For example, text-only responses return a plain string, VTT-only responses return a plain string, and segments-only responses return an array.
|
|
189
|
+
|
|
187
190
|
## Webhooks
|
|
188
191
|
|
|
189
192
|
```js
|
|
@@ -195,7 +198,7 @@ const job = await client.transcribe({
|
|
|
195
198
|
});
|
|
196
199
|
```
|
|
197
200
|
|
|
198
|
-
|
|
201
|
+
For a single file or URL, `webhookUrl` is sent through the direct `/v1/transcribe` endpoint and the API decides whether it can finish immediately or should continue as a job. Multi-file requests still use the async batch flow.
|
|
199
202
|
|
|
200
203
|
## Progress and logs
|
|
201
204
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transcribe-api/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Official JavaScript SDK for Transcribe API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
],
|
|
26
26
|
"author": "Transcribe API",
|
|
27
27
|
"license": "MIT"
|
|
28
|
-
}
|
|
28
|
+
}
|