assemblyai 3.1.3 → 4.0.0-beta.0
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 -5
- package/dist/assemblyai.umd.js +689 -0
- package/dist/assemblyai.umd.min.js +1 -0
- package/dist/browser/fs.d.ts +6 -0
- package/dist/index.browser.js +676 -0
- package/dist/index.cjs +25 -17
- package/dist/index.mjs +25 -17
- package/dist/services/realtime/service.d.ts +3 -2
- package/package.json +10 -3
- package/src/browser/fs.ts +8 -0
- package/src/services/files/index.ts +0 -2
- package/src/services/realtime/service.ts +32 -22
package/README.md
CHANGED
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
[
|
|
11
11
|
](https://assemblyai.com/discord)
|
|
12
12
|
|
|
13
|
-
# AssemblyAI
|
|
13
|
+
# AssemblyAI JavaScript SDK
|
|
14
14
|
|
|
15
|
-
The AssemblyAI
|
|
15
|
+
The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API,
|
|
16
16
|
which supports async and real-time transcription, as well as the latest LeMUR models.
|
|
17
|
+
It is written primarily for Node.js in TypeScript with all types exported, but also [compatible with other runtimes](./docs/compat.md).
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
19
20
|
|
|
@@ -51,7 +52,7 @@ You can now use the `client` object to interact with the AssemblyAI API.
|
|
|
51
52
|
|
|
52
53
|
## Create a transcript
|
|
53
54
|
|
|
54
|
-
When you create a transcript, you can either pass in a URL to an audio file
|
|
55
|
+
When you create a transcript, you can either pass in a URL to an audio file or upload a file directly.
|
|
55
56
|
|
|
56
57
|
```javascript
|
|
57
58
|
// Transcribe file at remote URL
|
|
@@ -242,10 +243,10 @@ getAudio((chunk) => {
|
|
|
242
243
|
});
|
|
243
244
|
```
|
|
244
245
|
|
|
245
|
-
Or send audio data via a stream by piping to the
|
|
246
|
+
Or send audio data via a stream by piping to the real-time stream.
|
|
246
247
|
|
|
247
248
|
```typescript
|
|
248
|
-
audioStream.
|
|
249
|
+
audioStream.pipeTo(rt.stream());
|
|
249
250
|
```
|
|
250
251
|
|
|
251
252
|
Close the connection when you're finished.
|