hume 0.14.2-beta.5 → 0.14.2-beta.7
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/.claude/settings.local.json +4 -1
- package/Client.d.ts +1 -0
- package/api/resources/empathicVoice/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
- package/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
- package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
- package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
- package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
- package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
- package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
- package/api/resources/tts/client/Client.d.ts +1 -0
- package/api/resources/tts/client/Client.js +16 -34
- package/api/resources/tts/index.d.ts +1 -1
- package/api/resources/tts/index.js +1 -1
- package/api/resources/tts/resources/index.d.ts +0 -1
- package/api/resources/tts/resources/index.js +0 -1
- package/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
- package/api/resources/tts/resources/streamInput/client/Client.js +14 -15
- package/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
- package/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
- package/api/resources/tts/resources/streamInput/index.d.ts +0 -1
- package/api/resources/tts/resources/streamInput/index.js +0 -1
- package/api/resources/tts/resources/streamInput/types/index.js +26 -14
- package/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
- package/api/resources/tts/resources/voices/client/Client.js +10 -19
- package/api/resources/tts/types/index.d.ts +2 -2
- package/api/resources/tts/types/index.js +2 -2
- package/changes.md +843 -0
- package/comment_changes.txt +0 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/file.d.ts +11 -0
- package/diff.txt +18143 -0
- package/dist/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -1
- package/dist/api/resources/empathicVoice/resources/chat/client/Client.js +3 -28
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +12 -20
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +9 -15
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +29 -52
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +29 -52
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -46
- package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +18 -30
- package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Socket.js +0 -4
- package/dist/api/resources/tts/client/Client.d.ts +1 -0
- package/dist/api/resources/tts/client/Client.js +16 -34
- package/dist/api/resources/tts/index.d.ts +1 -1
- package/dist/api/resources/tts/index.js +1 -1
- package/dist/api/resources/tts/resources/index.d.ts +0 -1
- package/dist/api/resources/tts/resources/index.js +0 -1
- package/dist/api/resources/tts/resources/streamInput/client/Client.d.ts +4 -3
- package/dist/api/resources/tts/resources/streamInput/client/Client.js +14 -15
- package/dist/api/resources/tts/resources/streamInput/client/Socket.d.ts +1 -1
- package/dist/api/resources/tts/resources/streamInput/client/Socket.js +0 -4
- package/dist/api/resources/tts/resources/streamInput/index.d.ts +0 -1
- package/dist/api/resources/tts/resources/streamInput/index.js +0 -1
- package/dist/api/resources/tts/resources/streamInput/types/index.js +26 -14
- package/dist/api/resources/tts/resources/voices/client/Client.d.ts +1 -0
- package/dist/api/resources/tts/resources/voices/client/Client.js +10 -19
- package/dist/api/resources/tts/types/index.d.ts +2 -2
- package/dist/api/resources/tts/types/index.js +2 -2
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +37 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +37 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/file.d.ts +11 -0
- package/dist/main.js +40944 -0
- package/dist/serialization/resources/tts/resources/index.d.ts +0 -1
- package/dist/serialization/resources/tts/resources/index.js +0 -1
- package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
- package/dist/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
- package/dist/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
- package/dist/serialization/resources/tts/resources/streamInput/index.js +0 -1
- package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
- package/dist/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
- package/dist/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
- package/dist/serialization/resources/tts/types/index.d.ts +2 -2
- package/dist/serialization/resources/tts/types/index.js +2 -2
- package/dist/wrapper/HumeClient.d.ts +2 -2
- package/dist/wrapper/HumeClient.js +27 -25
- package/hume-v0.14.2-beta.6.tgz +0 -0
- package/hume-v0.14.2-beta.7.tgz +0 -0
- package/js_changes.txt +2610 -0
- package/main.js +40944 -0
- package/package.json +1 -1
- package/serialization/resources/tts/resources/index.d.ts +0 -1
- package/serialization/resources/tts/resources/index.js +0 -1
- package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.d.ts +3 -3
- package/serialization/resources/tts/resources/streamInput/client/socket/StreamInputSocketResponse.js +2 -2
- package/serialization/resources/tts/resources/streamInput/index.d.ts +0 -1
- package/serialization/resources/tts/resources/streamInput/index.js +0 -1
- package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.d.ts +4 -1
- package/serialization/resources/tts/resources/streamInput/types/SubscribeEvent.js +55 -33
- package/serialization/resources/tts/resources/streamInput/types/index.js +26 -14
- package/serialization/resources/tts/types/index.d.ts +2 -2
- package/serialization/resources/tts/types/index.js +2 -2
- package/tts-audio/tts-74f0e855-cd7e-46e7-9657-c9bdf4b60693.wav +0 -0
- package/tts-audio/tts-8d0d6c9c-f54d-4ffa-880a-556f3a77eb99.wav +0 -0
- package/tts-audio/tts-f2a1d9fa-8f28-4011-9c02-08364592d0a9.wav +0 -0
- package/wrapper/HumeClient.d.ts +2 -2
- package/wrapper/HumeClient.js +27 -25
- package/hume-v0.14.2-beta.2.tgz +0 -0
- package/hume-v0.14.2-beta.4.tgz +0 -0
- package/hume-v0.14.2-beta.5.tgz +0 -0
- package/hume-v0.14.2-beta1.tgz +0 -0
|
@@ -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 {
|
|
8
|
-
export declare const StreamInputSocketResponse: core.serialization.Schema<serializers.tts.StreamInputSocketResponse.Raw, Hume.tts.
|
|
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 =
|
|
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
|
|
42
|
-
exports.StreamInputSocketResponse = core.serialization.undiscriminatedUnion([
|
|
41
|
+
const TtsOutput_js_1 = require("../../../../types/TtsOutput.js");
|
|
42
|
+
exports.StreamInputSocketResponse = core.serialization.undiscriminatedUnion([TtsOutput_js_1.TtsOutput]);
|
|
@@ -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<
|
|
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 =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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([
|
|
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 =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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,
|
|
6
|
+
type Options = Omit<FernClient.Options, "environment"> & {
|
|
7
7
|
secretKey?: string;
|
|
8
8
|
accessToken?: string;
|
|
9
9
|
} & ({
|
|
@@ -11,7 +11,7 @@ export declare namespace HumeClient {
|
|
|
11
11
|
} | {
|
|
12
12
|
apiKey: NonNullable<FernClient.Options["apiKey"]>;
|
|
13
13
|
}) & {
|
|
14
|
-
environment
|
|
14
|
+
environment?: core.Supplier<environments.HumeEnvironment | environments.HumeEnvironmentUrls | string>;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
export declare class HumeClient extends FernClient {
|
|
@@ -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
|
|
70
|
-
|
|
71
|
-
if (e
|
|
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:
|
|
75
|
-
tts:
|
|
76
|
-
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
|
-
|
|
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
|
-
|
|
88
|
-
|
|
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
|