@fonoster/apiserver 0.9.19 → 0.9.22

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 (180) hide show
  1. package/dist/applications/buildService.d.ts +18 -0
  2. package/dist/applications/buildService.js +0 -18
  3. package/dist/applications/createCreateApplication.d.ts +18 -0
  4. package/dist/applications/createCreateApplication.js +2 -2
  5. package/dist/applications/createDeleteApplication.js +1 -1
  6. package/dist/applications/createGetApplication.js +2 -2
  7. package/dist/applications/createGetFnUtil.d.ts +3 -3
  8. package/dist/applications/createGetFnUtil.js +1 -1
  9. package/dist/applications/createListApplications.d.ts +18 -0
  10. package/dist/applications/createListApplications.js +1 -1
  11. package/dist/applications/createUpdateApplication.js +2 -2
  12. package/dist/applications/index.d.ts +18 -0
  13. package/dist/applications/index.js +1 -1
  14. package/dist/applications/types.d.ts +18 -0
  15. package/dist/applications/utils/applicationWithEncodedStruct.js +1 -1
  16. package/dist/applications/utils/convertToApplicationData.d.ts +18 -0
  17. package/dist/applications/validation/assistantWithoutApiKeySchema.js +1 -1
  18. package/dist/applications/validation/createValidationSchema.d.ts +4 -4
  19. package/dist/applications/validation/createValidationSchema.js +2 -2
  20. package/dist/applications/validation/prepareForValidation.d.ts +18 -0
  21. package/dist/applications/validation/speechValidators.d.ts +18 -0
  22. package/dist/applications/validation/speechValidators.js +1 -1
  23. package/dist/applications/validation/validOrThrow.d.ts +18 -0
  24. package/dist/calls/buildService.d.ts +18 -0
  25. package/dist/calls/buildService.js +3 -21
  26. package/dist/calls/createCall.d.ts +19 -1
  27. package/dist/calls/createCall.js +1 -1
  28. package/dist/calls/createCallPublisher.js +1 -1
  29. package/dist/calls/createFetchCalls.d.ts +19 -1
  30. package/dist/calls/createFetchCalls.js +2 -2
  31. package/dist/calls/createFetchSingleCall.d.ts +19 -1
  32. package/dist/calls/createFetchSingleCall.js +2 -2
  33. package/dist/calls/createTrackCall.js +1 -1
  34. package/dist/calls/getCall.d.ts +18 -0
  35. package/dist/calls/getCall.js +2 -2
  36. package/dist/calls/index.d.ts +18 -0
  37. package/dist/calls/index.js +1 -1
  38. package/dist/calls/influxdb.js +1 -1
  39. package/dist/calls/listCalls.d.ts +18 -0
  40. package/dist/calls/listCalls.js +1 -1
  41. package/dist/calls/runCallManager.js +1 -1
  42. package/dist/calls/types.d.ts +18 -0
  43. package/dist/core/allowList.d.ts +18 -0
  44. package/dist/core/allowList.js +2 -1
  45. package/dist/core/badRequestError.d.ts +18 -0
  46. package/dist/core/badRequestError.js +1 -1
  47. package/dist/core/buildWelcomeDemoService.d.ts +18 -0
  48. package/dist/core/buildWelcomeDemoService.js +1 -1
  49. package/dist/core/db.js +1 -1
  50. package/dist/core/httpBridge.d.ts +18 -0
  51. package/dist/core/identityConfig.js +1 -1
  52. package/dist/core/loadServices.d.ts +18 -0
  53. package/dist/core/loadServices.js +1 -1
  54. package/dist/core/notFoundError.d.ts +18 -0
  55. package/dist/core/notFoundError.js +1 -1
  56. package/dist/core/removeSwaggerNotice.js +1 -2
  57. package/dist/core/routrConfig.js +1 -1
  58. package/dist/core/runServices.js +6 -6
  59. package/dist/core/seed.js +1 -1
  60. package/dist/core/services.d.ts +3 -0
  61. package/dist/core/services.js +4 -4
  62. package/dist/core/upsertDefaultPeer.d.ts +0 -1
  63. package/dist/core/upsertDefaultPeer.js +2 -3
  64. package/dist/envs.js +4 -4
  65. package/dist/events/createInfluxDbPub.js +1 -1
  66. package/dist/events/mapCallDirectionToEnum.d.ts +18 -0
  67. package/dist/events/mapCallDirectionToEnum.js +1 -1
  68. package/dist/events/nats.js +1 -1
  69. package/dist/events/transformEvent.js +2 -2
  70. package/dist/events/types.d.ts +18 -0
  71. package/dist/index.d.ts +0 -1
  72. package/dist/index.js +2 -21
  73. package/dist/secrets/buildService.d.ts +18 -0
  74. package/dist/secrets/buildService.js +0 -18
  75. package/dist/secrets/createGetFnUtil.d.ts +2 -2
  76. package/dist/secrets/createGetFnUtil.js +1 -1
  77. package/dist/secrets/createSecret.d.ts +18 -0
  78. package/dist/secrets/createSecret.js +1 -1
  79. package/dist/secrets/deleteSecret.js +2 -2
  80. package/dist/secrets/getSecret.js +2 -2
  81. package/dist/secrets/index.d.ts +18 -0
  82. package/dist/secrets/index.js +1 -1
  83. package/dist/secrets/listSecrets.d.ts +18 -0
  84. package/dist/secrets/listSecrets.js +1 -1
  85. package/dist/secrets/updateSecret.js +2 -2
  86. package/dist/utils/createCheckNumberPreconditions.js +1 -1
  87. package/dist/utils/createHandleDialEventsWithNats.d.ts +18 -0
  88. package/dist/utils/createHandleDialEventsWithNats.js +1 -1
  89. package/dist/utils/createHandleDialEventsWithVoiceClient.d.ts +18 -0
  90. package/dist/utils/createHandleDialEventsWithVoiceClient.js +0 -18
  91. package/dist/utils/index.d.ts +18 -0
  92. package/dist/utils/index.js +1 -1
  93. package/dist/utils/mapDialStatus.d.ts +18 -0
  94. package/dist/utils/mapDialStatus.js +1 -1
  95. package/dist/utils/withErrorHandlingAndValidationAndAccess.js +1 -2
  96. package/dist/voice/VoiceClientImpl.d.ts +18 -0
  97. package/dist/voice/VoiceClientImpl.js +3 -4
  98. package/dist/voice/VoiceDispatcher.js +2 -2
  99. package/dist/voice/connectToAri.js +4 -4
  100. package/dist/voice/createCreateVoiceClient.js +3 -3
  101. package/dist/voice/errors/ChannelVarNotFoundError.d.ts +18 -0
  102. package/dist/voice/errors/MethodNotImplementedError.d.ts +18 -0
  103. package/dist/voice/errors/MethodNotImplementedError.js +1 -1
  104. package/dist/voice/errors/index.d.ts +18 -0
  105. package/dist/voice/errors/index.js +1 -1
  106. package/dist/voice/handlers/createAnswerHandler.d.ts +18 -0
  107. package/dist/voice/handlers/createHangupHandler.d.ts +18 -0
  108. package/dist/voice/handlers/createPlaybackControlHandler.js +1 -1
  109. package/dist/voice/handlers/createRecordHandler.js +1 -1
  110. package/dist/voice/handlers/createSayHandler.js +1 -1
  111. package/dist/voice/handlers/createStreamGatherHandler.js +1 -1
  112. package/dist/voice/handlers/createStreamHandler.js +1 -1
  113. package/dist/voice/handlers/dial/createDialHandler.d.ts +18 -0
  114. package/dist/voice/handlers/dial/createDialHandler.js +4 -4
  115. package/dist/voice/handlers/dial/handleChannelLeftBridge.d.ts +18 -0
  116. package/dist/voice/handlers/dial/handleStasisEnd.d.ts +18 -0
  117. package/dist/voice/handlers/dial/handleStasisStart.d.ts +18 -0
  118. package/dist/voice/handlers/dial/handleStasisStart.js +1 -1
  119. package/dist/voice/handlers/dial/index.d.ts +18 -0
  120. package/dist/voice/handlers/dial/index.js +1 -1
  121. package/dist/voice/handlers/dial/recordChannel.d.ts +18 -0
  122. package/dist/voice/handlers/dial/recordChannel.js +1 -1
  123. package/dist/voice/handlers/gather/createGatherHandler.js +2 -2
  124. package/dist/voice/handlers/gather/getTimeoutPromise.d.ts +18 -0
  125. package/dist/voice/handlers/index.d.ts +18 -0
  126. package/dist/voice/handlers/index.js +1 -1
  127. package/dist/voice/handlers/utils/awaitForPlaybackFinished.d.ts +18 -0
  128. package/dist/voice/handlers/utils/awaitForRecordingFinished.js +1 -1
  129. package/dist/voice/handlers/utils/index.d.ts +18 -0
  130. package/dist/voice/handlers/utils/index.js +1 -1
  131. package/dist/voice/handlers/utils/isDtmf.d.ts +18 -0
  132. package/dist/voice/handlers/utils/isDtmf.js +1 -1
  133. package/dist/voice/handlers/utils/textChunksByClause.js +1 -2
  134. package/dist/voice/handlers/utils/textChunksByFirstNaturalPause.js +1 -2
  135. package/dist/voice/handlers/utils/withErrorHandling.d.ts +18 -0
  136. package/dist/voice/integrations/ApplicationNotFoundError.d.ts +18 -0
  137. package/dist/voice/integrations/ApplicationNotFoundError.js +1 -1
  138. package/dist/voice/integrations/createCreateContainer.d.ts +1 -1
  139. package/dist/voice/integrations/createCreateContainer.js +5 -5
  140. package/dist/voice/integrations/getSttConfig.d.ts +18 -0
  141. package/dist/voice/integrations/getSttConfig.js +1 -1
  142. package/dist/voice/integrations/getTtsConfig.js +18 -0
  143. package/dist/voice/integrations/index.d.ts +18 -0
  144. package/dist/voice/integrations/index.js +1 -1
  145. package/dist/voice/integrations/types.d.ts +18 -0
  146. package/dist/voice/stt/AbstractSpeechToText.d.ts +19 -1
  147. package/dist/voice/stt/Deepgram.d.ts +19 -1
  148. package/dist/voice/stt/Deepgram.js +4 -3
  149. package/dist/voice/stt/Google.d.ts +1 -1
  150. package/dist/voice/stt/Google.js +19 -1
  151. package/dist/voice/stt/SpeechToTextFactory.js +1 -1
  152. package/dist/voice/stt/types.d.ts +18 -0
  153. package/dist/voice/transcribeOnConnection.d.ts +18 -0
  154. package/dist/voice/tts/AbstractTextToSpeech.d.ts +18 -0
  155. package/dist/voice/tts/Azure.d.ts +18 -0
  156. package/dist/voice/tts/Azure.js +1 -1
  157. package/dist/voice/tts/Deepgram.d.ts +18 -0
  158. package/dist/voice/tts/Deepgram.js +2 -3
  159. package/dist/voice/tts/ElevenLabs.d.ts +18 -0
  160. package/dist/voice/tts/ElevenLabs.js +2 -2
  161. package/dist/voice/tts/Google.d.ts +18 -0
  162. package/dist/voice/tts/Google.js +1 -1
  163. package/dist/voice/tts/TextToSpeechFactory.js +1 -1
  164. package/dist/voice/tts/isSsml.d.ts +18 -0
  165. package/dist/voice/tts/isSsml.js +1 -1
  166. package/dist/voice/tts/streamToBuffer.d.ts +18 -0
  167. package/dist/voice/tts/streamToBuffer.js +1 -2
  168. package/dist/voice/tts/types.d.ts +18 -0
  169. package/dist/voice/types/ari.d.ts +18 -0
  170. package/dist/voice/types/ari.js +1 -1
  171. package/dist/voice/types/index.d.ts +18 -0
  172. package/dist/voice/types/index.js +1 -1
  173. package/dist/voice/types/voice.d.ts +18 -0
  174. package/dist/voice/utils/VoiceServiceClientConstructor.js +1 -1
  175. package/dist/voice/utils/createExternalMediaConfig.js +1 -1
  176. package/dist/voice/utils/createGetChannelVar.d.ts +18 -0
  177. package/dist/voice/utils/createGetChannelVarWithoutThrow.d.ts +18 -0
  178. package/dist/voice/utils/index.d.ts +18 -0
  179. package/dist/voice/utils/index.js +1 -1
  180. package/package.json +9 -9
@@ -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
- /* eslint-disable @typescript-eslint/no-var-requires */
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 } = require("@deepgram/sdk"); // Why Deepgram :(
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;
@@ -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,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SpeechToTextFactory = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -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";
@@ -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
- /* eslint-disable no-loops/no-loops */
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";
@@ -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,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TextToSpeechFactory = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isSsml = isSsml;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -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
- /* eslint-disable no-loops/no-loops */
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",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChannelVar = exports.AriEvent = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -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
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createExternalMediaConfig = createExternalMediaConfig;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -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 { Channel } from "ari-client";
2
20
  import { ChannelVar } from "../types";
3
21
  declare function createGetChannelVar(channel: Channel): (variable: ChannelVar) => Promise<import("ari-client").Variable>;