hume 0.10.1 → 0.10.3
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/.mock/definition/tts/__package__.yml +12 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
- package/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
- package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/api/resources/tts/client/Client.js +4 -4
- package/api/resources/tts/resources/voices/client/Client.js +3 -3
- package/api/resources/tts/types/PostedTts.d.ts +3 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/api/resources/tts/client/Client.js +4 -4
- package/dist/api/resources/tts/resources/voices/client/Client.js +3 -3
- package/dist/api/resources/tts/types/PostedTts.d.ts +3 -0
- package/dist/serialization/resources/tts/types/PostedTts.d.ts +1 -0
- package/dist/serialization/resources/tts/types/PostedTts.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/getAudioStream.d.ts +6 -1
- package/dist/wrapper/getAudioStream.js +5 -4
- package/package.json +1 -1
- package/serialization/resources/tts/types/PostedTts.d.ts +1 -0
- package/serialization/resources/tts/types/PostedTts.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/getAudioStream.d.ts +6 -1
- package/wrapper/getAudioStream.js +5 -4
|
@@ -98,7 +98,7 @@ class Tts {
|
|
|
98
98
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
99
99
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts"),
|
|
100
100
|
method: "POST",
|
|
101
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
101
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
102
102
|
contentType: "application/json",
|
|
103
103
|
requestType: "json",
|
|
104
104
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -157,7 +157,7 @@ class Tts {
|
|
|
157
157
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
158
158
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/file"),
|
|
159
159
|
method: "POST",
|
|
160
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
160
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
161
|
contentType: "application/json",
|
|
162
162
|
requestType: "json",
|
|
163
163
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -210,7 +210,7 @@ class Tts {
|
|
|
210
210
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
211
211
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/file"),
|
|
212
212
|
method: "POST",
|
|
213
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
213
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
214
|
contentType: "application/json",
|
|
215
215
|
requestType: "json",
|
|
216
216
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,7 +264,7 @@ class Tts {
|
|
|
264
264
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
265
265
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/stream/json"),
|
|
266
266
|
method: "POST",
|
|
267
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
267
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
268
268
|
contentType: "application/json",
|
|
269
269
|
requestType: "json",
|
|
270
270
|
body: serializers.tts.PostedTts.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -93,7 +93,7 @@ class Voices {
|
|
|
93
93
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
94
94
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/voices"),
|
|
95
95
|
method: "GET",
|
|
96
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
96
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
97
97
|
contentType: "application/json",
|
|
98
98
|
queryParameters: _queryParams,
|
|
99
99
|
requestType: "json",
|
|
@@ -171,7 +171,7 @@ class Voices {
|
|
|
171
171
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
172
172
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/voices"),
|
|
173
173
|
method: "POST",
|
|
174
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
174
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
175
175
|
contentType: "application/json",
|
|
176
176
|
requestType: "json",
|
|
177
177
|
body: serializers.tts.PostedVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -240,7 +240,7 @@ class Voices {
|
|
|
240
240
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
241
241
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/tts/voices"),
|
|
242
242
|
method: "DELETE",
|
|
243
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.
|
|
243
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
244
244
|
contentType: "application/json",
|
|
245
245
|
queryParameters: _queryParams,
|
|
246
246
|
requestType: "json",
|
|
@@ -19,6 +19,8 @@ export interface PostedTts {
|
|
|
19
19
|
* This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output.
|
|
20
20
|
*/
|
|
21
21
|
splitUtterances?: boolean;
|
|
22
|
+
/** If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). */
|
|
23
|
+
stripHeaders?: boolean;
|
|
22
24
|
/**
|
|
23
25
|
* A list of **Utterances** to be converted to speech output.
|
|
24
26
|
*
|
|
@@ -29,6 +31,7 @@ export interface PostedTts {
|
|
|
29
31
|
* Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode).
|
|
30
32
|
* - Dynamic voice generation is not supported with this mode; a predefined [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified in your request.
|
|
31
33
|
* - This mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)).
|
|
34
|
+
* - Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted).
|
|
32
35
|
* - With `instant_mode` enabled, **requests incur a 10% higher cost** due to increased compute and resource requirements.
|
|
33
36
|
*/
|
|
34
37
|
instantMode?: boolean;
|
|
@@ -46,6 +46,7 @@ exports.PostedTts = core.serialization.object({
|
|
|
46
46
|
format: Format_1.Format.optional(),
|
|
47
47
|
numGenerations: core.serialization.property("num_generations", core.serialization.number().optional()),
|
|
48
48
|
splitUtterances: core.serialization.property("split_utterances", core.serialization.boolean().optional()),
|
|
49
|
+
stripHeaders: core.serialization.property("strip_headers", core.serialization.boolean().optional()),
|
|
49
50
|
utterances: core.serialization.list(PostedUtterance_1.PostedUtterance),
|
|
50
51
|
instantMode: core.serialization.property("instant_mode", core.serialization.boolean().optional()),
|
|
51
52
|
});
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.10.
|
|
1
|
+
export declare const SDK_VERSION = "0.10.3";
|
package/dist/version.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export type AudioStreamOptions = {
|
|
2
|
+
echoCancellation?: boolean;
|
|
3
|
+
noiseSuppression?: boolean;
|
|
4
|
+
autoGainControl?: boolean;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
7
|
* Requests an audio stream from the user's device using the `getUserMedia` API.
|
|
3
8
|
* The stream will have echo cancellation, noise suppression, and auto gain control enabled.
|
|
@@ -5,4 +10,4 @@
|
|
|
5
10
|
* @returns {Promise<MediaStream>} A promise that resolves to a `MediaStream` containing audio data only.
|
|
6
11
|
* @throws {DOMException} If the user denies access or no audio input devices are found.
|
|
7
12
|
*/
|
|
8
|
-
export declare const getAudioStream: () => Promise<MediaStream>;
|
|
13
|
+
export declare const getAudioStream: (audioStreamOptions?: AudioStreamOptions) => Promise<MediaStream>;
|
|
@@ -17,12 +17,13 @@ exports.getAudioStream = void 0;
|
|
|
17
17
|
* @returns {Promise<MediaStream>} A promise that resolves to a `MediaStream` containing audio data only.
|
|
18
18
|
* @throws {DOMException} If the user denies access or no audio input devices are found.
|
|
19
19
|
*/
|
|
20
|
-
const getAudioStream = () => __awaiter(void 0,
|
|
20
|
+
const getAudioStream = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (audioStreamOptions = {}) {
|
|
21
|
+
const { echoCancellation = true, noiseSuppression = true, autoGainControl = true } = audioStreamOptions;
|
|
21
22
|
return navigator.mediaDevices.getUserMedia({
|
|
22
23
|
audio: {
|
|
23
|
-
echoCancellation
|
|
24
|
-
noiseSuppression
|
|
25
|
-
autoGainControl
|
|
24
|
+
echoCancellation,
|
|
25
|
+
noiseSuppression,
|
|
26
|
+
autoGainControl,
|
|
26
27
|
},
|
|
27
28
|
video: false,
|
|
28
29
|
});
|
package/package.json
CHANGED
|
@@ -46,6 +46,7 @@ exports.PostedTts = core.serialization.object({
|
|
|
46
46
|
format: Format_1.Format.optional(),
|
|
47
47
|
numGenerations: core.serialization.property("num_generations", core.serialization.number().optional()),
|
|
48
48
|
splitUtterances: core.serialization.property("split_utterances", core.serialization.boolean().optional()),
|
|
49
|
+
stripHeaders: core.serialization.property("strip_headers", core.serialization.boolean().optional()),
|
|
49
50
|
utterances: core.serialization.list(PostedUtterance_1.PostedUtterance),
|
|
50
51
|
instantMode: core.serialization.property("instant_mode", core.serialization.boolean().optional()),
|
|
51
52
|
});
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.10.
|
|
1
|
+
export declare const SDK_VERSION = "0.10.3";
|
package/version.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export type AudioStreamOptions = {
|
|
2
|
+
echoCancellation?: boolean;
|
|
3
|
+
noiseSuppression?: boolean;
|
|
4
|
+
autoGainControl?: boolean;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
7
|
* Requests an audio stream from the user's device using the `getUserMedia` API.
|
|
3
8
|
* The stream will have echo cancellation, noise suppression, and auto gain control enabled.
|
|
@@ -5,4 +10,4 @@
|
|
|
5
10
|
* @returns {Promise<MediaStream>} A promise that resolves to a `MediaStream` containing audio data only.
|
|
6
11
|
* @throws {DOMException} If the user denies access or no audio input devices are found.
|
|
7
12
|
*/
|
|
8
|
-
export declare const getAudioStream: () => Promise<MediaStream>;
|
|
13
|
+
export declare const getAudioStream: (audioStreamOptions?: AudioStreamOptions) => Promise<MediaStream>;
|
|
@@ -17,12 +17,13 @@ exports.getAudioStream = void 0;
|
|
|
17
17
|
* @returns {Promise<MediaStream>} A promise that resolves to a `MediaStream` containing audio data only.
|
|
18
18
|
* @throws {DOMException} If the user denies access or no audio input devices are found.
|
|
19
19
|
*/
|
|
20
|
-
const getAudioStream = () => __awaiter(void 0,
|
|
20
|
+
const getAudioStream = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (audioStreamOptions = {}) {
|
|
21
|
+
const { echoCancellation = true, noiseSuppression = true, autoGainControl = true } = audioStreamOptions;
|
|
21
22
|
return navigator.mediaDevices.getUserMedia({
|
|
22
23
|
audio: {
|
|
23
|
-
echoCancellation
|
|
24
|
-
noiseSuppression
|
|
25
|
-
autoGainControl
|
|
24
|
+
echoCancellation,
|
|
25
|
+
noiseSuppression,
|
|
26
|
+
autoGainControl,
|
|
26
27
|
},
|
|
27
28
|
video: false,
|
|
28
29
|
});
|