together-ai 0.28.0 → 0.29.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/audio/audio.d.mts +20 -8
- package/resources/audio/audio.d.mts.map +1 -1
- package/resources/audio/audio.d.ts +20 -8
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/transcriptions.d.mts +67 -0
- package/resources/audio/transcriptions.d.mts.map +1 -1
- package/resources/audio/transcriptions.d.ts +67 -0
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/translations.d.mts +4 -0
- package/resources/audio/translations.d.mts.map +1 -1
- package/resources/audio/translations.d.ts +4 -0
- package/resources/audio/translations.d.ts.map +1 -1
- package/src/resources/audio/audio.ts +20 -8
- package/src/resources/audio/transcriptions.ts +80 -0
- package/src/resources/audio/translations.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.29.0 (2025-10-30)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.28.0...v0.29.0](https://github.com/togethercomputer/together-typescript/compare/v0.28.0...v0.29.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([aeac27b](https://github.com/togethercomputer/together-typescript/commit/aeac27be216e075e69f1c031e732c178f94925b5))
|
|
10
|
+
|
|
3
11
|
## 0.28.0 (2025-10-23)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.27.0...v0.28.0](https://github.com/togethercomputer/together-typescript/compare/v0.27.0...v0.28.0)
|
package/package.json
CHANGED
|
@@ -17,8 +17,8 @@ export declare class Audio extends APIResource {
|
|
|
17
17
|
* ```ts
|
|
18
18
|
* const audio = await client.audio.create({
|
|
19
19
|
* input: 'input',
|
|
20
|
-
* model: '
|
|
21
|
-
* voice: '
|
|
20
|
+
* model: 'canopylabs/orpheus-3b-0.1-ft',
|
|
21
|
+
* voice: 'voice',
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
24
|
* const content = await audio.blob();
|
|
@@ -56,15 +56,24 @@ export interface AudioCreateParamsBase {
|
|
|
56
56
|
* The name of the model to query.
|
|
57
57
|
*
|
|
58
58
|
* [See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#audio-models)
|
|
59
|
+
* The current supported tts models are: - cartesia/sonic - hexgrad/Kokoro-82M -
|
|
60
|
+
* canopylabs/orpheus-3b-0.1-ft
|
|
59
61
|
*/
|
|
60
|
-
model: 'cartesia/sonic' | (string & {});
|
|
62
|
+
model: 'cartesia/sonic' | 'hexgrad/Kokoro-82M' | 'canopylabs/orpheus-3b-0.1-ft' | (string & {});
|
|
61
63
|
/**
|
|
62
|
-
* The voice to use for generating the audio.
|
|
64
|
+
* The voice to use for generating the audio. The voices supported are different
|
|
65
|
+
* for each model. For eg - for canopylabs/orpheus-3b-0.1-ft, one of the voices
|
|
66
|
+
* supported is tara, for hexgrad/Kokoro-82M, one of the voices supported is
|
|
67
|
+
* af_alloy and for cartesia/sonic, one of the voices supported is "friendly
|
|
68
|
+
* sidekick".
|
|
69
|
+
*
|
|
70
|
+
* You can view the voices supported for each model using the /v1/voices endpoint
|
|
71
|
+
* sending the model name as the query parameter.
|
|
63
72
|
* [View all supported voices here](https://docs.together.ai/docs/text-to-speech#voices-available).
|
|
64
73
|
*/
|
|
65
|
-
voice:
|
|
74
|
+
voice: string;
|
|
66
75
|
/**
|
|
67
|
-
* Language of input text
|
|
76
|
+
* Language of input text.
|
|
68
77
|
*/
|
|
69
78
|
language?: 'en' | 'de' | 'fr' | 'es' | 'hi' | 'it' | 'ja' | 'ko' | 'nl' | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
|
|
70
79
|
/**
|
|
@@ -72,11 +81,14 @@ export interface AudioCreateParamsBase {
|
|
|
72
81
|
*/
|
|
73
82
|
response_encoding?: 'pcm_f32le' | 'pcm_s16le' | 'pcm_mulaw' | 'pcm_alaw';
|
|
74
83
|
/**
|
|
75
|
-
* The format of audio output
|
|
84
|
+
* The format of audio output. Supported formats are mp3, wav, raw if streaming is
|
|
85
|
+
* false. If streaming is true, the only supported format is raw.
|
|
76
86
|
*/
|
|
77
87
|
response_format?: 'mp3' | 'wav' | 'raw';
|
|
78
88
|
/**
|
|
79
|
-
* Sampling rate to use for the output audio
|
|
89
|
+
* Sampling rate to use for the output audio. The default sampling rate for
|
|
90
|
+
* canopylabs/orpheus-3b-0.1-ft and hexgrad/Kokoro-82M is 24000 and for
|
|
91
|
+
* cartesia/sonic is 44100.
|
|
80
92
|
*/
|
|
81
93
|
sample_rate?: number;
|
|
82
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.d.mts","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,iBAAiB;OACtB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,cAAc,EAAE;OAC1E,KAAK,eAAe;OACpB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,YAAY,EAAE;OACpE,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IACtG,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,6BAA6B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAC3F,MAAM,CACJ,IAAI,EA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,GACJ,IAAI,GACJ,IAAI,CAAC;IAET;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,CAAC;IAEzE;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAExC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,6BAA6B,GAAG,QAAQ,CAAC,6BAA6B,CAAC;IACnF,KAAY,0BAA0B,GAAG,QAAQ,CAAC,0BAA0B,CAAC;CAC9E;AAED,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACvE;;;;OAIG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAKD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,cAAc,IAAI,cAAc,EAChC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -17,8 +17,8 @@ export declare class Audio extends APIResource {
|
|
|
17
17
|
* ```ts
|
|
18
18
|
* const audio = await client.audio.create({
|
|
19
19
|
* input: 'input',
|
|
20
|
-
* model: '
|
|
21
|
-
* voice: '
|
|
20
|
+
* model: 'canopylabs/orpheus-3b-0.1-ft',
|
|
21
|
+
* voice: 'voice',
|
|
22
22
|
* });
|
|
23
23
|
*
|
|
24
24
|
* const content = await audio.blob();
|
|
@@ -56,15 +56,24 @@ export interface AudioCreateParamsBase {
|
|
|
56
56
|
* The name of the model to query.
|
|
57
57
|
*
|
|
58
58
|
* [See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#audio-models)
|
|
59
|
+
* The current supported tts models are: - cartesia/sonic - hexgrad/Kokoro-82M -
|
|
60
|
+
* canopylabs/orpheus-3b-0.1-ft
|
|
59
61
|
*/
|
|
60
|
-
model: 'cartesia/sonic' | (string & {});
|
|
62
|
+
model: 'cartesia/sonic' | 'hexgrad/Kokoro-82M' | 'canopylabs/orpheus-3b-0.1-ft' | (string & {});
|
|
61
63
|
/**
|
|
62
|
-
* The voice to use for generating the audio.
|
|
64
|
+
* The voice to use for generating the audio. The voices supported are different
|
|
65
|
+
* for each model. For eg - for canopylabs/orpheus-3b-0.1-ft, one of the voices
|
|
66
|
+
* supported is tara, for hexgrad/Kokoro-82M, one of the voices supported is
|
|
67
|
+
* af_alloy and for cartesia/sonic, one of the voices supported is "friendly
|
|
68
|
+
* sidekick".
|
|
69
|
+
*
|
|
70
|
+
* You can view the voices supported for each model using the /v1/voices endpoint
|
|
71
|
+
* sending the model name as the query parameter.
|
|
63
72
|
* [View all supported voices here](https://docs.together.ai/docs/text-to-speech#voices-available).
|
|
64
73
|
*/
|
|
65
|
-
voice:
|
|
74
|
+
voice: string;
|
|
66
75
|
/**
|
|
67
|
-
* Language of input text
|
|
76
|
+
* Language of input text.
|
|
68
77
|
*/
|
|
69
78
|
language?: 'en' | 'de' | 'fr' | 'es' | 'hi' | 'it' | 'ja' | 'ko' | 'nl' | 'pl' | 'pt' | 'ru' | 'sv' | 'tr' | 'zh';
|
|
70
79
|
/**
|
|
@@ -72,11 +81,14 @@ export interface AudioCreateParamsBase {
|
|
|
72
81
|
*/
|
|
73
82
|
response_encoding?: 'pcm_f32le' | 'pcm_s16le' | 'pcm_mulaw' | 'pcm_alaw';
|
|
74
83
|
/**
|
|
75
|
-
* The format of audio output
|
|
84
|
+
* The format of audio output. Supported formats are mp3, wav, raw if streaming is
|
|
85
|
+
* false. If streaming is true, the only supported format is raw.
|
|
76
86
|
*/
|
|
77
87
|
response_format?: 'mp3' | 'wav' | 'raw';
|
|
78
88
|
/**
|
|
79
|
-
* Sampling rate to use for the output audio
|
|
89
|
+
* Sampling rate to use for the output audio. The default sampling rate for
|
|
90
|
+
* canopylabs/orpheus-3b-0.1-ft and hexgrad/Kokoro-82M is 24000 and for
|
|
91
|
+
* cartesia/sonic is 44100.
|
|
80
92
|
*/
|
|
81
93
|
sample_rate?: number;
|
|
82
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,iBAAiB;OACtB,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,cAAc,EAAE;OAC1E,KAAK,eAAe;OACpB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,YAAY,EAAE;OACpE,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE;OAEV,EAAE,cAAc,EAAE;AAEzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;IACtG,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,6BAA6B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAC3F,MAAM,CACJ,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC,sBAAsB,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O,CAAC,CAAC;YACjF,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;YAC5B,gBAAgB,EAAE,IAAI;SACvB,CAAsE,CAAC;IAC1E,CAAC;CACF;AAxCD,sBAwCC;AA4HD,KAAK,CAAC,cAAc,GAAG,+BAAc,CAAC;AACtC,KAAK,CAAC,YAAY,GAAG,2BAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,iBAAiB;OACtB,EAA0D,cAAc,EAAE;OAC1E,KAAK,eAAe;OACpB,EAAsD,YAAY,EAAE;OAGpE,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsC9F,CAAC;IAZC,MAAM,CACJ,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;YAC5B,gBAAgB,EAAE,IAAI;SACvB,CAAsE,CAAC;IAC1E,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"audio.mjs","sourceRoot":"","sources":["../../src/resources/audio/audio.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,iBAAiB;OACtB,EAA0D,cAAc,EAAE;OAC1E,KAAK,eAAe;OACpB,EAAsD,YAAY,EAAE;OAGpE,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtG,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAsC9F,CAAC;IAZC,MAAM,CACJ,IAAuB,EACvB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;YAC5B,gBAAgB,EAAE,IAAI;SACvB,CAAsE,CAAC;IAC1E,CAAC;CACF;AA4HD,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;AACtC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -45,6 +45,10 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
45
45
|
* The transcribed text
|
|
46
46
|
*/
|
|
47
47
|
text: string;
|
|
48
|
+
/**
|
|
49
|
+
* Array of transcription speaker segments (only when diarize is enabled)
|
|
50
|
+
*/
|
|
51
|
+
speaker_segments?: Array<AudioTranscriptionVerboseJsonResponse.SpeakerSegment>;
|
|
48
52
|
/**
|
|
49
53
|
* Array of transcription words (only when timestamp_granularities includes 'word')
|
|
50
54
|
*/
|
|
@@ -69,6 +73,52 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
69
73
|
*/
|
|
70
74
|
text: string;
|
|
71
75
|
}
|
|
76
|
+
interface SpeakerSegment {
|
|
77
|
+
/**
|
|
78
|
+
* Unique identifier for the speaker segment
|
|
79
|
+
*/
|
|
80
|
+
id: number;
|
|
81
|
+
/**
|
|
82
|
+
* End time of the speaker segment in seconds
|
|
83
|
+
*/
|
|
84
|
+
end: number;
|
|
85
|
+
/**
|
|
86
|
+
* The speaker identifier
|
|
87
|
+
*/
|
|
88
|
+
speaker_id: string;
|
|
89
|
+
/**
|
|
90
|
+
* Start time of the speaker segment in seconds
|
|
91
|
+
*/
|
|
92
|
+
start: number;
|
|
93
|
+
/**
|
|
94
|
+
* The full text spoken by this speaker in this segment
|
|
95
|
+
*/
|
|
96
|
+
text: string;
|
|
97
|
+
/**
|
|
98
|
+
* Array of words spoken by this speaker in this segment
|
|
99
|
+
*/
|
|
100
|
+
words: Array<SpeakerSegment.Word>;
|
|
101
|
+
}
|
|
102
|
+
namespace SpeakerSegment {
|
|
103
|
+
interface Word {
|
|
104
|
+
/**
|
|
105
|
+
* End time of the word in seconds
|
|
106
|
+
*/
|
|
107
|
+
end: number;
|
|
108
|
+
/**
|
|
109
|
+
* Start time of the word in seconds
|
|
110
|
+
*/
|
|
111
|
+
start: number;
|
|
112
|
+
/**
|
|
113
|
+
* The word
|
|
114
|
+
*/
|
|
115
|
+
word: string;
|
|
116
|
+
/**
|
|
117
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
118
|
+
*/
|
|
119
|
+
speaker_id?: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
72
122
|
interface Word {
|
|
73
123
|
/**
|
|
74
124
|
* End time of the word in seconds
|
|
@@ -82,6 +132,10 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
82
132
|
* The word
|
|
83
133
|
*/
|
|
84
134
|
word: string;
|
|
135
|
+
/**
|
|
136
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
137
|
+
*/
|
|
138
|
+
speaker_id?: string;
|
|
85
139
|
}
|
|
86
140
|
}
|
|
87
141
|
}
|
|
@@ -90,6 +144,19 @@ export interface TranscriptionCreateParams {
|
|
|
90
144
|
* Audio file to transcribe
|
|
91
145
|
*/
|
|
92
146
|
file: Uploadable;
|
|
147
|
+
/**
|
|
148
|
+
* Whether to enable speaker diarization. When enabled, you will get the speaker id
|
|
149
|
+
* for each word in the transcription. In the response, in the words array, you
|
|
150
|
+
* will get the speaker id for each word. In addition, we also return the
|
|
151
|
+
* speaker_segments array which contains the speaker id for each speaker segment
|
|
152
|
+
* along with the start and end time of the segment along with all the words in the
|
|
153
|
+
* segment.
|
|
154
|
+
*
|
|
155
|
+
* For eg - ... "speaker_segments": [ "speaker_id": "SPEAKER_00", "start": 0,
|
|
156
|
+
* "end": 30.02, "words": [ { "id": 0, "word": "Tijana", "start": 0, "end": 11.475,
|
|
157
|
+
* "speaker_id": "SPEAKER_00" }, ...
|
|
158
|
+
*/
|
|
159
|
+
diarize?: boolean;
|
|
93
160
|
/**
|
|
94
161
|
* Optional ISO 639-1 language code. If `auto` is provided, language is
|
|
95
162
|
* auto-detected.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcriptions.d.mts","sourceRoot":"","sources":["../../src/resources/audio/transcriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAM3G;AAED,MAAM,MAAM,2BAA2B,GACnC,2BAA2B,CAAC,8BAA8B,GAC1D,2BAA2B,CAAC,qCAAqC,CAAC;AAEtE,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,8BAA8B;QAC7C;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,qCAAqC;QACpD;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QAC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G;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;CAC1E;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -45,6 +45,10 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
45
45
|
* The transcribed text
|
|
46
46
|
*/
|
|
47
47
|
text: string;
|
|
48
|
+
/**
|
|
49
|
+
* Array of transcription speaker segments (only when diarize is enabled)
|
|
50
|
+
*/
|
|
51
|
+
speaker_segments?: Array<AudioTranscriptionVerboseJsonResponse.SpeakerSegment>;
|
|
48
52
|
/**
|
|
49
53
|
* Array of transcription words (only when timestamp_granularities includes 'word')
|
|
50
54
|
*/
|
|
@@ -69,6 +73,52 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
69
73
|
*/
|
|
70
74
|
text: string;
|
|
71
75
|
}
|
|
76
|
+
interface SpeakerSegment {
|
|
77
|
+
/**
|
|
78
|
+
* Unique identifier for the speaker segment
|
|
79
|
+
*/
|
|
80
|
+
id: number;
|
|
81
|
+
/**
|
|
82
|
+
* End time of the speaker segment in seconds
|
|
83
|
+
*/
|
|
84
|
+
end: number;
|
|
85
|
+
/**
|
|
86
|
+
* The speaker identifier
|
|
87
|
+
*/
|
|
88
|
+
speaker_id: string;
|
|
89
|
+
/**
|
|
90
|
+
* Start time of the speaker segment in seconds
|
|
91
|
+
*/
|
|
92
|
+
start: number;
|
|
93
|
+
/**
|
|
94
|
+
* The full text spoken by this speaker in this segment
|
|
95
|
+
*/
|
|
96
|
+
text: string;
|
|
97
|
+
/**
|
|
98
|
+
* Array of words spoken by this speaker in this segment
|
|
99
|
+
*/
|
|
100
|
+
words: Array<SpeakerSegment.Word>;
|
|
101
|
+
}
|
|
102
|
+
namespace SpeakerSegment {
|
|
103
|
+
interface Word {
|
|
104
|
+
/**
|
|
105
|
+
* End time of the word in seconds
|
|
106
|
+
*/
|
|
107
|
+
end: number;
|
|
108
|
+
/**
|
|
109
|
+
* Start time of the word in seconds
|
|
110
|
+
*/
|
|
111
|
+
start: number;
|
|
112
|
+
/**
|
|
113
|
+
* The word
|
|
114
|
+
*/
|
|
115
|
+
word: string;
|
|
116
|
+
/**
|
|
117
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
118
|
+
*/
|
|
119
|
+
speaker_id?: string;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
72
122
|
interface Word {
|
|
73
123
|
/**
|
|
74
124
|
* End time of the word in seconds
|
|
@@ -82,6 +132,10 @@ export declare namespace TranscriptionCreateResponse {
|
|
|
82
132
|
* The word
|
|
83
133
|
*/
|
|
84
134
|
word: string;
|
|
135
|
+
/**
|
|
136
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
137
|
+
*/
|
|
138
|
+
speaker_id?: string;
|
|
85
139
|
}
|
|
86
140
|
}
|
|
87
141
|
}
|
|
@@ -90,6 +144,19 @@ export interface TranscriptionCreateParams {
|
|
|
90
144
|
* Audio file to transcribe
|
|
91
145
|
*/
|
|
92
146
|
file: Uploadable;
|
|
147
|
+
/**
|
|
148
|
+
* Whether to enable speaker diarization. When enabled, you will get the speaker id
|
|
149
|
+
* for each word in the transcription. In the response, in the words array, you
|
|
150
|
+
* will get the speaker id for each word. In addition, we also return the
|
|
151
|
+
* speaker_segments array which contains the speaker id for each speaker segment
|
|
152
|
+
* along with the start and end time of the segment along with all the words in the
|
|
153
|
+
* segment.
|
|
154
|
+
*
|
|
155
|
+
* For eg - ... "speaker_segments": [ "speaker_id": "SPEAKER_00", "start": 0,
|
|
156
|
+
* "end": 30.02, "words": [ { "id": 0, "word": "Tijana", "start": 0, "end": 11.475,
|
|
157
|
+
* "speaker_id": "SPEAKER_00" }, ...
|
|
158
|
+
*/
|
|
159
|
+
diarize?: boolean;
|
|
93
160
|
/**
|
|
94
161
|
* Optional ISO 639-1 language code. If `auto` is provided, language is
|
|
95
162
|
* auto-detected.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcriptions.d.ts","sourceRoot":"","sources":["../../src/resources/audio/transcriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAM3G;AAED,MAAM,MAAM,2BAA2B,GACnC,2BAA2B,CAAC,8BAA8B,GAC1D,2BAA2B,CAAC,qCAAqC,CAAC;AAEtE,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,8BAA8B;QAC7C;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,qCAAqC;QACpD;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAE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AI;YACnB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;KACF;CACF;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;CAC1E;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.mts","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;CAMvG;AAED,MAAM,MAAM,yBAAyB,GACjC,yBAAyB,CAAC,4BAA4B,GACtD,yBAAyB,CAAC,mCAAmC,CAAC;AAElE,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,4BAA4B;QAC3C;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,mCAAmC;QAClD;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC;QAE7D;;WAEG;QACH,IAAI,EAAE,YAAY,GAAG,WAAW,CAAC;QAEjC;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC;KACzD;IAED,UAAiB,mCAAmC,CAAC;QACnD,UAAiB,OAAO;YACtB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;QAED,UAAiB,IAAI;YACnB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.d.mts","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,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K,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC;KACzD;IAED,UAAiB,mCAAmC,CAAC;QACnD,UAAiB,OAAO;YACtB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;QAED,UAAiB,IAAI;YACnB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../src/resources/audio/translations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;CAMvG;AAED,MAAM,MAAM,yBAAyB,GACjC,yBAAyB,CAAC,4BAA4B,GACtD,yBAAyB,CAAC,mCAAmC,CAAC;AAElE,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,4BAA4B;QAC3C;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,mCAAmC;QAClD;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC;QAE7D;;WAEG;QACH,IAAI,EAAE,YAAY,GAAG,WAAW,CAAC;QAEjC;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC;KACzD;IAED,UAAiB,mCAAmC,CAAC;QACnD,UAAiB,OAAO;YACtB;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;QAED,UAAiB,IAAI;YACnB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,EAAE,MAAM,CAAC;YAEd;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;KACF;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAElC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC;CAC1E;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -22,8 +22,8 @@ export class Audio extends APIResource {
|
|
|
22
22
|
* ```ts
|
|
23
23
|
* const audio = await client.audio.create({
|
|
24
24
|
* input: 'input',
|
|
25
|
-
* model: '
|
|
26
|
-
* voice: '
|
|
25
|
+
* model: 'canopylabs/orpheus-3b-0.1-ft',
|
|
26
|
+
* voice: 'voice',
|
|
27
27
|
* });
|
|
28
28
|
*
|
|
29
29
|
* const content = await audio.blob();
|
|
@@ -88,17 +88,26 @@ export interface AudioCreateParamsBase {
|
|
|
88
88
|
* The name of the model to query.
|
|
89
89
|
*
|
|
90
90
|
* [See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#audio-models)
|
|
91
|
+
* The current supported tts models are: - cartesia/sonic - hexgrad/Kokoro-82M -
|
|
92
|
+
* canopylabs/orpheus-3b-0.1-ft
|
|
91
93
|
*/
|
|
92
|
-
model: 'cartesia/sonic' | (string & {});
|
|
94
|
+
model: 'cartesia/sonic' | 'hexgrad/Kokoro-82M' | 'canopylabs/orpheus-3b-0.1-ft' | (string & {});
|
|
93
95
|
|
|
94
96
|
/**
|
|
95
|
-
* The voice to use for generating the audio.
|
|
97
|
+
* The voice to use for generating the audio. The voices supported are different
|
|
98
|
+
* for each model. For eg - for canopylabs/orpheus-3b-0.1-ft, one of the voices
|
|
99
|
+
* supported is tara, for hexgrad/Kokoro-82M, one of the voices supported is
|
|
100
|
+
* af_alloy and for cartesia/sonic, one of the voices supported is "friendly
|
|
101
|
+
* sidekick".
|
|
102
|
+
*
|
|
103
|
+
* You can view the voices supported for each model using the /v1/voices endpoint
|
|
104
|
+
* sending the model name as the query parameter.
|
|
96
105
|
* [View all supported voices here](https://docs.together.ai/docs/text-to-speech#voices-available).
|
|
97
106
|
*/
|
|
98
|
-
voice:
|
|
107
|
+
voice: string;
|
|
99
108
|
|
|
100
109
|
/**
|
|
101
|
-
* Language of input text
|
|
110
|
+
* Language of input text.
|
|
102
111
|
*/
|
|
103
112
|
language?:
|
|
104
113
|
| 'en'
|
|
@@ -123,12 +132,15 @@ export interface AudioCreateParamsBase {
|
|
|
123
132
|
response_encoding?: 'pcm_f32le' | 'pcm_s16le' | 'pcm_mulaw' | 'pcm_alaw';
|
|
124
133
|
|
|
125
134
|
/**
|
|
126
|
-
* The format of audio output
|
|
135
|
+
* The format of audio output. Supported formats are mp3, wav, raw if streaming is
|
|
136
|
+
* false. If streaming is true, the only supported format is raw.
|
|
127
137
|
*/
|
|
128
138
|
response_format?: 'mp3' | 'wav' | 'raw';
|
|
129
139
|
|
|
130
140
|
/**
|
|
131
|
-
* Sampling rate to use for the output audio
|
|
141
|
+
* Sampling rate to use for the output audio. The default sampling rate for
|
|
142
|
+
* canopylabs/orpheus-3b-0.1-ft and hexgrad/Kokoro-82M is 24000 and for
|
|
143
|
+
* cartesia/sonic is 44100.
|
|
132
144
|
*/
|
|
133
145
|
sample_rate?: number;
|
|
134
146
|
|
|
@@ -64,6 +64,11 @@ export namespace TranscriptionCreateResponse {
|
|
|
64
64
|
*/
|
|
65
65
|
text: string;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Array of transcription speaker segments (only when diarize is enabled)
|
|
69
|
+
*/
|
|
70
|
+
speaker_segments?: Array<AudioTranscriptionVerboseJsonResponse.SpeakerSegment>;
|
|
71
|
+
|
|
67
72
|
/**
|
|
68
73
|
* Array of transcription words (only when timestamp_granularities includes 'word')
|
|
69
74
|
*/
|
|
@@ -93,6 +98,62 @@ export namespace TranscriptionCreateResponse {
|
|
|
93
98
|
text: string;
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
export interface SpeakerSegment {
|
|
102
|
+
/**
|
|
103
|
+
* Unique identifier for the speaker segment
|
|
104
|
+
*/
|
|
105
|
+
id: number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* End time of the speaker segment in seconds
|
|
109
|
+
*/
|
|
110
|
+
end: number;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The speaker identifier
|
|
114
|
+
*/
|
|
115
|
+
speaker_id: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Start time of the speaker segment in seconds
|
|
119
|
+
*/
|
|
120
|
+
start: number;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The full text spoken by this speaker in this segment
|
|
124
|
+
*/
|
|
125
|
+
text: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Array of words spoken by this speaker in this segment
|
|
129
|
+
*/
|
|
130
|
+
words: Array<SpeakerSegment.Word>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export namespace SpeakerSegment {
|
|
134
|
+
export interface Word {
|
|
135
|
+
/**
|
|
136
|
+
* End time of the word in seconds
|
|
137
|
+
*/
|
|
138
|
+
end: number;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Start time of the word in seconds
|
|
142
|
+
*/
|
|
143
|
+
start: number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The word
|
|
147
|
+
*/
|
|
148
|
+
word: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
152
|
+
*/
|
|
153
|
+
speaker_id?: string;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
96
157
|
export interface Word {
|
|
97
158
|
/**
|
|
98
159
|
* End time of the word in seconds
|
|
@@ -108,6 +169,11 @@ export namespace TranscriptionCreateResponse {
|
|
|
108
169
|
* The word
|
|
109
170
|
*/
|
|
110
171
|
word: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The speaker id for the word (only when diarize is enabled)
|
|
175
|
+
*/
|
|
176
|
+
speaker_id?: string;
|
|
111
177
|
}
|
|
112
178
|
}
|
|
113
179
|
}
|
|
@@ -118,6 +184,20 @@ export interface TranscriptionCreateParams {
|
|
|
118
184
|
*/
|
|
119
185
|
file: Uploadable;
|
|
120
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Whether to enable speaker diarization. When enabled, you will get the speaker id
|
|
189
|
+
* for each word in the transcription. In the response, in the words array, you
|
|
190
|
+
* will get the speaker id for each word. In addition, we also return the
|
|
191
|
+
* speaker_segments array which contains the speaker id for each speaker segment
|
|
192
|
+
* along with the start and end time of the segment along with all the words in the
|
|
193
|
+
* segment.
|
|
194
|
+
*
|
|
195
|
+
* For eg - ... "speaker_segments": [ "speaker_id": "SPEAKER_00", "start": 0,
|
|
196
|
+
* "end": 30.02, "words": [ { "id": 0, "word": "Tijana", "start": 0, "end": 11.475,
|
|
197
|
+
* "speaker_id": "SPEAKER_00" }, ...
|
|
198
|
+
*/
|
|
199
|
+
diarize?: boolean;
|
|
200
|
+
|
|
121
201
|
/**
|
|
122
202
|
* Optional ISO 639-1 language code. If `auto` is provided, language is
|
|
123
203
|
* auto-detected.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.29.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.29.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.29.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.29.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|