assemblyai
Advanced tools
Comparing version 4.3.3 to 4.3.4
# Changelog | ||
## [4.3.4] - 2024-04-02 | ||
### Added | ||
- `SpeechModel.Best` enum | ||
- `TranscriptListItem.error` property | ||
### Updated | ||
- Make `PageDetails.prev_url` nullable | ||
- Rename Realtime to Streaming inside code documentation | ||
- More inline code documentation | ||
### Fixed | ||
- Rename `SubstitutionPolicy` literal "entity_type" to "entity_name" | ||
- Fix the pagination example in "List transcripts" sample on README | ||
## [4.3.3] - 2024-03-18 | ||
@@ -4,0 +22,0 @@ |
@@ -110,3 +110,3 @@ /** | ||
/** | ||
* Set to true to end your real-time session forever | ||
* Set to true to end your streaming session forever | ||
*/ | ||
@@ -113,0 +113,0 @@ terminate_session: boolean; |
{ | ||
"name": "assemblyai", | ||
"version": "4.3.3", | ||
"version": "4.3.4", | ||
"description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -22,3 +22,2 @@ <img src="https://github.com/AssemblyAI/assemblyai-node-sdk/blob/main/assemblyai.png?raw=true" width="500"/> | ||
Visit the [AssemblyAI documentation](https://www.assemblyai.com/docs) for step-by-step instructions and a lot more details about our AI models and API. | ||
Explore the [SDK API reference](https://assemblyai.github.io/assemblyai-node-sdk/) for more details on the SDK types, functions, and classes. | ||
@@ -189,9 +188,14 @@ ## Quickstart | ||
```typescript | ||
let nextPageUrl: string | null = null; | ||
let previousPageUrl: string | null = null; | ||
do { | ||
const page = await client.transcripts.list(nextPageUrl); | ||
nextPageUrl = page.page_details.next_url; | ||
} while (nextPageUrl !== null); | ||
const page = await client.transcripts.list(previousPageUrl); | ||
previousPageUrl = page.page_details.prev_url; | ||
} while (previousPageUrl !== null); | ||
``` | ||
> [!NOTE] | ||
> To paginate over all pages, you need to use the `page.page_details.prev_url` | ||
> because the transcripts are returned in descending order by creation date and time. | ||
> The first page is are the most recent transcript, and each "previous" page are older transcripts. | ||
</details> | ||
@@ -246,5 +250,5 @@ | ||
rt.on("close", (code: number, reason: string) => console.log('Closed', code, reason)); | ||
rt.on("transcript", (transcript: RealtimeTranscript) => console.log('Transcript:', transcript)); | ||
rt.on("transcript.partial", (transcript: PartialTranscript) => console.log('Partial transcript:', transcript)); | ||
rt.on("transcript.final", (transcript: FinalTranscript) => console.log('Final transcript:', transcript)); | ||
rt.on("transcript", (transcript: TranscriptMessage) => console.log('Transcript:', transcript)); | ||
rt.on("transcript.partial", (transcript: PartialTranscriptMessage) => console.log('Partial transcript:', transcript)); | ||
rt.on("transcript.final", (transcript: FinalTranscriptMessage) => console.log('Final transcript:', transcript)); | ||
rt.on("error", (error: Error) => console.error('Error', error)); | ||
@@ -251,0 +255,0 @@ ``` |
@@ -152,3 +152,3 @@ // this file is generated by typescript/scripts/generate-types.ts | ||
/** | ||
* Set to true to end your real-time session forever | ||
* Set to true to end your streaming session forever | ||
*/ | ||
@@ -155,0 +155,0 @@ terminate_session: boolean; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
470416
12648
346