hume 0.14.2-beta.5 → 0.14.2-beta.6

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 (124) hide show
  1. package/.claude/settings.local.json +4 -1
  2. package/Client.d.ts +1 -0
  3. package/api/resources/empathicVoice/client/Client.d.ts +1 -0
  4. package/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
  5. package/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
  6. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
  7. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
  8. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  9. package/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
  10. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  11. package/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
  12. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  13. package/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
  14. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  15. package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
  16. package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  17. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  18. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
  19. package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
  20. package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
  21. package/api/resources/tts/client/Client.d.ts +1 -0
  22. package/api/resources/tts/client/Client.js +16 -34
  23. package/api/resources/tts/index.d.ts +1 -1
  24. package/api/resources/tts/index.js +1 -1
  25. package/api/resources/tts/resources/index.d.ts +0 -1
  26. package/api/resources/tts/resources/index.js +0 -1
  27. package/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
  28. package/api/resources/tts/resources/streamInput/client/Client.js +14 -15
  29. package/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
  30. package/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
  31. package/api/resources/tts/resources/streamInput/index.d.ts +0 -1
  32. package/api/resources/tts/resources/streamInput/index.js +0 -1
  33. package/api/resources/tts/resources/streamInput/types/index.js +26 -14
  34. package/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
  35. package/api/resources/tts/resources/voices/client/Client.js +10 -19
  36. package/api/resources/tts/types/index.d.ts +2 -2
  37. package/api/resources/tts/types/index.js +2 -2
  38. package/changes.md +843 -0
  39. package/comment_changes.txt +0 -0
  40. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
  41. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  42. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
  43. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  44. package/core/file.d.ts +11 -0
  45. package/diff.txt +18143 -0
  46. package/dist/Client.d.ts +1 -0
  47. package/dist/api/resources/empathicVoice/client/Client.d.ts +1 -0
  48. package/dist/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
  49. package/dist/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
  50. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
  51. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
  52. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
  53. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
  54. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
  55. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
  56. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
  57. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
  58. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
  59. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
  60. package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
  61. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
  62. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
  63. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
  64. package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
  65. package/dist/api/resources/tts/client/Client.d.ts +1 -0
  66. package/dist/api/resources/tts/client/Client.js +16 -34
  67. package/dist/api/resources/tts/index.d.ts +1 -1
  68. package/dist/api/resources/tts/index.js +1 -1
  69. package/dist/api/resources/tts/resources/index.d.ts +0 -1
  70. package/dist/api/resources/tts/resources/index.js +0 -1
  71. package/dist/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
  72. package/dist/api/resources/tts/resources/streamInput/client/Client.js +14 -15
  73. package/dist/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
  74. package/dist/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
  75. package/dist/api/resources/tts/resources/streamInput/index.d.ts +0 -1
  76. package/dist/api/resources/tts/resources/streamInput/index.js +0 -1
  77. package/dist/api/resources/tts/resources/streamInput/types/index.js +26 -14
  78. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
  79. package/dist/api/resources/tts/resources/voices/client/Client.js +10 -19
  80. package/dist/api/resources/tts/types/index.d.ts +2 -2
  81. package/dist/api/resources/tts/types/index.js +2 -2
  82. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
  83. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  84. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
  85. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  86. package/dist/core/file.d.ts +11 -0
  87. package/dist/main.js +40944 -0
  88. package/dist/serialization/resources/tts/resources/index.d.ts +0 -1
  89. package/dist/serialization/resources/tts/resources/index.js +0 -1
  90. package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
  91. package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
  92. package/dist/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
  93. package/dist/serialization/resources/tts/resources/streamInput/index.js +0 -1
  94. package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
  95. package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
  96. package/dist/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
  97. package/dist/serialization/resources/tts/types/index.d.ts +2 -2
  98. package/dist/serialization/resources/tts/types/index.js +2 -2
  99. package/dist/wrapper/HumeClient.d.ts +1 -1
  100. package/dist/wrapper/HumeClient.js +27 -25
  101. package/hume-v0.14.2-beta.6.tgz +0 -0
  102. package/js_changes.txt +2610 -0
  103. package/main.js +40944 -0
  104. package/package.json +1 -1
  105. package/serialization/resources/tts/resources/index.d.ts +0 -1
  106. package/serialization/resources/tts/resources/index.js +0 -1
  107. package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
  108. package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
  109. package/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
  110. package/serialization/resources/tts/resources/streamInput/index.js +0 -1
  111. package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
  112. package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
  113. package/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
  114. package/serialization/resources/tts/types/index.d.ts +2 -2
  115. package/serialization/resources/tts/types/index.js +2 -2
  116. package/tts-audio/tts-74f0e855-cd7e-46e7-9657-c9bdf4b60693.wav +0 -0
  117. package/tts-audio/tts-8d0d6c9c-f54d-4ffa-880a-556f3a77eb99.wav +0 -0
  118. package/tts-audio/tts-f2a1d9fa-8f28-4011-9c02-08364592d0a9.wav +0 -0
  119. package/wrapper/HumeClient.d.ts +1 -1
  120. package/wrapper/HumeClient.js +27 -25
  121. package/hume-v0.14.2-beta.2.tgz +0 -0
  122. package/hume-v0.14.2-beta.4.tgz +0 -0
  123. package/hume-v0.14.2-beta.5.tgz +0 -0
  124. package/hume-v0.14.2-beta1.tgz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.14.2-beta.5",
3
+ "version": "0.14.2-beta.6",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",
@@ -1,5 +1,4 @@
1
1
  export * as streamInput from "./streamInput/index.js";
2
2
  export * from "./streamInput/client/socket/index.js";
3
- export * from "./streamInput/types/index.js";
4
3
  export * as voices from "./voices/index.js";
5
4
  export * from "./voices/client/requests/index.js";
@@ -39,6 +39,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.voices = exports.streamInput = void 0;
40
40
  exports.streamInput = __importStar(require("./streamInput/index.js"));
41
41
  __exportStar(require("./streamInput/client/socket/index.js"), exports);
42
- __exportStar(require("./streamInput/types/index.js"), exports);
43
42
  exports.voices = __importStar(require("./voices/index.js"));
44
43
  __exportStar(require("./voices/client/requests/index.js"), exports);
@@ -4,8 +4,8 @@
4
4
  import * as serializers from "../../../../../../index.js";
5
5
  import * as Hume from "../../../../../../../api/index.js";
6
6
  import * as core from "../../../../../../../core/index.js";
7
- import { SubscribeEvent } from "../../types/SubscribeEvent.js";
8
- export declare const StreamInputSocketResponse: core.serialization.Schema<serializers.tts.StreamInputSocketResponse.Raw, Hume.tts.SubscribeEvent>;
7
+ import { TtsOutput } from "../../../../types/TtsOutput.js";
8
+ export declare const StreamInputSocketResponse: core.serialization.Schema<serializers.tts.StreamInputSocketResponse.Raw, Hume.tts.TtsOutput>;
9
9
  export declare namespace StreamInputSocketResponse {
10
- type Raw = SubscribeEvent.Raw;
10
+ type Raw = TtsOutput.Raw;
11
11
  }
@@ -38,5 +38,5 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.StreamInputSocketResponse = void 0;
40
40
  const core = __importStar(require("../../../../../../../core/index.js"));
41
- const SubscribeEvent_js_1 = require("../../types/SubscribeEvent.js");
42
- exports.StreamInputSocketResponse = core.serialization.undiscriminatedUnion([SubscribeEvent_js_1.SubscribeEvent]);
41
+ const TtsOutput_js_1 = require("../../../../types/TtsOutput.js");
42
+ exports.StreamInputSocketResponse = core.serialization.undiscriminatedUnion([TtsOutput_js_1.TtsOutput]);
@@ -1,2 +1 @@
1
1
  export * from "./client/index.js";
2
- export * from "./types/index.js";
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
- __exportStar(require("./types/index.js"), exports);
@@ -6,7 +6,10 @@ import * as Hume from "../../../../../../api/index.js";
6
6
  import * as core from "../../../../../../core/index.js";
7
7
  import { TimestampMessage } from "../../../types/TimestampMessage.js";
8
8
  import { SnippetAudioChunk } from "../../../types/SnippetAudioChunk.js";
9
- export declare const SubscribeEvent: core.serialization.Schema<serializers.tts.SubscribeEvent.Raw, Hume.tts.SubscribeEvent>;
9
+ export declare const SubscribeEvent: core.serialization.Schema<
10
+ serializers.tts.SubscribeEvent.Raw,
11
+ Hume.tts.SubscribeEvent
12
+ >;
10
13
  export declare namespace SubscribeEvent {
11
14
  type Raw = TimestampMessage.Raw | SnippetAudioChunk.Raw;
12
15
  }
@@ -2,42 +2,64 @@
2
2
  /**
3
3
  * This file was auto-generated by Fern from our API Definition.
4
4
  */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
5
+ var __createBinding =
6
+ (this && this.__createBinding) ||
7
+ (Object.create
8
+ ? function (o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = {
13
+ enumerable: true,
14
+ get: function () {
15
+ return m[k];
16
+ },
17
+ };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }
21
+ : function (o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ });
25
+ var __setModuleDefault =
26
+ (this && this.__setModuleDefault) ||
27
+ (Object.create
28
+ ? function (o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }
31
+ : function (o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar =
35
+ (this && this.__importStar) ||
36
+ (function () {
37
+ var ownKeys = function (o) {
38
+ ownKeys =
39
+ Object.getOwnPropertyNames ||
40
+ function (o) {
41
+ var ar = [];
42
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
43
+ return ar;
44
+ };
45
+ return ownKeys(o);
27
46
  };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
47
+ return function (mod) {
48
+ if (mod && mod.__esModule) return mod;
49
+ var result = {};
50
+ if (mod != null)
51
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++)
52
+ if (k[i] !== "default") __createBinding(result, mod, k[i]);
53
+ __setModuleDefault(result, mod);
54
+ return result;
55
+ };
56
+ })();
38
57
  Object.defineProperty(exports, "__esModule", { value: true });
39
58
  exports.SubscribeEvent = void 0;
40
59
  const core = __importStar(require("../../../../../../core/index.js"));
41
60
  const TimestampMessage_js_1 = require("../../../types/TimestampMessage.js");
42
61
  const SnippetAudioChunk_js_1 = require("../../../types/SnippetAudioChunk.js");
43
- exports.SubscribeEvent = core.serialization.undiscriminatedUnion([TimestampMessage_js_1.TimestampMessage, SnippetAudioChunk_js_1.SnippetAudioChunk]);
62
+ exports.SubscribeEvent = core.serialization.undiscriminatedUnion([
63
+ TimestampMessage_js_1.TimestampMessage,
64
+ SnippetAudioChunk_js_1.SnippetAudioChunk,
65
+ ]);
@@ -1,17 +1,29 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __exportStar =
23
+ (this && this.__exportStar) ||
24
+ function (m, exports) {
25
+ for (var p in m)
26
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
+ };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
17
29
  __exportStar(require("./SubscribeEvent.js"), exports);
@@ -1,4 +1,3 @@
1
- export * from "./TtsOutput.js";
2
1
  export * from "./AudioFormatType.js";
3
2
  export * from "./PublishTts.js";
4
3
  export * from "./MillisecondInterval.js";
@@ -11,6 +10,8 @@ export * from "./PostedUtteranceVoiceWithName.js";
11
10
  export * from "./VoiceProvider.js";
12
11
  export * from "./PostedUtteranceVoice.js";
13
12
  export * from "./OctaveVersion.js";
13
+ export * from "./TtsOutput.js";
14
+ export * from "./Snippet.js";
14
15
  export * from "./PostedContextWithGenerationId.js";
15
16
  export * from "./PostedContextWithUtterances.js";
16
17
  export * from "./AudioEncoding.js";
@@ -23,7 +24,6 @@ export * from "./PostedTts.js";
23
24
  export * from "./ReturnTts.js";
24
25
  export * from "./ReturnVoice.js";
25
26
  export * from "./FormatPcm.js";
26
- export * from "./Snippet.js";
27
27
  export * from "./PostedUtterance.js";
28
28
  export * from "./ValidationErrorLocItem.js";
29
29
  export * from "./ValidationError.js";
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./TtsOutput.js"), exports);
18
17
  __exportStar(require("./AudioFormatType.js"), exports);
19
18
  __exportStar(require("./PublishTts.js"), exports);
20
19
  __exportStar(require("./MillisecondInterval.js"), exports);
@@ -27,6 +26,8 @@ __exportStar(require("./PostedUtteranceVoiceWithName.js"), exports);
27
26
  __exportStar(require("./VoiceProvider.js"), exports);
28
27
  __exportStar(require("./PostedUtteranceVoice.js"), exports);
29
28
  __exportStar(require("./OctaveVersion.js"), exports);
29
+ __exportStar(require("./TtsOutput.js"), exports);
30
+ __exportStar(require("./Snippet.js"), exports);
30
31
  __exportStar(require("./PostedContextWithGenerationId.js"), exports);
31
32
  __exportStar(require("./PostedContextWithUtterances.js"), exports);
32
33
  __exportStar(require("./AudioEncoding.js"), exports);
@@ -39,7 +40,6 @@ __exportStar(require("./PostedTts.js"), exports);
39
40
  __exportStar(require("./ReturnTts.js"), exports);
40
41
  __exportStar(require("./ReturnVoice.js"), exports);
41
42
  __exportStar(require("./FormatPcm.js"), exports);
42
- __exportStar(require("./Snippet.js"), exports);
43
43
  __exportStar(require("./PostedUtterance.js"), exports);
44
44
  __exportStar(require("./ValidationErrorLocItem.js"), exports);
45
45
  __exportStar(require("./ValidationError.js"), exports);
@@ -3,7 +3,7 @@ import * as core from "../core/index.js";
3
3
  import { ExpressionMeasurement } from "./expressionMeasurement/ExpressionMeasurementClient";
4
4
  import * as environments from "../environments.js";
5
5
  export declare namespace HumeClient {
6
- type Options = Omit<FernClient.Options, 'environment'> & {
6
+ type Options = Omit<FernClient.Options, "environment"> & {
7
7
  secretKey?: string;
8
8
  accessToken?: string;
9
9
  } & ({
@@ -66,35 +66,37 @@ class HumeClient extends Client_1.HumeClient {
66
66
  }
67
67
  // Allow setting a single url http://... or https://... for environment'
68
68
  if (oldEnvironment) {
69
- const environment = _options.environment ? core.Supplier.map(_options.environment, (e) => {
70
- if (typeof e === "string") {
71
- if (e.startsWith("http://")) {
69
+ const environment = _options.environment
70
+ ? core.Supplier.map(_options.environment, (e) => {
71
+ if (typeof e === "string") {
72
+ if (e.startsWith("http://")) {
73
+ return {
74
+ base: e,
75
+ evi: e.replace("http://", "ws://") + "/v0/evi",
76
+ tts: e.replace("http://", "ws://") + "/v0/tts",
77
+ stream: e.replace("http://", "ws://") + "/v0/stream",
78
+ };
79
+ }
80
+ if (e.startsWith("https://")) {
81
+ return {
82
+ base: e,
83
+ evi: e.replace("https://", "wss://") + "/v0/evi",
84
+ tts: e.replace("https://", "wss://") + "/v0/tts",
85
+ stream: e.replace("https://", "wss://") + "/v0/stream",
86
+ };
87
+ }
72
88
  return {
73
- base: e,
74
- evi: e.replace('http://', 'ws://') + "/v0/evi",
75
- tts: e.replace('http://', 'ws://') + "/v0/tts",
76
- stream: e.replace('http://', 'ws://') + "/v0/stream",
89
+ base: "https://" + e,
90
+ evi: "wss://" + e + "/v0/evi",
91
+ tts: "wss://" + e + "/v0/tts",
92
+ stream: "wss://" + e + "/v0/stream",
77
93
  };
78
94
  }
79
- if (e.startsWith("https://")) {
80
- return {
81
- base: e,
82
- evi: e.replace('https://', 'wss://') + "/v0/evi",
83
- tts: e.replace('https://', 'wss://') + "/v0/tts",
84
- stream: e.replace('https://', 'wss://') + "/v0/stream",
85
- };
95
+ else {
96
+ return e;
86
97
  }
87
- return {
88
- base: 'https://' + e,
89
- evi: 'wss://' + e + "/v0/evi",
90
- tts: 'wss://' + e + "/v0/tts",
91
- stream: 'wss://' + e + "/v0/stream",
92
- };
93
- }
94
- else {
95
- return e;
96
- }
97
- }) : undefined;
98
+ })
99
+ : undefined;
98
100
  options.environment = environment;
99
101
  }
100
102
  super(options);
Binary file
Binary file
Binary file
Binary file