@fonoster/apiserver 0.9.20 → 0.9.23
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/dist/applications/buildService.d.ts +18 -0
- package/dist/applications/buildService.js +0 -18
- package/dist/applications/createCreateApplication.d.ts +18 -0
- package/dist/applications/createCreateApplication.js +2 -2
- package/dist/applications/createDeleteApplication.js +1 -1
- package/dist/applications/createGetApplication.js +2 -2
- package/dist/applications/createGetFnUtil.d.ts +3 -3
- package/dist/applications/createGetFnUtil.js +1 -1
- package/dist/applications/createListApplications.d.ts +18 -0
- package/dist/applications/createListApplications.js +1 -1
- package/dist/applications/createUpdateApplication.js +2 -2
- package/dist/applications/index.d.ts +18 -0
- package/dist/applications/index.js +1 -1
- package/dist/applications/types.d.ts +18 -0
- package/dist/applications/utils/applicationWithEncodedStruct.js +1 -1
- package/dist/applications/utils/convertToApplicationData.d.ts +18 -0
- package/dist/applications/validation/assistantWithoutApiKeySchema.js +1 -1
- package/dist/applications/validation/createValidationSchema.d.ts +4 -4
- package/dist/applications/validation/createValidationSchema.js +2 -2
- package/dist/applications/validation/prepareForValidation.d.ts +18 -0
- package/dist/applications/validation/speechValidators.d.ts +18 -0
- package/dist/applications/validation/speechValidators.js +1 -1
- package/dist/applications/validation/validOrThrow.d.ts +18 -0
- package/dist/calls/buildService.d.ts +18 -0
- package/dist/calls/buildService.js +3 -21
- package/dist/calls/createCall.d.ts +19 -1
- package/dist/calls/createCall.js +1 -1
- package/dist/calls/createCallPublisher.js +1 -1
- package/dist/calls/createFetchCalls.d.ts +19 -1
- package/dist/calls/createFetchCalls.js +2 -2
- package/dist/calls/createFetchSingleCall.d.ts +19 -1
- package/dist/calls/createFetchSingleCall.js +2 -2
- package/dist/calls/createTrackCall.js +1 -1
- package/dist/calls/getCall.d.ts +18 -0
- package/dist/calls/getCall.js +2 -2
- package/dist/calls/index.d.ts +18 -0
- package/dist/calls/index.js +1 -1
- package/dist/calls/influxdb.js +1 -1
- package/dist/calls/listCalls.d.ts +18 -0
- package/dist/calls/listCalls.js +1 -1
- package/dist/calls/runCallManager.js +1 -1
- package/dist/calls/types.d.ts +18 -0
- package/dist/core/allowList.d.ts +18 -0
- package/dist/core/allowList.js +1 -1
- package/dist/core/badRequestError.d.ts +18 -0
- package/dist/core/badRequestError.js +1 -1
- package/dist/core/buildWelcomeDemoService.d.ts +18 -0
- package/dist/core/buildWelcomeDemoService.js +1 -1
- package/dist/core/db.js +1 -1
- package/dist/core/httpBridge.d.ts +18 -0
- package/dist/core/identityConfig.d.ts +2 -1
- package/dist/core/identityConfig.js +3 -2
- package/dist/core/loadServices.d.ts +18 -0
- package/dist/core/loadServices.js +1 -1
- package/dist/core/notFoundError.d.ts +18 -0
- package/dist/core/notFoundError.js +1 -1
- package/dist/core/removeSwaggerNotice.js +1 -2
- package/dist/core/routrConfig.js +1 -1
- package/dist/core/runServices.js +6 -6
- package/dist/core/seed.js +1 -1
- package/dist/core/services.js +4 -4
- package/dist/core/upsertDefaultPeer.d.ts +0 -1
- package/dist/core/upsertDefaultPeer.js +2 -3
- package/dist/envs.d.ts +2 -1
- package/dist/envs.js +10 -8
- package/dist/events/createInfluxDbPub.js +1 -1
- package/dist/events/mapCallDirectionToEnum.d.ts +18 -0
- package/dist/events/mapCallDirectionToEnum.js +1 -1
- package/dist/events/nats.js +1 -1
- package/dist/events/transformEvent.js +2 -2
- package/dist/events/types.d.ts +18 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -21
- package/dist/secrets/buildService.d.ts +18 -0
- package/dist/secrets/buildService.js +0 -18
- package/dist/secrets/createGetFnUtil.d.ts +2 -2
- package/dist/secrets/createGetFnUtil.js +1 -1
- package/dist/secrets/createSecret.d.ts +18 -0
- package/dist/secrets/createSecret.js +1 -1
- package/dist/secrets/deleteSecret.js +2 -2
- package/dist/secrets/getSecret.js +2 -2
- package/dist/secrets/index.d.ts +18 -0
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/listSecrets.d.ts +18 -0
- package/dist/secrets/listSecrets.js +1 -1
- package/dist/secrets/updateSecret.js +2 -2
- package/dist/utils/createCheckNumberPreconditions.js +1 -1
- package/dist/utils/createHandleDialEventsWithNats.d.ts +18 -0
- package/dist/utils/createHandleDialEventsWithNats.js +1 -1
- package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +18 -0
- package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -18
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/mapDialStatus.d.ts +18 -0
- package/dist/utils/mapDialStatus.js +1 -1
- package/dist/utils/withErrorHandlingAndValidationAndAccess.js +1 -2
- package/dist/voice/VoiceClientImpl.d.ts +18 -0
- package/dist/voice/VoiceClientImpl.js +3 -4
- package/dist/voice/VoiceDispatcher.js +2 -2
- package/dist/voice/connectToAri.js +4 -4
- package/dist/voice/createCreateVoiceClient.js +3 -3
- package/dist/voice/errors/ChannelVarNotFoundError.d.ts +18 -0
- package/dist/voice/errors/MethodNotImplementedError.d.ts +18 -0
- package/dist/voice/errors/MethodNotImplementedError.js +1 -1
- package/dist/voice/errors/index.d.ts +18 -0
- package/dist/voice/errors/index.js +1 -1
- package/dist/voice/handlers/createAnswerHandler.d.ts +18 -0
- package/dist/voice/handlers/createHangupHandler.d.ts +18 -0
- package/dist/voice/handlers/createPlaybackControlHandler.js +1 -1
- package/dist/voice/handlers/createRecordHandler.js +1 -1
- package/dist/voice/handlers/createSayHandler.js +1 -1
- package/dist/voice/handlers/createStreamGatherHandler.js +1 -1
- package/dist/voice/handlers/createStreamHandler.js +1 -1
- package/dist/voice/handlers/dial/createDialHandler.d.ts +18 -0
- package/dist/voice/handlers/dial/createDialHandler.js +4 -4
- package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisEnd.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisStart.d.ts +18 -0
- package/dist/voice/handlers/dial/handleStasisStart.js +1 -1
- package/dist/voice/handlers/dial/index.d.ts +18 -0
- package/dist/voice/handlers/dial/index.js +1 -1
- package/dist/voice/handlers/dial/recordChannel.d.ts +18 -0
- package/dist/voice/handlers/dial/recordChannel.js +1 -1
- package/dist/voice/handlers/gather/createGatherHandler.js +2 -2
- package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +18 -0
- package/dist/voice/handlers/index.d.ts +18 -0
- package/dist/voice/handlers/index.js +1 -1
- package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +18 -0
- package/dist/voice/handlers/utils/awaitForRecordingFinished.js +1 -1
- package/dist/voice/handlers/utils/index.d.ts +18 -0
- package/dist/voice/handlers/utils/index.js +1 -1
- package/dist/voice/handlers/utils/isDtmf.d.ts +18 -0
- package/dist/voice/handlers/utils/isDtmf.js +1 -1
- package/dist/voice/handlers/utils/textChunksByClause.js +1 -2
- package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +1 -2
- package/dist/voice/handlers/utils/withErrorHandling.d.ts +18 -0
- package/dist/voice/integrations/ApplicationNotFoundError.d.ts +18 -0
- package/dist/voice/integrations/ApplicationNotFoundError.js +1 -1
- package/dist/voice/integrations/createCreateContainer.d.ts +1 -1
- package/dist/voice/integrations/createCreateContainer.js +5 -5
- package/dist/voice/integrations/getSttConfig.d.ts +18 -0
- package/dist/voice/integrations/getSttConfig.js +1 -1
- package/dist/voice/integrations/getTtsConfig.js +18 -0
- package/dist/voice/integrations/index.d.ts +18 -0
- package/dist/voice/integrations/index.js +1 -1
- package/dist/voice/integrations/types.d.ts +18 -0
- package/dist/voice/stt/AbstractSpeechToText.d.ts +19 -1
- package/dist/voice/stt/Deepgram.d.ts +19 -1
- package/dist/voice/stt/Deepgram.js +4 -3
- package/dist/voice/stt/Google.d.ts +1 -1
- package/dist/voice/stt/Google.js +19 -1
- package/dist/voice/stt/SpeechToTextFactory.js +1 -1
- package/dist/voice/stt/types.d.ts +18 -0
- package/dist/voice/transcribeOnConnection.d.ts +18 -0
- package/dist/voice/tts/AbstractTextToSpeech.d.ts +18 -0
- package/dist/voice/tts/Azure.d.ts +18 -0
- package/dist/voice/tts/Azure.js +1 -1
- package/dist/voice/tts/Deepgram.d.ts +18 -0
- package/dist/voice/tts/Deepgram.js +2 -3
- package/dist/voice/tts/ElevenLabs.d.ts +18 -0
- package/dist/voice/tts/ElevenLabs.js +2 -2
- package/dist/voice/tts/Google.d.ts +18 -0
- package/dist/voice/tts/Google.js +1 -1
- package/dist/voice/tts/TextToSpeechFactory.js +1 -1
- package/dist/voice/tts/isSsml.d.ts +18 -0
- package/dist/voice/tts/isSsml.js +1 -1
- package/dist/voice/tts/streamToBuffer.d.ts +18 -0
- package/dist/voice/tts/streamToBuffer.js +1 -2
- package/dist/voice/tts/types.d.ts +18 -0
- package/dist/voice/types/ari.d.ts +18 -0
- package/dist/voice/types/ari.js +1 -1
- package/dist/voice/types/index.d.ts +18 -0
- package/dist/voice/types/index.js +1 -1
- package/dist/voice/types/voice.d.ts +18 -0
- package/dist/voice/utils/VoiceServiceClientConstructor.js +1 -1
- package/dist/voice/utils/createExternalMediaConfig.js +1 -1
- package/dist/voice/utils/createGetChannelVar.d.ts +18 -0
- package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +18 -0
- package/dist/voice/utils/index.d.ts +18 -0
- package/dist/voice/utils/index.js +1 -1
- package/package.json +9 -9
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTtsConfig = getTtsConfig;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
|
+
* http://github.com/fonoster/fonoster
|
|
7
|
+
*
|
|
8
|
+
* This file is part of Fonoster
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the MIT License (the "License");
|
|
11
|
+
* you may not use this file except in compliance with
|
|
12
|
+
* the License. You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* https://opensource.org/licenses/MIT
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
4
22
|
const common_1 = require("@fonoster/common");
|
|
5
23
|
function getTtsConfig(integrations, app) {
|
|
6
24
|
const config = app.textToSpeech.config;
|
|
@@ -1 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
export * from "./createCreateContainer";
|
|
@@ -14,7 +14,7 @@ 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
|
-
|
|
17
|
+
/**
|
|
18
18
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
19
19
|
* http://github.com/fonoster/fonoster
|
|
20
20
|
*
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { AbstractSpeechToText } from "../stt/AbstractSpeechToText";
|
|
2
20
|
import { AbstractTextToSpeech } from "../tts/AbstractTextToSpeech";
|
|
3
21
|
type IntegrationConfig = {
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Stream } from "stream";
|
|
2
20
|
import * as z from "zod";
|
|
3
|
-
import { SpeechResult, StreamSpeech, SttConfig } from "./types";
|
|
4
21
|
import { SpeechToText } from "../types";
|
|
22
|
+
import { SpeechResult, StreamSpeech, SttConfig } from "./types";
|
|
5
23
|
declare abstract class AbstractSpeechToText<E, T extends SttConfig = SttConfig> implements SpeechToText {
|
|
6
24
|
abstract readonly engineName: E;
|
|
7
25
|
config: T;
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Stream } from "stream";
|
|
2
20
|
import * as z from "zod";
|
|
21
|
+
import { SpeechToText } from "../types";
|
|
3
22
|
import { AbstractSpeechToText } from "./AbstractSpeechToText";
|
|
4
23
|
import { DeepgramSttConfig, SpeechResult, StreamSpeech } from "./types";
|
|
5
|
-
import { SpeechToText } from "../types";
|
|
6
24
|
declare const DeepgramClient: any;
|
|
7
25
|
declare const ENGINE_NAME = "stt.deepgram";
|
|
8
26
|
declare class Deepgram extends AbstractSpeechToText<typeof ENGINE_NAME> implements SpeechToText {
|
|
@@ -43,8 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.ENGINE_NAME = exports.Deepgram = void 0;
|
|
46
|
-
|
|
47
|
-
/*
|
|
46
|
+
/**
|
|
48
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
49
48
|
* http://github.com/fonoster/fonoster
|
|
50
49
|
*
|
|
@@ -68,7 +67,9 @@ const logger_1 = require("@fonoster/logger");
|
|
|
68
67
|
const z = __importStar(require("zod"));
|
|
69
68
|
const AbstractSpeechToText_1 = require("./AbstractSpeechToText");
|
|
70
69
|
const types_1 = require("./types");
|
|
71
|
-
const { DeepgramClient, LiveTranscriptionEvents, createClient
|
|
70
|
+
const { DeepgramClient, LiveTranscriptionEvents, createClient
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
72
|
+
} = require("@deepgram/sdk"); // Why Deepgram :(
|
|
72
73
|
const ENGINE_NAME = "stt.deepgram";
|
|
73
74
|
exports.ENGINE_NAME = ENGINE_NAME;
|
|
74
75
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Stream } from "stream";
|
|
2
2
|
import { SpeechClient } from "@google-cloud/speech";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
+
import { SpeechToText } from "../types";
|
|
4
5
|
import { AbstractSpeechToText } from "./AbstractSpeechToText";
|
|
5
6
|
import { GoogleSttConfig, SpeechResult, StreamSpeech } from "./types";
|
|
6
|
-
import { SpeechToText } from "../types";
|
|
7
7
|
declare const ENGINE_NAME = "stt.google";
|
|
8
8
|
declare class Google extends AbstractSpeechToText<typeof ENGINE_NAME> implements SpeechToText {
|
|
9
9
|
client: SpeechClient;
|
package/dist/voice/stt/Google.js
CHANGED
|
@@ -43,11 +43,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.Google = exports.ENGINE_NAME = void 0;
|
|
46
|
+
/**
|
|
47
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
48
|
+
* http://github.com/fonoster/fonoster
|
|
49
|
+
*
|
|
50
|
+
* This file is part of Fonoster
|
|
51
|
+
*
|
|
52
|
+
* Licensed under the MIT License (the "License");
|
|
53
|
+
* you may not use this file except in compliance with
|
|
54
|
+
* the License. You may obtain a copy of the License at
|
|
55
|
+
*
|
|
56
|
+
* https://opensource.org/licenses/MIT
|
|
57
|
+
*
|
|
58
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
59
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
60
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
61
|
+
* See the License for the specific language governing permissions and
|
|
62
|
+
* limitations under the License.
|
|
63
|
+
*/
|
|
64
|
+
const perf_hooks_1 = require("perf_hooks");
|
|
46
65
|
const common_1 = require("@fonoster/common");
|
|
47
66
|
const speech_1 = require("@google-cloud/speech");
|
|
48
67
|
const z = __importStar(require("zod"));
|
|
49
68
|
const AbstractSpeechToText_1 = require("./AbstractSpeechToText");
|
|
50
|
-
const perf_hooks_1 = require("perf_hooks");
|
|
51
69
|
const ENGINE_NAME = "stt.google";
|
|
52
70
|
exports.ENGINE_NAME = ENGINE_NAME;
|
|
53
71
|
class Google extends AbstractSpeechToText_1.AbstractSpeechToText {
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { VoiceLanguage } from "@fonoster/common";
|
|
2
20
|
type SpeechResult = {
|
|
3
21
|
speech: string;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Stream } from "stream";
|
|
2
20
|
import { AudioStream } from "@fonoster/streams";
|
|
3
21
|
declare function transcribeOnConnection(stream: Stream): (_: any, res: AudioStream) => Promise<void>;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable } from "stream";
|
|
2
20
|
import * as z from "zod";
|
|
3
21
|
import { SynthOptions } from "./types";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable } from "stream";
|
|
2
20
|
import * as z from "zod";
|
|
3
21
|
import { AbstractTextToSpeech } from "./AbstractTextToSpeech";
|
package/dist/voice/tts/Azure.js
CHANGED
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.ENGINE_NAME = exports.Azure = void 0;
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
48
48
|
* http://github.com/fonoster/fonoster
|
|
49
49
|
*
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable } from "stream";
|
|
2
20
|
import { DeepgramClient } from "@deepgram/sdk";
|
|
3
21
|
import * as z from "zod";
|
|
@@ -43,8 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.ENGINE_NAME = exports.Deepgram = void 0;
|
|
46
|
-
|
|
47
|
-
/*
|
|
46
|
+
/**
|
|
48
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
49
48
|
* http://github.com/fonoster/fonoster
|
|
50
49
|
*
|
|
@@ -67,10 +66,10 @@ const sdk_1 = require("@deepgram/sdk");
|
|
|
67
66
|
const common_1 = require("@fonoster/common");
|
|
68
67
|
const logger_1 = require("@fonoster/logger");
|
|
69
68
|
const z = __importStar(require("zod"));
|
|
69
|
+
const textChunksByFirstNaturalPause_1 = require("../handlers/utils/textChunksByFirstNaturalPause");
|
|
70
70
|
const AbstractTextToSpeech_1 = require("./AbstractTextToSpeech");
|
|
71
71
|
const isSsml_1 = require("./isSsml");
|
|
72
72
|
const streamToBuffer_1 = require("./streamToBuffer");
|
|
73
|
-
const textChunksByFirstNaturalPause_1 = require("../handlers/utils/textChunksByFirstNaturalPause");
|
|
74
73
|
const ENGINE_NAME = "tts.deepgram";
|
|
75
74
|
exports.ENGINE_NAME = ENGINE_NAME;
|
|
76
75
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable } from "stream";
|
|
2
20
|
import { ElevenLabsClient } from "elevenlabs";
|
|
3
21
|
import * as z from "zod";
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.ElevenLabs = exports.ENGINE_NAME = void 0;
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
48
48
|
* http://github.com/fonoster/fonoster
|
|
49
49
|
*
|
|
@@ -65,10 +65,10 @@ const stream_1 = require("stream");
|
|
|
65
65
|
const logger_1 = require("@fonoster/logger");
|
|
66
66
|
const elevenlabs_1 = require("elevenlabs");
|
|
67
67
|
const z = __importStar(require("zod"));
|
|
68
|
+
const textChunksByFirstNaturalPause_1 = require("../handlers/utils/textChunksByFirstNaturalPause"); // Assuming this is the chunking function
|
|
68
69
|
const AbstractTextToSpeech_1 = require("./AbstractTextToSpeech");
|
|
69
70
|
const isSsml_1 = require("./isSsml");
|
|
70
71
|
const streamToBuffer_1 = require("./streamToBuffer");
|
|
71
|
-
const textChunksByFirstNaturalPause_1 = require("../handlers/utils/textChunksByFirstNaturalPause"); // Assuming this is the chunking function
|
|
72
72
|
const ENGINE_NAME = "tts.elevenlabs";
|
|
73
73
|
exports.ENGINE_NAME = ENGINE_NAME;
|
|
74
74
|
const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable } from "stream";
|
|
2
20
|
import { TextToSpeechClient } from "@google-cloud/text-to-speech";
|
|
3
21
|
import * as z from "zod";
|
package/dist/voice/tts/Google.js
CHANGED
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.Google = exports.ENGINE_NAME = void 0;
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
48
48
|
* http://github.com/fonoster/fonoster
|
|
49
49
|
*
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
declare function isSsml(text: string): boolean;
|
|
2
20
|
export { isSsml };
|
package/dist/voice/tts/isSsml.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
declare function streamToBuffer(readableStream: any): Promise<Buffer>;
|
|
2
20
|
export { streamToBuffer };
|
|
@@ -17,8 +17,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.streamToBuffer = streamToBuffer;
|
|
20
|
-
|
|
21
|
-
/*
|
|
20
|
+
/**
|
|
22
21
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
23
22
|
* http://github.com/fonoster/fonoster
|
|
24
23
|
*
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
type SynthOptions = {
|
|
2
20
|
voice: string;
|
|
3
21
|
};
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
declare enum AriEvent {
|
|
2
20
|
STASIS_START = "StasisStart",
|
|
3
21
|
STASIS_END = "StasisEnd",
|
package/dist/voice/types/ari.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
export * from "./ari";
|
|
2
20
|
export * from "./voice";
|
|
@@ -14,7 +14,7 @@ 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
|
-
|
|
17
|
+
/**
|
|
18
18
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
19
19
|
* http://github.com/fonoster/fonoster
|
|
20
20
|
*
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License");
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
1
19
|
import { Readable, Stream } from "stream";
|
|
2
20
|
import { SayOptions, StreamContent, VoiceClientConfig, VoiceIn, VoiceSessionStreamClient } from "@fonoster/common";
|
|
3
21
|
import * as grpc from "@grpc/grpc-js";
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.VoiceServiceClientConstructor = void 0;
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
38
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
39
39
|
* http://github.com/fonoster/fonoster
|
|
40
40
|
*
|