@juspay/neurolink 8.13.2 → 8.14.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [8.14.0](https://github.com/juspay/neurolink/compare/v8.13.2...v8.14.0) (2025-12-14)
2
+
3
+ ### Features
4
+
5
+ - **(tts):** Create GoogleTTSHandler skeleton structure ([60db6a8](https://github.com/juspay/neurolink/commit/60db6a813d350756dad9a7baeee3ff5ad35141e2))
6
+
1
7
  ## [8.13.2](https://github.com/juspay/neurolink/compare/v8.13.1...v8.13.2) (2025-12-14)
2
8
 
3
9
  ### Bug Fixes
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Google Cloud Text-to-Speech Handler
3
+ *
4
+ * Handler for Google Cloud Text-to-Speech API integration.
5
+ * Supports Neural2 and WaveNet voice models with 220+ voices across 40+ languages.
6
+ *
7
+ * @module adapters/tts/googleTTSHandler
8
+ * @see https://cloud.google.com/text-to-speech/docs
9
+ */
10
+ import type { TTSHandler } from "../../utils/ttsProcessor.js";
11
+ import type { TTSOptions, TTSResult, TTSVoice } from "../../types/ttsTypes.js";
12
+ /**
13
+ * Google Cloud TTS handler implementation
14
+ *
15
+ * Integrates with Google Cloud Text-to-Speech API for voice synthesis.
16
+ * Supports authentication via:
17
+ * - Explicit service account JSON key path
18
+ * - GOOGLE_APPLICATION_CREDENTIALS environment variable
19
+ */
20
+ export declare class GoogleTTSHandler implements TTSHandler {
21
+ private client;
22
+ /**
23
+ * Maximum text length supported by Google Cloud TTS (5000 bytes)
24
+ * Different providers have different limits
25
+ */
26
+ private static readonly DEFAULT_MAX_TEXT_LENGTH;
27
+ maxTextLength: number;
28
+ /**
29
+ * Constructor for GoogleTTSHandler
30
+ *
31
+ * @param credentialsPath - Optional path to Google Cloud credentials JSON file
32
+ */
33
+ constructor(credentialsPath?: string);
34
+ /**
35
+ * Validate that the provider is properly configured
36
+ *
37
+ * @returns True if provider can generate TTS
38
+ */
39
+ isConfigured(): boolean;
40
+ /**
41
+ * Get available voices for the provider
42
+ *
43
+ * Note: This method is optional in the TTSHandler interface, but Google Cloud TTS
44
+ * fully implements it to provide comprehensive voice discovery capabilities.
45
+ *
46
+ * @param languageCode - Optional language filter (e.g., "en-US")
47
+ * @returns List of available voices
48
+ */
49
+ getVoices(_languageCode?: string): Promise<TTSVoice[]>;
50
+ /**
51
+ * Generate audio from text using provider-specific TTS API
52
+ *
53
+ * @param text - Text to convert to speech
54
+ * @param options - TTS configuration options
55
+ * @returns Audio buffer with metadata
56
+ */
57
+ synthesize(_text: string, _options: TTSOptions): Promise<TTSResult>;
58
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Google Cloud Text-to-Speech Handler
3
+ *
4
+ * Handler for Google Cloud Text-to-Speech API integration.
5
+ * Supports Neural2 and WaveNet voice models with 220+ voices across 40+ languages.
6
+ *
7
+ * @module adapters/tts/googleTTSHandler
8
+ * @see https://cloud.google.com/text-to-speech/docs
9
+ */
10
+ import { TextToSpeechClient } from "@google-cloud/text-to-speech";
11
+ /**
12
+ * Google Cloud TTS handler implementation
13
+ *
14
+ * Integrates with Google Cloud Text-to-Speech API for voice synthesis.
15
+ * Supports authentication via:
16
+ * - Explicit service account JSON key path
17
+ * - GOOGLE_APPLICATION_CREDENTIALS environment variable
18
+ */
19
+ export class GoogleTTSHandler {
20
+ client = null;
21
+ /**
22
+ * Maximum text length supported by Google Cloud TTS (5000 bytes)
23
+ * Different providers have different limits
24
+ */
25
+ static DEFAULT_MAX_TEXT_LENGTH = 5000;
26
+ maxTextLength = GoogleTTSHandler.DEFAULT_MAX_TEXT_LENGTH;
27
+ /**
28
+ * Constructor for GoogleTTSHandler
29
+ *
30
+ * @param credentialsPath - Optional path to Google Cloud credentials JSON file
31
+ */
32
+ constructor(credentialsPath) {
33
+ const path = credentialsPath ?? process.env.GOOGLE_APPLICATION_CREDENTIALS;
34
+ if (path) {
35
+ this.client = new TextToSpeechClient({ keyFilename: path });
36
+ }
37
+ }
38
+ /**
39
+ * Validate that the provider is properly configured
40
+ *
41
+ * @returns True if provider can generate TTS
42
+ */
43
+ isConfigured() {
44
+ throw new Error("Not implemented yet");
45
+ }
46
+ /**
47
+ * Get available voices for the provider
48
+ *
49
+ * Note: This method is optional in the TTSHandler interface, but Google Cloud TTS
50
+ * fully implements it to provide comprehensive voice discovery capabilities.
51
+ *
52
+ * @param languageCode - Optional language filter (e.g., "en-US")
53
+ * @returns List of available voices
54
+ */
55
+ async getVoices(_languageCode) {
56
+ throw new Error("Not implemented yet");
57
+ }
58
+ /**
59
+ * Generate audio from text using provider-specific TTS API
60
+ *
61
+ * @param text - Text to convert to speech
62
+ * @param options - TTS configuration options
63
+ * @returns Audio buffer with metadata
64
+ */
65
+ async synthesize(_text, _options) {
66
+ throw new Error("Not implemented yet");
67
+ }
68
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Google Cloud Text-to-Speech Handler
3
+ *
4
+ * Handler for Google Cloud Text-to-Speech API integration.
5
+ * Supports Neural2 and WaveNet voice models with 220+ voices across 40+ languages.
6
+ *
7
+ * @module adapters/tts/googleTTSHandler
8
+ * @see https://cloud.google.com/text-to-speech/docs
9
+ */
10
+ import type { TTSHandler } from "../../utils/ttsProcessor.js";
11
+ import type { TTSOptions, TTSResult, TTSVoice } from "../../types/ttsTypes.js";
12
+ /**
13
+ * Google Cloud TTS handler implementation
14
+ *
15
+ * Integrates with Google Cloud Text-to-Speech API for voice synthesis.
16
+ * Supports authentication via:
17
+ * - Explicit service account JSON key path
18
+ * - GOOGLE_APPLICATION_CREDENTIALS environment variable
19
+ */
20
+ export declare class GoogleTTSHandler implements TTSHandler {
21
+ private client;
22
+ /**
23
+ * Maximum text length supported by Google Cloud TTS (5000 bytes)
24
+ * Different providers have different limits
25
+ */
26
+ private static readonly DEFAULT_MAX_TEXT_LENGTH;
27
+ maxTextLength: number;
28
+ /**
29
+ * Constructor for GoogleTTSHandler
30
+ *
31
+ * @param credentialsPath - Optional path to Google Cloud credentials JSON file
32
+ */
33
+ constructor(credentialsPath?: string);
34
+ /**
35
+ * Validate that the provider is properly configured
36
+ *
37
+ * @returns True if provider can generate TTS
38
+ */
39
+ isConfigured(): boolean;
40
+ /**
41
+ * Get available voices for the provider
42
+ *
43
+ * Note: This method is optional in the TTSHandler interface, but Google Cloud TTS
44
+ * fully implements it to provide comprehensive voice discovery capabilities.
45
+ *
46
+ * @param languageCode - Optional language filter (e.g., "en-US")
47
+ * @returns List of available voices
48
+ */
49
+ getVoices(_languageCode?: string): Promise<TTSVoice[]>;
50
+ /**
51
+ * Generate audio from text using provider-specific TTS API
52
+ *
53
+ * @param text - Text to convert to speech
54
+ * @param options - TTS configuration options
55
+ * @returns Audio buffer with metadata
56
+ */
57
+ synthesize(_text: string, _options: TTSOptions): Promise<TTSResult>;
58
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Google Cloud Text-to-Speech Handler
3
+ *
4
+ * Handler for Google Cloud Text-to-Speech API integration.
5
+ * Supports Neural2 and WaveNet voice models with 220+ voices across 40+ languages.
6
+ *
7
+ * @module adapters/tts/googleTTSHandler
8
+ * @see https://cloud.google.com/text-to-speech/docs
9
+ */
10
+ import { TextToSpeechClient } from "@google-cloud/text-to-speech";
11
+ /**
12
+ * Google Cloud TTS handler implementation
13
+ *
14
+ * Integrates with Google Cloud Text-to-Speech API for voice synthesis.
15
+ * Supports authentication via:
16
+ * - Explicit service account JSON key path
17
+ * - GOOGLE_APPLICATION_CREDENTIALS environment variable
18
+ */
19
+ export class GoogleTTSHandler {
20
+ client = null;
21
+ /**
22
+ * Maximum text length supported by Google Cloud TTS (5000 bytes)
23
+ * Different providers have different limits
24
+ */
25
+ static DEFAULT_MAX_TEXT_LENGTH = 5000;
26
+ maxTextLength = GoogleTTSHandler.DEFAULT_MAX_TEXT_LENGTH;
27
+ /**
28
+ * Constructor for GoogleTTSHandler
29
+ *
30
+ * @param credentialsPath - Optional path to Google Cloud credentials JSON file
31
+ */
32
+ constructor(credentialsPath) {
33
+ const path = credentialsPath ?? process.env.GOOGLE_APPLICATION_CREDENTIALS;
34
+ if (path) {
35
+ this.client = new TextToSpeechClient({ keyFilename: path });
36
+ }
37
+ }
38
+ /**
39
+ * Validate that the provider is properly configured
40
+ *
41
+ * @returns True if provider can generate TTS
42
+ */
43
+ isConfigured() {
44
+ throw new Error("Not implemented yet");
45
+ }
46
+ /**
47
+ * Get available voices for the provider
48
+ *
49
+ * Note: This method is optional in the TTSHandler interface, but Google Cloud TTS
50
+ * fully implements it to provide comprehensive voice discovery capabilities.
51
+ *
52
+ * @param languageCode - Optional language filter (e.g., "en-US")
53
+ * @returns List of available voices
54
+ */
55
+ async getVoices(_languageCode) {
56
+ throw new Error("Not implemented yet");
57
+ }
58
+ /**
59
+ * Generate audio from text using provider-specific TTS API
60
+ *
61
+ * @param text - Text to convert to speech
62
+ * @param options - TTS configuration options
63
+ * @returns Audio buffer with metadata
64
+ */
65
+ async synthesize(_text, _options) {
66
+ throw new Error("Not implemented yet");
67
+ }
68
+ }
69
+ //# sourceMappingURL=googleTTSHandler.js.map
@@ -62,7 +62,7 @@ export interface TTSHandler {
62
62
  */
63
63
  isConfigured(): boolean;
64
64
  /**
65
- * Maximum text length supported by this provider (in characters)
65
+ * Maximum text length supported by this provider (in bytes)
66
66
  * Different providers have different limits
67
67
  *
68
68
  * @default 3000 if not specified
@@ -95,7 +95,7 @@ export declare class TTSProcessor {
95
95
  */
96
96
  private static readonly handlers;
97
97
  /**
98
- * Default maximum text length for TTS synthesis (characters)
98
+ * Default maximum text length for TTS synthesis (in bytes)
99
99
  *
100
100
  * Providers can override this value by specifying the `maxTextLength` property
101
101
  * in their respective `TTSHandler` implementation. If not specified, this default
@@ -62,7 +62,7 @@ export class TTSProcessor {
62
62
  */
63
63
  static handlers = new Map();
64
64
  /**
65
- * Default maximum text length for TTS synthesis (characters)
65
+ * Default maximum text length for TTS synthesis (in bytes)
66
66
  *
67
67
  * Providers can override this value by specifying the `maxTextLength` property
68
68
  * in their respective `TTSHandler` implementation. If not specified, this default
@@ -62,7 +62,7 @@ export interface TTSHandler {
62
62
  */
63
63
  isConfigured(): boolean;
64
64
  /**
65
- * Maximum text length supported by this provider (in characters)
65
+ * Maximum text length supported by this provider (in bytes)
66
66
  * Different providers have different limits
67
67
  *
68
68
  * @default 3000 if not specified
@@ -95,7 +95,7 @@ export declare class TTSProcessor {
95
95
  */
96
96
  private static readonly handlers;
97
97
  /**
98
- * Default maximum text length for TTS synthesis (characters)
98
+ * Default maximum text length for TTS synthesis (in bytes)
99
99
  *
100
100
  * Providers can override this value by specifying the `maxTextLength` property
101
101
  * in their respective `TTSHandler` implementation. If not specified, this default
@@ -62,7 +62,7 @@ export class TTSProcessor {
62
62
  */
63
63
  static handlers = new Map();
64
64
  /**
65
- * Default maximum text length for TTS synthesis (characters)
65
+ * Default maximum text length for TTS synthesis (in bytes)
66
66
  *
67
67
  * Providers can override this value by specifying the `maxTextLength` property
68
68
  * in their respective `TTSHandler` implementation. If not specified, this default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "8.13.2",
3
+ "version": "8.14.0",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",
@@ -164,6 +164,7 @@
164
164
  "@aws-sdk/client-sagemaker-runtime": "^3.886.0",
165
165
  "@aws-sdk/credential-provider-node": "^3.886.0",
166
166
  "@aws-sdk/types": "^3.862.0",
167
+ "@google-cloud/text-to-speech": "^5.0.0",
167
168
  "@google-cloud/vertexai": "^1.10.0",
168
169
  "@google/genai": "^1.19.0",
169
170
  "@google/generative-ai": "^0.24.1",