Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "assemblyai",
"version": "4.36.4",
"version": "4.36.5",
"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.",
"engines": {
"node": ">=18"
Expand Down
8 changes: 8 additions & 0 deletions src/types/openapi.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,10 @@ export type ParagraphsResponse = {
* An array of paragraphs in the transcript
*/
paragraphs: TranscriptParagraph[];
/**
* The actual speech model that was used for the transcription
*/
speech_model_used?: string | null;
};

/**
Expand Down Expand Up @@ -1430,6 +1434,10 @@ export type SentencesResponse = {
* An array of sentences in the transcript
*/
sentences: TranscriptSentence[];
/**
* The actual speech model that was used for the transcription
*/
speech_model_used?: string | null;
};

export type Sentiment = "POSITIVE" | "NEUTRAL" | "NEGATIVE";
Expand Down
14 changes: 12 additions & 2 deletions tests/unit/transcript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,18 @@ describe("transcript", () => {
url: `/v2/transcript/${transcriptId}/paragraphs`,
method: "GET",
}),
JSON.stringify({ transcriptId, paragraphs: ["paragraph 1"] }),
JSON.stringify({
transcriptId,
paragraphs: ["paragraph 1"],
speech_model_used: "universal-2",
}),
);
const paragraphsResponse =
await assembly.transcripts.paragraphs(transcriptId);

expect(paragraphsResponse.paragraphs).toBeInstanceOf(Array);
expect(paragraphsResponse.paragraphs.length).toBeGreaterThan(0);
expect(paragraphsResponse.speech_model_used).toBe("universal-2");
});

it("should get sentences", async () => {
Expand All @@ -375,13 +380,18 @@ describe("transcript", () => {
url: `/v2/transcript/${transcriptId}/sentences`,
method: "GET",
}),
JSON.stringify({ transcriptId, sentences: ["sentence 1"] }),
JSON.stringify({
transcriptId,
sentences: ["sentence 1"],
speech_model_used: "universal-2",
}),
);
const sentencesResponse =
await assembly.transcripts.sentences(transcriptId);

expect(sentencesResponse.sentences).toBeInstanceOf(Array);
expect(sentencesResponse.sentences.length).toBeGreaterThan(0);
expect(sentencesResponse.speech_model_used).toBe("universal-2");
});

it("should get srt subtitles", async () => {
Expand Down
Loading