Skip to content

Commit 2506e29

Browse files
AssemblyAIdan-ince-aai
authored andcommitted
Project import generated by Copybara.
GitOrigin-RevId: ad224a848ad094d931b98cc76a921d550ed6dd8e
1 parent 4d3036a commit 2506e29

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "assemblyai",
3-
"version": "4.18.4",
3+
"version": "4.18.5",
44
"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.",
55
"engines": {
66
"node": ">=18"

src/services/streaming/service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ export class StreamingTranscriber {
124124
);
125125
}
126126

127+
if (this.params.speechModel) {
128+
searchParams.set("speech_model", this.params.speechModel.toString());
129+
}
130+
127131
url.search = searchParams.toString();
128132

129133
return url;

src/types/streaming/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type StreamingTranscriberParams = {
1313
filterProfanity?: boolean;
1414
keyterms?: string[];
1515
keytermsPrompt?: string[];
16+
speechModel?: StreamingSpeechModel;
1617
};
1718

1819
export type StreamingEvents = "open" | "close" | "turn" | "error";
@@ -24,6 +25,8 @@ export type StreamingListeners = {
2425
error?: (error: Error) => void;
2526
};
2627

28+
export type StreamingSpeechModel = "universal-streaming-english" | "universal-streaming-multilingual";
29+
2730
export type StreamingTokenParams = {
2831
expires_in_seconds: number;
2932
max_session_duration_seconds?: number;

0 commit comments

Comments
 (0)