@neosapience/n8n-nodes-typecast 1.0.2 → 1.1.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/README.md CHANGED
@@ -8,22 +8,29 @@ Integrate [Typecast](https://typecast.ai/) AI TTS into your [n8n](https://n8n.io
8
8
  ## Features
9
9
 
10
10
  - **Voice Resource**
11
- - Get Many: List all available voice models
12
- - Get: Retrieve details of a specific voice model
11
+ - Get All Voices: list voices with `model` / `gender` / `age` / `use_case` filters
12
+ - Get Voice: look up a single voice by ID via the V2 API
13
13
  - **Speech Resource**
14
- - Text to Speech: Convert text to speech using a selected voice
14
+ - Text to Speech: convert text to speech using a selected voice
15
+ - Text to Speech (Streaming): low-latency chunked audio via `POST /v1/text-to-speech/stream`
16
+ - Text to Speech with Timestamps: audio + word / character alignment for SRT / WebVTT caption generation
17
+ - **Subscription Resource**
18
+ - Get My Subscription: plan tier, credit usage, and concurrency limit at runtime
19
+ - **Output controls**
20
+ - `target_lufs`: absolute loudness normalization (`-70.0 ~ 0.0` LUFS); mutually exclusive with Volume on the non-streaming endpoint
15
21
 
16
22
  ## Node Structure
17
23
 
18
24
  - Node: `Typecast`
19
- - Resources: `voice`, `speech`
20
- - Operations:
21
- - `voice`: `getMany`, `get`
22
- - `speech`: `textToSpeech`
25
+ - Resources: `voice`, `speech`, `subscription`
26
+ - Operations:
27
+ - `voice`: `getMany`, `getOne`
28
+ - `speech`: `textToSpeech`, `textToSpeechStream`, `textToSpeechWithTimestamps`
29
+ - `subscription`: `getMy`
23
30
 
24
31
  ## Credentials Setup
25
32
 
26
- 1. Get your API key from [Typecast Dashboard](https://typecast.ai/developers)
33
+ 1. Get your API key from [Typecast Dashboard](https://typecast.ai/developers/api/api-key)
27
34
  2. In n8n, add new credentials of type **Typecast API**
28
35
  3. Enter your API key
29
36
 
@@ -1,43 +1,44 @@
1
1
  import {
2
- IAuthenticateGeneric,
3
- Icon,
4
- ICredentialTestRequest,
5
- ICredentialType,
6
- INodeProperties,
2
+ IAuthenticateGeneric,
3
+ Icon,
4
+ ICredentialTestRequest,
5
+ ICredentialType,
6
+ INodeProperties,
7
7
  } from 'n8n-workflow';
8
8
 
9
9
  export class TypecastApi implements ICredentialType {
10
- name = 'typecastApi';
11
- displayName = 'Typecast API';
12
- icon: Icon = 'file:../icons/typecast.svg';
13
- documentationUrl = 'https://typecast.ai/docs/api-reference/endpoint/text-to-speech/text-to-speech';
14
- properties: INodeProperties[] = [
15
- {
16
- displayName: 'API Key',
17
- name: 'apiKey',
18
- type: 'string',
19
- typeOptions: {
20
- password: true,
21
- },
22
- default: '',
23
- required: true,
24
- description: 'API key from Typecast dashboard',
25
- },
26
- ];
10
+ name = 'typecastApi';
11
+ displayName = 'Typecast API';
12
+ icon: Icon = 'file:../icons/typecast.svg';
13
+ documentationUrl =
14
+ 'https://typecast.ai/docs/api-reference/endpoint/text-to-speech/text-to-speech';
15
+ properties: INodeProperties[] = [
16
+ {
17
+ displayName: 'API Key',
18
+ name: 'apiKey',
19
+ type: 'string',
20
+ typeOptions: {
21
+ password: true,
22
+ },
23
+ default: '',
24
+ required: true,
25
+ description: 'API key from Typecast dashboard',
26
+ },
27
+ ];
27
28
 
28
- authenticate: IAuthenticateGeneric = {
29
- type: 'generic',
30
- properties: {
31
- headers: {
32
- 'X-API-KEY': '={{$credentials.apiKey}}',
33
- },
34
- },
35
- };
29
+ authenticate: IAuthenticateGeneric = {
30
+ type: 'generic',
31
+ properties: {
32
+ headers: {
33
+ 'X-API-KEY': '={{$credentials.apiKey}}',
34
+ },
35
+ },
36
+ };
36
37
 
37
- test: ICredentialTestRequest = {
38
- request: {
39
- baseURL: 'https://api.typecast.ai/v1',
40
- url: '/voices',
41
- },
42
- };
38
+ test: ICredentialTestRequest = {
39
+ request: {
40
+ baseURL: 'https://api.typecast.ai/v1',
41
+ url: '/voices',
42
+ },
43
+ };
43
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TypecastApi.credentials.js","sourceRoot":"","sources":["../../credentials/TypecastApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACC,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,cAAc,CAAC;QAC7B,SAAI,GAAS,4BAA4B,CAAC;QAC1C,qBAAgB,GAAG,+EAA+E,CAAC;QACnG,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iCAAiC;aAC9C;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;iBACvC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,4BAA4B;gBACrC,GAAG,EAAE,SAAS;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAlCD,kCAkCC"}
1
+ {"version":3,"file":"TypecastApi.credentials.js","sourceRoot":"","sources":["../../credentials/TypecastApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,WAAW;IAAxB;QACE,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAG,cAAc,CAAC;QAC7B,SAAI,GAAS,4BAA4B,CAAC;QAC1C,qBAAgB,GACd,+EAA+E,CAAC;QAClF,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,iCAAiC;aAC/C;SACF,CAAC;QAEF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,WAAW,EAAE,0BAA0B;iBACxC;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,4BAA4B;gBACrC,GAAG,EAAE,SAAS;aACf;SACF,CAAC;IACJ,CAAC;CAAA;AAnCD,kCAmCC"}
@@ -1,5 +1,10 @@
1
- import { type IExecuteFunctions, type INodeExecutionData, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
1
+ import { type IExecuteFunctions, type ILoadOptionsFunctions, type INodeExecutionData, type INodeListSearchResult, type INodeType, type INodeTypeDescription } from 'n8n-workflow';
2
2
  export declare class Typecast implements INodeType {
3
3
  description: INodeTypeDescription;
4
+ methods: {
5
+ listSearch: {
6
+ searchVoices(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
7
+ };
8
+ };
4
9
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
10
  }
@@ -5,6 +5,7 @@ const n8n_workflow_1 = require("n8n-workflow");
5
5
  const transport_1 = require("./shared/transport");
6
6
  const voice_1 = require("./resources/voice");
7
7
  const speech_1 = require("./resources/speech");
8
+ const subscription_1 = require("./resources/subscription");
8
9
  class Typecast {
9
10
  constructor() {
10
11
  this.description = {
@@ -15,6 +16,7 @@ class Typecast {
15
16
  version: 1,
16
17
  subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
17
18
  description: 'Interact with Typecast TTS API',
19
+ documentationUrl: 'https://typecast.ai/docs/integrations/n8n',
18
20
  usableAsTool: true,
19
21
  defaults: {
20
22
  name: 'Typecast',
@@ -38,6 +40,10 @@ class Typecast {
38
40
  name: 'Speech',
39
41
  value: 'speech',
40
42
  },
43
+ {
44
+ name: 'Subscription',
45
+ value: 'subscription',
46
+ },
41
47
  {
42
48
  name: 'Voice',
43
49
  value: 'voice',
@@ -47,10 +53,105 @@ class Typecast {
47
53
  },
48
54
  ...voice_1.voiceDescription,
49
55
  ...speech_1.speechDescription,
56
+ ...subscription_1.subscriptionDescription,
50
57
  ],
51
58
  };
59
+ this.methods = {
60
+ listSearch: {
61
+ async searchVoices(filter) {
62
+ const results = {
63
+ results: [],
64
+ };
65
+ try {
66
+ const model = this.getNodeParameter('model', 0) || 'ssfm-v30';
67
+ const qs = {};
68
+ if (model) {
69
+ qs.model = model;
70
+ }
71
+ const response = await transport_1.typecastApiRequest.call(this, 'GET', '/voices', {}, qs, 'v2');
72
+ const voices = Array.isArray(response) ? response : response.result || [];
73
+ for (const voice of voices) {
74
+ const voiceId = voice.voice_id;
75
+ const voiceName = voice.voice_name || voiceId;
76
+ const gender = voice.gender
77
+ ? voice.gender.charAt(0).toUpperCase() + voice.gender.slice(1)
78
+ : 'Unknown';
79
+ const age = voice.age
80
+ ? voice.age.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase())
81
+ : 'Unknown';
82
+ let emotions = [];
83
+ if (voice.models && Array.isArray(voice.models)) {
84
+ const v30Model = voice.models.find((m) => m.version === 'ssfm-v30');
85
+ const modelToUse = v30Model || voice.models[0];
86
+ if (modelToUse && Array.isArray(modelToUse.emotions)) {
87
+ emotions = modelToUse.emotions;
88
+ }
89
+ }
90
+ const emotionList = emotions.join(', ');
91
+ const emotionDisplay = emotionList || 'N/A';
92
+ const useCases = voice.use_cases || [];
93
+ const useCaseList = Array.isArray(useCases) ? useCases.join(', ') : '';
94
+ const useCaseDisplay = useCaseList || 'N/A';
95
+ const displayName = `${voiceName} | ${gender} | ${age} | ${emotionDisplay}`;
96
+ const description = `ID: ${voiceId} | Use Cases: ${useCaseDisplay}`;
97
+ if (filter) {
98
+ const searchLower = filter.toLowerCase();
99
+ const matchesName = voiceName.toLowerCase().includes(searchLower);
100
+ const matchesId = voiceId.toLowerCase().includes(searchLower);
101
+ const matchesGender = gender.toLowerCase().includes(searchLower);
102
+ const matchesAge = age.toLowerCase().includes(searchLower);
103
+ const matchesEmotion = emotions.some((e) => e.toLowerCase().includes(searchLower));
104
+ const matchesUseCase = useCases.some((u) => u.toLowerCase().includes(searchLower));
105
+ if (!matchesName &&
106
+ !matchesId &&
107
+ !matchesGender &&
108
+ !matchesAge &&
109
+ !matchesEmotion &&
110
+ !matchesUseCase) {
111
+ continue;
112
+ }
113
+ }
114
+ results.results.push({
115
+ name: displayName,
116
+ value: voiceId,
117
+ url: `https://typecast.ai/developers/api/voices/${voiceId}`,
118
+ description,
119
+ });
120
+ }
121
+ results.results.sort((a, b) => a.name.localeCompare(b.name));
122
+ }
123
+ catch (error) {
124
+ const errorMessage = error.message || 'Unknown error';
125
+ let hint = 'Check your Typecast API credentials';
126
+ if (errorMessage.includes('401') || errorMessage.includes('Unauthorized')) {
127
+ hint = 'Invalid API key - update your credentials';
128
+ }
129
+ else if (errorMessage.includes('403') || errorMessage.includes('Forbidden')) {
130
+ hint = 'API key has no permission - check credentials';
131
+ }
132
+ else if (errorMessage.includes('network') || errorMessage.includes('ENOTFOUND')) {
133
+ hint = 'Network error - check internet connection';
134
+ }
135
+ results.results = [
136
+ {
137
+ name: `⚠️ ${hint}`,
138
+ value: '',
139
+ description: 'Use "By ID" mode to enter Voice ID directly',
140
+ },
141
+ {
142
+ name: '💡 Switch to "By ID" Mode to Enter Voice ID Manually',
143
+ value: '',
144
+ description: 'Click the dropdown on the left and select "By ID"',
145
+ },
146
+ ];
147
+ }
148
+ return results;
149
+ },
150
+ },
151
+ };
52
152
  }
53
153
  async execute() {
154
+ var _a, _b;
54
155
  const items = this.getInputData();
55
156
  const returnData = [];
56
157
  const resource = this.getNodeParameter('resource', 0);
@@ -59,28 +160,46 @@ class Typecast {
59
160
  try {
60
161
  if (resource === 'voice') {
61
162
  if (operation === 'getMany') {
62
- const model = this.getNodeParameter('model', i);
163
+ const filters = this.getNodeParameter('filters', i, {});
63
164
  const qs = {};
64
- if (model) {
65
- qs.model = model;
165
+ if (filters.model) {
166
+ qs.model = filters.model;
66
167
  }
67
- const response = await transport_1.typecastApiRequest.call(this, 'GET', '/voices', {}, qs);
68
- returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } }));
168
+ if (filters.gender) {
169
+ qs.gender = filters.gender;
170
+ }
171
+ if (filters.age) {
172
+ qs.age = filters.age;
173
+ }
174
+ if (filters.use_cases) {
175
+ qs.use_cases = filters.use_cases;
176
+ }
177
+ const response = await transport_1.typecastApiRequest.call(this, 'GET', '/voices', {}, qs, 'v2');
178
+ returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), {
179
+ itemData: { item: i },
180
+ }));
69
181
  }
70
- if (operation === 'get') {
182
+ if (operation === 'getOne') {
71
183
  const voiceId = this.getNodeParameter('voiceId', i);
72
- const model = this.getNodeParameter('model', i);
73
- const qs = {};
74
- if (model) {
75
- qs.model = model;
76
- }
77
- const response = await transport_1.typecastApiRequest.call(this, 'GET', `/voices/${voiceId}`, {}, qs);
78
- returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), { itemData: { item: i } }));
184
+ const response = await transport_1.typecastApiRequest.call(this, 'GET', `/voices/${encodeURIComponent(voiceId)}`, {}, {}, 'v2');
185
+ returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), {
186
+ itemData: { item: i },
187
+ }));
188
+ }
189
+ }
190
+ if (resource === 'subscription') {
191
+ if (operation === 'getMy') {
192
+ const response = await transport_1.typecastApiRequest.call(this, 'GET', '/users/me/subscription', {}, {}, 'v1');
193
+ returnData.push(...this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(response), {
194
+ itemData: { item: i },
195
+ }));
79
196
  }
80
197
  }
81
198
  if (resource === 'speech') {
82
199
  if (operation === 'textToSpeech') {
83
- const voiceId = this.getNodeParameter('voiceId', i);
200
+ const voiceId = this.getNodeParameter('voiceId', i, '', {
201
+ extractValue: true,
202
+ });
84
203
  const text = this.getNodeParameter('text', i);
85
204
  const model = this.getNodeParameter('model', i);
86
205
  const additionalOptions = this.getNodeParameter('additionalOptions', i, {});
@@ -93,18 +212,53 @@ class Typecast {
93
212
  body.language = additionalOptions.language;
94
213
  }
95
214
  const prompt = {};
96
- if (additionalOptions.emotionPreset) {
97
- prompt.emotion_preset = additionalOptions.emotionPreset;
215
+ if (model === 'ssfm-v30') {
216
+ const emotionType = this.getNodeParameter('emotionType', i, 'preset');
217
+ if (emotionType === 'smart') {
218
+ prompt.emotion_type = 'smart';
219
+ const previousText = this.getNodeParameter('previousText', i, '');
220
+ const nextText = this.getNodeParameter('nextText', i, '');
221
+ if (previousText) {
222
+ prompt.previous_text = previousText;
223
+ }
224
+ if (nextText) {
225
+ prompt.next_text = nextText;
226
+ }
227
+ }
228
+ else {
229
+ prompt.emotion_type = 'preset';
230
+ const emotionPreset = this.getNodeParameter('emotionPreset', i, 'normal');
231
+ const emotionIntensity = this.getNodeParameter('emotionIntensity', i, 1);
232
+ prompt.emotion_preset = emotionPreset;
233
+ prompt.emotion_intensity = emotionIntensity;
234
+ }
98
235
  }
99
- if (additionalOptions.emotionIntensity !== undefined) {
100
- prompt.emotion_intensity = additionalOptions.emotionIntensity;
236
+ else {
237
+ const emotionPresetV21 = this.getNodeParameter('emotionPresetV21', i, 'normal');
238
+ const emotionIntensityV21 = this.getNodeParameter('emotionIntensityV21', i, 1);
239
+ if (emotionPresetV21) {
240
+ prompt.emotion_preset = emotionPresetV21;
241
+ }
242
+ if (emotionIntensityV21 !== undefined) {
243
+ prompt.emotion_intensity = emotionIntensityV21;
244
+ }
101
245
  }
102
246
  if (Object.keys(prompt).length > 0) {
103
247
  body.prompt = prompt;
104
248
  }
105
249
  const output = {};
106
- if (additionalOptions.volume !== undefined) {
107
- output.volume = additionalOptions.volume;
250
+ const targetLufs = additionalOptions.targetLufs;
251
+ const volumeOpt = additionalOptions.volume;
252
+ if (targetLufs !== undefined &&
253
+ volumeOpt !== undefined &&
254
+ volumeOpt !== 100) {
255
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'target_lufs is mutually exclusive with a custom volume; leave Volume unset (default 100) or unset Target LUFS.');
256
+ }
257
+ if (targetLufs !== undefined) {
258
+ output.target_lufs = targetLufs;
259
+ }
260
+ else if (volumeOpt !== undefined) {
261
+ output.volume = volumeOpt;
108
262
  }
109
263
  if (additionalOptions.audioPitch !== undefined) {
110
264
  output.audio_pitch = additionalOptions.audioPitch;
@@ -137,6 +291,177 @@ class Typecast {
137
291
  };
138
292
  returnData.push(newItem);
139
293
  }
294
+ if (operation === 'textToSpeechStream') {
295
+ const voiceId = this.getNodeParameter('voiceId', i, '', {
296
+ extractValue: true,
297
+ });
298
+ const text = this.getNodeParameter('text', i);
299
+ const model = this.getNodeParameter('model', i);
300
+ const additionalOptions = this.getNodeParameter('additionalOptions', i, {});
301
+ const body = { voice_id: voiceId, text, model };
302
+ if (additionalOptions.language) {
303
+ body.language = additionalOptions.language;
304
+ }
305
+ const prompt = {};
306
+ if (model === 'ssfm-v30') {
307
+ const emotionType = this.getNodeParameter('emotionType', i, 'preset');
308
+ if (emotionType === 'smart') {
309
+ prompt.emotion_type = 'smart';
310
+ const previousText = this.getNodeParameter('previousText', i, '');
311
+ const nextText = this.getNodeParameter('nextText', i, '');
312
+ if (previousText)
313
+ prompt.previous_text = previousText;
314
+ if (nextText)
315
+ prompt.next_text = nextText;
316
+ }
317
+ else {
318
+ prompt.emotion_type = 'preset';
319
+ prompt.emotion_preset = this.getNodeParameter('emotionPreset', i, 'normal');
320
+ prompt.emotion_intensity = this.getNodeParameter('emotionIntensity', i, 1);
321
+ }
322
+ }
323
+ else {
324
+ const emotionPresetV21 = this.getNodeParameter('emotionPresetV21', i, 'normal');
325
+ const emotionIntensityV21 = this.getNodeParameter('emotionIntensityV21', i, 1);
326
+ if (emotionPresetV21) {
327
+ prompt.emotion_preset = emotionPresetV21;
328
+ }
329
+ if (emotionIntensityV21 !== undefined) {
330
+ prompt.emotion_intensity = emotionIntensityV21;
331
+ }
332
+ }
333
+ if (Object.keys(prompt).length > 0) {
334
+ body.prompt = prompt;
335
+ }
336
+ const output = {};
337
+ if (additionalOptions.audioPitch !== undefined) {
338
+ output.audio_pitch = additionalOptions.audioPitch;
339
+ }
340
+ if (additionalOptions.audioTempo !== undefined) {
341
+ output.audio_tempo = additionalOptions.audioTempo;
342
+ }
343
+ if (additionalOptions.audioFormat) {
344
+ output.audio_format = additionalOptions.audioFormat;
345
+ }
346
+ if (Object.keys(output).length > 0) {
347
+ body.output = output;
348
+ }
349
+ if (additionalOptions.seed !== undefined) {
350
+ body.seed = additionalOptions.seed;
351
+ }
352
+ const binaryProperty = additionalOptions.binaryProperty || 'data';
353
+ const audioFormat = additionalOptions.audioFormat || 'wav';
354
+ const mimeType = audioFormat === 'mp3' ? 'audio/mpeg' : 'audio/wav';
355
+ const response = await transport_1.typecastApiRequestBinary.call(this, 'POST', '/text-to-speech/stream', body);
356
+ const newItem = {
357
+ json: {
358
+ voice_id: voiceId,
359
+ text,
360
+ model,
361
+ streaming: true,
362
+ },
363
+ binary: {
364
+ [binaryProperty]: await this.helpers.prepareBinaryData(response, `audio.${audioFormat}`, mimeType),
365
+ },
366
+ };
367
+ returnData.push(newItem);
368
+ }
369
+ if (operation === 'textToSpeechWithTimestamps') {
370
+ const voiceId = this.getNodeParameter('voiceId', i, '', {
371
+ extractValue: true,
372
+ });
373
+ const text = this.getNodeParameter('text', i);
374
+ const model = this.getNodeParameter('model', i);
375
+ const granularity = this.getNodeParameter('granularity', i, '');
376
+ const additionalOptions = this.getNodeParameter('additionalOptions', i, {});
377
+ const body = { voice_id: voiceId, text, model };
378
+ if (additionalOptions.language) {
379
+ body.language = additionalOptions.language;
380
+ }
381
+ const prompt = {};
382
+ if (model === 'ssfm-v30') {
383
+ const emotionType = this.getNodeParameter('emotionType', i, 'preset');
384
+ if (emotionType === 'smart') {
385
+ prompt.emotion_type = 'smart';
386
+ const previousText = this.getNodeParameter('previousText', i, '');
387
+ const nextText = this.getNodeParameter('nextText', i, '');
388
+ if (previousText)
389
+ prompt.previous_text = previousText;
390
+ if (nextText)
391
+ prompt.next_text = nextText;
392
+ }
393
+ else {
394
+ prompt.emotion_type = 'preset';
395
+ prompt.emotion_preset = this.getNodeParameter('emotionPreset', i, 'normal');
396
+ prompt.emotion_intensity = this.getNodeParameter('emotionIntensity', i, 1);
397
+ }
398
+ }
399
+ else {
400
+ const emotionPresetV21 = this.getNodeParameter('emotionPresetV21', i, 'normal');
401
+ const emotionIntensityV21 = this.getNodeParameter('emotionIntensityV21', i, 1);
402
+ if (emotionPresetV21) {
403
+ prompt.emotion_preset = emotionPresetV21;
404
+ }
405
+ if (emotionIntensityV21 !== undefined) {
406
+ prompt.emotion_intensity = emotionIntensityV21;
407
+ }
408
+ }
409
+ if (Object.keys(prompt).length > 0) {
410
+ body.prompt = prompt;
411
+ }
412
+ const output = {};
413
+ const targetLufs = additionalOptions.targetLufs;
414
+ const volume = additionalOptions.volume;
415
+ if (targetLufs !== undefined && volume !== undefined && volume !== 100) {
416
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'target_lufs is mutually exclusive with a custom volume; leave volume at the default (100) or unset target_lufs.');
417
+ }
418
+ if (targetLufs !== undefined) {
419
+ output.target_lufs = targetLufs;
420
+ }
421
+ else if (volume !== undefined) {
422
+ output.volume = volume;
423
+ }
424
+ if (additionalOptions.audioPitch !== undefined) {
425
+ output.audio_pitch = additionalOptions.audioPitch;
426
+ }
427
+ if (additionalOptions.audioTempo !== undefined) {
428
+ output.audio_tempo = additionalOptions.audioTempo;
429
+ }
430
+ if (additionalOptions.audioFormat) {
431
+ output.audio_format = additionalOptions.audioFormat;
432
+ }
433
+ if (Object.keys(output).length > 0) {
434
+ body.output = output;
435
+ }
436
+ if (additionalOptions.seed !== undefined) {
437
+ body.seed = additionalOptions.seed;
438
+ }
439
+ const qs = {};
440
+ if (granularity)
441
+ qs.granularity = granularity;
442
+ const response = (await transport_1.typecastApiRequest.call(this, 'POST', '/text-to-speech/with-timestamps', body, qs, 'v1'));
443
+ const audioFormat = additionalOptions.audioFormat || 'wav';
444
+ const mimeType = audioFormat === 'mp3' ? 'audio/mpeg' : 'audio/wav';
445
+ const binaryProperty = additionalOptions.binaryProperty || 'data';
446
+ const audioB64 = response.audio || '';
447
+ const audioBuffer = Buffer.from(audioB64, 'base64');
448
+ const newItem = {
449
+ json: {
450
+ voice_id: voiceId,
451
+ text,
452
+ model,
453
+ granularity: granularity || null,
454
+ audio_format: response.audio_format,
455
+ audio_duration: response.audio_duration,
456
+ words: (_a = response.words) !== null && _a !== void 0 ? _a : null,
457
+ characters: (_b = response.characters) !== null && _b !== void 0 ? _b : null,
458
+ },
459
+ binary: {
460
+ [binaryProperty]: await this.helpers.prepareBinaryData(audioBuffer, `audio.${audioFormat}`, mimeType),
461
+ },
462
+ };
463
+ returnData.push(newItem);
464
+ }
140
465
  }
141
466
  }
142
467
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"Typecast.node.js","sourceRoot":"","sources":["../../../nodes/Typecast/Typecast.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,kDAAkF;AAElF,6CAAqD;AACrD,+CAAuD;AAEvD,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,gCAAgC;YAC7C,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE;gBACT,IAAI,EAAE,UAAU;aAChB;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBAC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MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAlMD,4BAkMC"}
1
+ {"version":3,"file":"Typecast.node.js","sourceRoot":"","sources":["../../../nodes/Typecast/Typecast.node.ts"],"names":[],"mappings":";;;AAAA,+CAUsB;AAEtB,kDAAkF;AAElF,6CAAqD;AACrD,+CAAuD;AACvD,2DAAmE;AAEnE,MAAa,QAAQ;IAArB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,gCAAgC;YAC7C,gBAAgB,EAAE,2CAA2C;YAC7D,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE;gBACR,IAAI,EAAE,UAAU;aACjB;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,aAAa;oBACnB,QAAQ,EAAE,IAAI;iBACf;aACF;YACD,UAAU,EAAE;gBACV;oBACE,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,QAAQ;yBAChB;wBACD;4BACE,IAAI,EAAE,cAAc;4BACpB,KAAK,EAAE,cAAc;yBACtB;wBACD;4BACE,IAAI,EAAE,OAAO;4BACb,KAAK,EAAE,OAAO;yBACf;qBACF;oBACD,OAAO,EAAE,QAAQ;iBAClB;gBACD,GAAG,wBAAgB;gBACnB,GAAG,0BAAiB;gBACpB,GAAG,sCAAuB;aAC3B;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