hume 0.10.2 → 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.
Files changed (30) hide show
  1. package/.mock/definition/tts/__package__.yml +12 -0
  2. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  3. package/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  4. package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  5. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
  6. package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  7. package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  8. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  9. package/api/resources/tts/client/Client.js +4 -4
  10. package/api/resources/tts/resources/voices/client/Client.js +3 -3
  11. package/api/resources/tts/types/PostedTts.d.ts +3 -0
  12. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -4
  13. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +3 -3
  14. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  15. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +6 -6
  16. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  17. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  18. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  19. package/dist/api/resources/tts/client/Client.js +4 -4
  20. package/dist/api/resources/tts/resources/voices/client/Client.js +3 -3
  21. package/dist/api/resources/tts/types/PostedTts.d.ts +3 -0
  22. package/dist/serialization/resources/tts/types/PostedTts.d.ts +1 -0
  23. package/dist/serialization/resources/tts/types/PostedTts.js +1 -0
  24. package/dist/version.d.ts +1 -1
  25. package/dist/version.js +1 -1
  26. package/package.json +1 -1
  27. package/serialization/resources/tts/types/PostedTts.d.ts +1 -0
  28. package/serialization/resources/tts/types/PostedTts.js +1 -0
  29. package/version.d.ts +1 -1
  30. package/version.js +1 -1
@@ -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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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.2", "User-Agent": "hume/0.10.2", "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),
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;
@@ -14,6 +14,7 @@ export declare namespace PostedTts {
14
14
  format?: Format.Raw | null;
15
15
  num_generations?: number | null;
16
16
  split_utterances?: boolean | null;
17
+ strip_headers?: boolean | null;
17
18
  utterances: PostedUtterance.Raw[];
18
19
  instant_mode?: boolean | null;
19
20
  }
@@ -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.2";
1
+ export declare const SDK_VERSION = "0.10.3";
package/dist/version.js CHANGED
@@ -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.10.2";
4
+ exports.SDK_VERSION = "0.10.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",
@@ -14,6 +14,7 @@ export declare namespace PostedTts {
14
14
  format?: Format.Raw | null;
15
15
  num_generations?: number | null;
16
16
  split_utterances?: boolean | null;
17
+ strip_headers?: boolean | null;
17
18
  utterances: PostedUtterance.Raw[];
18
19
  instant_mode?: boolean | null;
19
20
  }
@@ -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.2";
1
+ export declare const SDK_VERSION = "0.10.3";
package/version.js CHANGED
@@ -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.10.2";
4
+ exports.SDK_VERSION = "0.10.3";