sarvamai 0.1.9 → 0.1.10-alpha.1

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.
@@ -53,8 +53,8 @@ class SarvamAIClient {
53
53
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
54
54
  "X-Fern-Language": "JavaScript",
55
55
  "X-Fern-SDK-Name": "sarvamai",
56
- "X-Fern-SDK-Version": "0.1.9",
57
- "User-Agent": "sarvamai/0.1.9",
56
+ "X-Fern-SDK-Version": "0.1.10-alpha.1",
57
+ "User-Agent": "sarvamai/0.1.10-alpha.1",
58
58
  "X-Fern-Runtime": core.RUNTIME.type,
59
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
60
60
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -130,16 +130,24 @@ export declare class SpeechToTextJob {
130
130
  /**
131
131
  * Create a new Speech-to-Text bulk job.
132
132
  *
133
- * @param model - The model to use for transcription (default: "saarika:v2.5")
134
- * @param withDiarization - Whether to enable speaker diarization (default: false)
135
- * @param withTimestamps - Whether to include word-level timestamps (default: false)
136
- * @param languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
137
- * @param numSpeakers - The number of distinct speakers in the audio, if known
138
- * @param callback - Optional callback configuration to receive job completion events
133
+ * @param params - Job creation parameters
134
+ * @param params.model - The model to use for transcription (default: "saarika:v2.5")
135
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
136
+ * @param params.withTimestamps - Whether to include word-level timestamps (default: false)
137
+ * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
138
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
139
+ * @param params.callback - Optional callback configuration to receive job completion events
139
140
  * @param requestOptions - Request-specific configuration
140
141
  * @returns A handle to the newly created Speech-to-Text job
141
142
  */
142
- createJob(model?: SarvamAI.SpeechToTextModel, withDiarization?: boolean, withTimestamps?: boolean, languageCode?: SarvamAI.SpeechToTextLanguage, numSpeakers?: number, callback?: SarvamAI.BulkJobCallback, requestOptions?: SpeechToTextJob.RequestOptions): Promise<SpeechToTextJobInstance>;
143
+ createJob(params?: {
144
+ model?: SarvamAI.SpeechToTextModel;
145
+ withDiarization?: boolean;
146
+ withTimestamps?: boolean;
147
+ languageCode?: SarvamAI.SpeechToTextLanguage;
148
+ numSpeakers?: number;
149
+ callback?: SarvamAI.BulkJobCallback;
150
+ }, requestOptions?: SpeechToTextJob.RequestOptions): Promise<SpeechToTextJobInstance>;
143
151
  /**
144
152
  * Get an existing Speech-to-Text job handle by job ID.
145
153
  *
@@ -447,17 +447,19 @@ class SpeechToTextJob {
447
447
  /**
448
448
  * Create a new Speech-to-Text bulk job.
449
449
  *
450
- * @param model - The model to use for transcription (default: "saarika:v2.5")
451
- * @param withDiarization - Whether to enable speaker diarization (default: false)
452
- * @param withTimestamps - Whether to include word-level timestamps (default: false)
453
- * @param languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
454
- * @param numSpeakers - The number of distinct speakers in the audio, if known
455
- * @param callback - Optional callback configuration to receive job completion events
450
+ * @param params - Job creation parameters
451
+ * @param params.model - The model to use for transcription (default: "saarika:v2.5")
452
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
453
+ * @param params.withTimestamps - Whether to include word-level timestamps (default: false)
454
+ * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
455
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
456
+ * @param params.callback - Optional callback configuration to receive job completion events
456
457
  * @param requestOptions - Request-specific configuration
457
458
  * @returns A handle to the newly created Speech-to-Text job
458
459
  */
459
460
  createJob() {
460
- return __awaiter(this, arguments, void 0, function* (model = "saarika:v2.5", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, callback, requestOptions) {
461
+ return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
462
+ const { model = "saarika:v2.5", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, callback } = params;
461
463
  const response = yield this.initialise({
462
464
  job_parameters: {
463
465
  language_code: languageCode,
@@ -134,15 +134,22 @@ export declare class SpeechToTextTranslateJob {
134
134
  /**
135
135
  * Create a new Speech-to-Text-Translate bulk job.
136
136
  *
137
- * @param model - The model to use for speech-to-text translation (default: "saaras:v2.5")
138
- * @param withDiarization - Whether to enable speaker diarization (default: false)
139
- * @param prompt - An optional prompt to guide the transcription and translation model
140
- * @param numSpeakers - The number of distinct speakers in the audio, if known
141
- * @param callback - Optional callback configuration to receive job completion events
137
+ * @param params - Job creation parameters
138
+ * @param params.model - The model to use for speech-to-text translation (default: "saaras:v2.5")
139
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
140
+ * @param params.prompt - An optional prompt to guide the transcription and translation model
141
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
142
+ * @param params.callback - Optional callback configuration to receive job completion events
142
143
  * @param requestOptions - Request-specific configuration
143
144
  * @returns A handle to the newly created Speech-to-Text-Translate job
144
145
  */
145
- createJob(model?: SarvamAI.SpeechToTextTranslateModel, withDiarization?: boolean, prompt?: string, numSpeakers?: number, callback?: SarvamAI.BulkJobCallback, requestOptions?: SpeechToTextTranslateJob.RequestOptions): Promise<SpeechToTextTranslateJobInstance>;
146
+ createJob(params?: {
147
+ model?: SarvamAI.SpeechToTextTranslateModel;
148
+ withDiarization?: boolean;
149
+ prompt?: string;
150
+ numSpeakers?: number;
151
+ callback?: SarvamAI.BulkJobCallback;
152
+ }, requestOptions?: SpeechToTextTranslateJob.RequestOptions): Promise<SpeechToTextTranslateJobInstance>;
146
153
  /**
147
154
  * Get an existing Speech-to-Text-Translate job handle by job ID.
148
155
  *
@@ -480,16 +480,18 @@ class SpeechToTextTranslateJob {
480
480
  /**
481
481
  * Create a new Speech-to-Text-Translate bulk job.
482
482
  *
483
- * @param model - The model to use for speech-to-text translation (default: "saaras:v2.5")
484
- * @param withDiarization - Whether to enable speaker diarization (default: false)
485
- * @param prompt - An optional prompt to guide the transcription and translation model
486
- * @param numSpeakers - The number of distinct speakers in the audio, if known
487
- * @param callback - Optional callback configuration to receive job completion events
483
+ * @param params - Job creation parameters
484
+ * @param params.model - The model to use for speech-to-text translation (default: "saaras:v2.5")
485
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
486
+ * @param params.prompt - An optional prompt to guide the transcription and translation model
487
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
488
+ * @param params.callback - Optional callback configuration to receive job completion events
488
489
  * @param requestOptions - Request-specific configuration
489
490
  * @returns A handle to the newly created Speech-to-Text-Translate job
490
491
  */
491
492
  createJob() {
492
- return __awaiter(this, arguments, void 0, function* (model = "saaras:v2.5", withDiarization = false, prompt, numSpeakers, callback, requestOptions) {
493
+ return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
494
+ const { model = "saaras:v2.5", withDiarization = false, prompt, numSpeakers, callback } = params;
493
495
  const response = yield this.initialise({
494
496
  job_parameters: {
495
497
  prompt: prompt,
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.9";
1
+ export declare const SDK_VERSION = "0.1.10-alpha.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.9";
4
+ exports.SDK_VERSION = "0.1.10-alpha.1";
@@ -17,8 +17,8 @@ export class SarvamAIClient {
17
17
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
18
18
  "X-Fern-Language": "JavaScript",
19
19
  "X-Fern-SDK-Name": "sarvamai",
20
- "X-Fern-SDK-Version": "0.1.9",
21
- "User-Agent": "sarvamai/0.1.9",
20
+ "X-Fern-SDK-Version": "0.1.10-alpha.1",
21
+ "User-Agent": "sarvamai/0.1.10-alpha.1",
22
22
  "X-Fern-Runtime": core.RUNTIME.type,
23
23
  "X-Fern-Runtime-Version": core.RUNTIME.version,
24
24
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -130,16 +130,24 @@ export declare class SpeechToTextJob {
130
130
  /**
131
131
  * Create a new Speech-to-Text bulk job.
132
132
  *
133
- * @param model - The model to use for transcription (default: "saarika:v2.5")
134
- * @param withDiarization - Whether to enable speaker diarization (default: false)
135
- * @param withTimestamps - Whether to include word-level timestamps (default: false)
136
- * @param languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
137
- * @param numSpeakers - The number of distinct speakers in the audio, if known
138
- * @param callback - Optional callback configuration to receive job completion events
133
+ * @param params - Job creation parameters
134
+ * @param params.model - The model to use for transcription (default: "saarika:v2.5")
135
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
136
+ * @param params.withTimestamps - Whether to include word-level timestamps (default: false)
137
+ * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
138
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
139
+ * @param params.callback - Optional callback configuration to receive job completion events
139
140
  * @param requestOptions - Request-specific configuration
140
141
  * @returns A handle to the newly created Speech-to-Text job
141
142
  */
142
- createJob(model?: SarvamAI.SpeechToTextModel, withDiarization?: boolean, withTimestamps?: boolean, languageCode?: SarvamAI.SpeechToTextLanguage, numSpeakers?: number, callback?: SarvamAI.BulkJobCallback, requestOptions?: SpeechToTextJob.RequestOptions): Promise<SpeechToTextJobInstance>;
143
+ createJob(params?: {
144
+ model?: SarvamAI.SpeechToTextModel;
145
+ withDiarization?: boolean;
146
+ withTimestamps?: boolean;
147
+ languageCode?: SarvamAI.SpeechToTextLanguage;
148
+ numSpeakers?: number;
149
+ callback?: SarvamAI.BulkJobCallback;
150
+ }, requestOptions?: SpeechToTextJob.RequestOptions): Promise<SpeechToTextJobInstance>;
143
151
  /**
144
152
  * Get an existing Speech-to-Text job handle by job ID.
145
153
  *
@@ -408,17 +408,19 @@ export class SpeechToTextJob {
408
408
  /**
409
409
  * Create a new Speech-to-Text bulk job.
410
410
  *
411
- * @param model - The model to use for transcription (default: "saarika:v2.5")
412
- * @param withDiarization - Whether to enable speaker diarization (default: false)
413
- * @param withTimestamps - Whether to include word-level timestamps (default: false)
414
- * @param languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
415
- * @param numSpeakers - The number of distinct speakers in the audio, if known
416
- * @param callback - Optional callback configuration to receive job completion events
411
+ * @param params - Job creation parameters
412
+ * @param params.model - The model to use for transcription (default: "saarika:v2.5")
413
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
414
+ * @param params.withTimestamps - Whether to include word-level timestamps (default: false)
415
+ * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN")
416
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
417
+ * @param params.callback - Optional callback configuration to receive job completion events
417
418
  * @param requestOptions - Request-specific configuration
418
419
  * @returns A handle to the newly created Speech-to-Text job
419
420
  */
420
421
  createJob() {
421
- return __awaiter(this, arguments, void 0, function* (model = "saarika:v2.5", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, callback, requestOptions) {
422
+ return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
423
+ const { model = "saarika:v2.5", withDiarization = false, withTimestamps = false, languageCode, numSpeakers, callback } = params;
422
424
  const response = yield this.initialise({
423
425
  job_parameters: {
424
426
  language_code: languageCode,
@@ -134,15 +134,22 @@ export declare class SpeechToTextTranslateJob {
134
134
  /**
135
135
  * Create a new Speech-to-Text-Translate bulk job.
136
136
  *
137
- * @param model - The model to use for speech-to-text translation (default: "saaras:v2.5")
138
- * @param withDiarization - Whether to enable speaker diarization (default: false)
139
- * @param prompt - An optional prompt to guide the transcription and translation model
140
- * @param numSpeakers - The number of distinct speakers in the audio, if known
141
- * @param callback - Optional callback configuration to receive job completion events
137
+ * @param params - Job creation parameters
138
+ * @param params.model - The model to use for speech-to-text translation (default: "saaras:v2.5")
139
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
140
+ * @param params.prompt - An optional prompt to guide the transcription and translation model
141
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
142
+ * @param params.callback - Optional callback configuration to receive job completion events
142
143
  * @param requestOptions - Request-specific configuration
143
144
  * @returns A handle to the newly created Speech-to-Text-Translate job
144
145
  */
145
- createJob(model?: SarvamAI.SpeechToTextTranslateModel, withDiarization?: boolean, prompt?: string, numSpeakers?: number, callback?: SarvamAI.BulkJobCallback, requestOptions?: SpeechToTextTranslateJob.RequestOptions): Promise<SpeechToTextTranslateJobInstance>;
146
+ createJob(params?: {
147
+ model?: SarvamAI.SpeechToTextTranslateModel;
148
+ withDiarization?: boolean;
149
+ prompt?: string;
150
+ numSpeakers?: number;
151
+ callback?: SarvamAI.BulkJobCallback;
152
+ }, requestOptions?: SpeechToTextTranslateJob.RequestOptions): Promise<SpeechToTextTranslateJobInstance>;
146
153
  /**
147
154
  * Get an existing Speech-to-Text-Translate job handle by job ID.
148
155
  *
@@ -441,16 +441,18 @@ export class SpeechToTextTranslateJob {
441
441
  /**
442
442
  * Create a new Speech-to-Text-Translate bulk job.
443
443
  *
444
- * @param model - The model to use for speech-to-text translation (default: "saaras:v2.5")
445
- * @param withDiarization - Whether to enable speaker diarization (default: false)
446
- * @param prompt - An optional prompt to guide the transcription and translation model
447
- * @param numSpeakers - The number of distinct speakers in the audio, if known
448
- * @param callback - Optional callback configuration to receive job completion events
444
+ * @param params - Job creation parameters
445
+ * @param params.model - The model to use for speech-to-text translation (default: "saaras:v2.5")
446
+ * @param params.withDiarization - Whether to enable speaker diarization (default: false)
447
+ * @param params.prompt - An optional prompt to guide the transcription and translation model
448
+ * @param params.numSpeakers - The number of distinct speakers in the audio, if known
449
+ * @param params.callback - Optional callback configuration to receive job completion events
449
450
  * @param requestOptions - Request-specific configuration
450
451
  * @returns A handle to the newly created Speech-to-Text-Translate job
451
452
  */
452
453
  createJob() {
453
- return __awaiter(this, arguments, void 0, function* (model = "saaras:v2.5", withDiarization = false, prompt, numSpeakers, callback, requestOptions) {
454
+ return __awaiter(this, arguments, void 0, function* (params = {}, requestOptions) {
455
+ const { model = "saaras:v2.5", withDiarization = false, prompt, numSpeakers, callback } = params;
454
456
  const response = yield this.initialise({
455
457
  job_parameters: {
456
458
  prompt: prompt,
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.9";
1
+ export declare const SDK_VERSION = "0.1.10-alpha.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.9";
1
+ export const SDK_VERSION = "0.1.10-alpha.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarvamai",
3
- "version": "0.1.9",
3
+ "version": "0.1.10-alpha.1",
4
4
  "private": false,
5
5
  "repository": "https://github.com/sarvamai/sarvam-javascript-sdk",
6
6
  "type": "commonjs",