@neosapience/n8n-nodes-typecast 1.2.5 → 1.3.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 +21 -3
- package/dist/nodes/Typecast/Typecast.node.js +4 -14
- package/dist/nodes/Typecast/Typecast.node.js.map +1 -1
- package/dist/nodes/Typecast/resources/speech/index.js +18 -17
- package/dist/nodes/Typecast/resources/speech/index.js.map +1 -1
- package/dist/nodes/Typecast/resources/voice/index.js +6 -1
- package/dist/nodes/Typecast/resources/voice/index.js.map +1 -1
- package/dist/package.json +1 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/Typecast/Typecast.node.ts +6 -18
- package/nodes/Typecast/resources/speech/index.ts +18 -19
- package/nodes/Typecast/resources/voice/index.ts +6 -1
- package/package.json +1 -9
|
@@ -156,12 +156,10 @@ export class Typecast implements INodeType {
|
|
|
156
156
|
? voice.age.replace(/_/g, ' ').replace(/\b\w/g, (c: string) => c.toUpperCase())
|
|
157
157
|
: 'Unknown';
|
|
158
158
|
|
|
159
|
-
//
|
|
159
|
+
// Display only emotions supported by the selected model.
|
|
160
160
|
let emotions: string[] = [];
|
|
161
161
|
if (voice.models && Array.isArray(voice.models)) {
|
|
162
|
-
|
|
163
|
-
const v30Model = voice.models.find((m: IDataObject) => m.version === 'ssfm-v30');
|
|
164
|
-
const modelToUse = v30Model || voice.models[0];
|
|
162
|
+
const modelToUse = voice.models.find((m: IDataObject) => m.version === model);
|
|
165
163
|
if (modelToUse && Array.isArray(modelToUse.emotions)) {
|
|
166
164
|
emotions = modelToUse.emotions as string[];
|
|
167
165
|
}
|
|
@@ -469,8 +467,8 @@ export class Typecast implements INodeType {
|
|
|
469
467
|
// Build prompt object based on model and emotion type
|
|
470
468
|
const prompt: IDataObject = {};
|
|
471
469
|
|
|
472
|
-
if (model === 'ssfm-v30') {
|
|
473
|
-
// Get emotion type for
|
|
470
|
+
if (model === 'ssfm-v30' || model === 'ssfm-v31') {
|
|
471
|
+
// Get emotion type for SSFM 3.x
|
|
474
472
|
const emotionType = this.getNodeParameter('emotionType', i, 'preset') as string;
|
|
475
473
|
|
|
476
474
|
if (emotionType === 'smart') {
|
|
@@ -551,10 +549,6 @@ export class Typecast implements INodeType {
|
|
|
551
549
|
body.output = output;
|
|
552
550
|
}
|
|
553
551
|
|
|
554
|
-
// Add seed if provided
|
|
555
|
-
if (additionalOptions.seed !== undefined) {
|
|
556
|
-
body.seed = additionalOptions.seed;
|
|
557
|
-
}
|
|
558
552
|
|
|
559
553
|
const binaryProperty = additionalOptions.binaryProperty || 'data';
|
|
560
554
|
const audioFormat = additionalOptions.audioFormat || 'wav';
|
|
@@ -609,7 +603,7 @@ export class Typecast implements INodeType {
|
|
|
609
603
|
|
|
610
604
|
// Build prompt (mirrors textToSpeech)
|
|
611
605
|
const prompt: IDataObject = {};
|
|
612
|
-
if (model === 'ssfm-v30') {
|
|
606
|
+
if (model === 'ssfm-v30' || model === 'ssfm-v31') {
|
|
613
607
|
const emotionType = this.getNodeParameter('emotionType', i, 'preset') as string;
|
|
614
608
|
if (emotionType === 'smart') {
|
|
615
609
|
prompt.emotion_type = 'smart';
|
|
@@ -681,9 +675,6 @@ export class Typecast implements INodeType {
|
|
|
681
675
|
body.output = output;
|
|
682
676
|
}
|
|
683
677
|
|
|
684
|
-
if (additionalOptions.seed !== undefined) {
|
|
685
|
-
body.seed = additionalOptions.seed;
|
|
686
|
-
}
|
|
687
678
|
|
|
688
679
|
const binaryProperty = (additionalOptions.binaryProperty as string) || 'data';
|
|
689
680
|
const audioFormat = (additionalOptions.audioFormat as string) || 'wav';
|
|
@@ -740,7 +731,7 @@ export class Typecast implements INodeType {
|
|
|
740
731
|
|
|
741
732
|
// Build prompt (mirrors textToSpeech)
|
|
742
733
|
const prompt: IDataObject = {};
|
|
743
|
-
if (model === 'ssfm-v30') {
|
|
734
|
+
if (model === 'ssfm-v30' || model === 'ssfm-v31') {
|
|
744
735
|
const emotionType = this.getNodeParameter('emotionType', i, 'preset') as string;
|
|
745
736
|
if (emotionType === 'smart') {
|
|
746
737
|
prompt.emotion_type = 'smart';
|
|
@@ -813,9 +804,6 @@ export class Typecast implements INodeType {
|
|
|
813
804
|
body.output = output;
|
|
814
805
|
}
|
|
815
806
|
|
|
816
|
-
if (additionalOptions.seed !== undefined) {
|
|
817
|
-
body.seed = additionalOptions.seed;
|
|
818
|
-
}
|
|
819
807
|
|
|
820
808
|
const qs: IDataObject = {};
|
|
821
809
|
if (granularity) qs.granularity = granularity;
|
|
@@ -44,6 +44,9 @@ export const speechDescription: INodeProperties[] = [
|
|
|
44
44
|
displayName: 'Voice ID',
|
|
45
45
|
name: 'voiceId',
|
|
46
46
|
type: 'resourceLocator',
|
|
47
|
+
typeOptions: {
|
|
48
|
+
loadOptionsDependsOn: ['model'],
|
|
49
|
+
},
|
|
47
50
|
required: true,
|
|
48
51
|
displayOptions: {
|
|
49
52
|
show: {
|
|
@@ -54,7 +57,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
54
57
|
default: { mode: 'list', value: '' },
|
|
55
58
|
|
|
56
59
|
description:
|
|
57
|
-
'Select a voice from the list or enter a Voice ID directly. For quick-cloned voices, switch to By ID and use the Clone Voice output voice_id (uc_...).',
|
|
60
|
+
'Select a voice from the list or enter a Voice ID directly. Choose Model first: changing it resets Voice ID, including By ID values and expressions. For quick-cloned voices, switch to By ID and use the Clone Voice output voice_id (uc_...).',
|
|
58
61
|
modes: [
|
|
59
62
|
{
|
|
60
63
|
displayName: 'From List',
|
|
@@ -115,10 +118,14 @@ export const speechDescription: INodeProperties[] = [
|
|
|
115
118
|
},
|
|
116
119
|
options: [
|
|
117
120
|
{
|
|
118
|
-
name: 'SSFM-
|
|
121
|
+
name: 'SSFM-V31',
|
|
122
|
+
value: 'ssfm-v31',
|
|
123
|
+
description: 'SSFM 3.1; select a compatible voice and supported emotions',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'SSFM-V30',
|
|
119
127
|
value: 'ssfm-v30',
|
|
120
|
-
description:
|
|
121
|
-
'Latest model with improved prosody, Smart Emotion, and 37 language support (recommended)',
|
|
128
|
+
description: 'SSFM 3.0 with Smart Emotion; select a compatible voice',
|
|
122
129
|
},
|
|
123
130
|
{
|
|
124
131
|
name: 'SSFM-V21',
|
|
@@ -128,7 +135,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
128
135
|
],
|
|
129
136
|
default: 'ssfm-v30',
|
|
130
137
|
description:
|
|
131
|
-
'Voice model to use for speech synthesis.
|
|
138
|
+
'Voice model to use for speech synthesis. Select a compatible voice for ssfm-v31 or ssfm-v30 Smart Emotion features. For quick-cloned voices, use the same model returned by Clone Voice.',
|
|
132
139
|
},
|
|
133
140
|
{
|
|
134
141
|
displayName: 'Emotion Type',
|
|
@@ -138,7 +145,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
138
145
|
show: {
|
|
139
146
|
resource: ['speech'],
|
|
140
147
|
operation: ['textToSpeech', 'textToSpeechStream', 'textToSpeechWithTimestamps'],
|
|
141
|
-
model: ['ssfm-v30'],
|
|
148
|
+
model: ['ssfm-v30', 'ssfm-v31'],
|
|
142
149
|
},
|
|
143
150
|
},
|
|
144
151
|
options: [
|
|
@@ -156,7 +163,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
156
163
|
],
|
|
157
164
|
default: 'smart',
|
|
158
165
|
description:
|
|
159
|
-
'How to control emotional expression (ssfm-v30
|
|
166
|
+
'How to control emotional expression (ssfm-v30/ssfm-v31) Smart: AI detects emotion automatically from context. Preset: Select an emotion supported by the voice and model.',
|
|
160
167
|
},
|
|
161
168
|
{
|
|
162
169
|
displayName: 'Previous Text',
|
|
@@ -166,7 +173,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
166
173
|
show: {
|
|
167
174
|
resource: ['speech'],
|
|
168
175
|
operation: ['textToSpeech', 'textToSpeechStream', 'textToSpeechWithTimestamps'],
|
|
169
|
-
model: ['ssfm-v30'],
|
|
176
|
+
model: ['ssfm-v30', 'ssfm-v31'],
|
|
170
177
|
emotionType: ['smart'],
|
|
171
178
|
},
|
|
172
179
|
},
|
|
@@ -186,7 +193,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
186
193
|
show: {
|
|
187
194
|
resource: ['speech'],
|
|
188
195
|
operation: ['textToSpeech', 'textToSpeechStream', 'textToSpeechWithTimestamps'],
|
|
189
|
-
model: ['ssfm-v30'],
|
|
196
|
+
model: ['ssfm-v30', 'ssfm-v31'],
|
|
190
197
|
emotionType: ['smart'],
|
|
191
198
|
},
|
|
192
199
|
},
|
|
@@ -206,7 +213,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
206
213
|
show: {
|
|
207
214
|
resource: ['speech'],
|
|
208
215
|
operation: ['textToSpeech', 'textToSpeechStream', 'textToSpeechWithTimestamps'],
|
|
209
|
-
model: ['ssfm-v30'],
|
|
216
|
+
model: ['ssfm-v30', 'ssfm-v31'],
|
|
210
217
|
emotionType: ['preset'],
|
|
211
218
|
},
|
|
212
219
|
},
|
|
@@ -259,7 +266,7 @@ export const speechDescription: INodeProperties[] = [
|
|
|
259
266
|
show: {
|
|
260
267
|
resource: ['speech'],
|
|
261
268
|
operation: ['textToSpeech', 'textToSpeechStream', 'textToSpeechWithTimestamps'],
|
|
262
|
-
model: ['ssfm-v30'],
|
|
269
|
+
model: ['ssfm-v30', 'ssfm-v31'],
|
|
263
270
|
emotionType: ['preset'],
|
|
264
271
|
},
|
|
265
272
|
},
|
|
@@ -611,14 +618,6 @@ export const speechDescription: INodeProperties[] = [
|
|
|
611
618
|
description:
|
|
612
619
|
'Remaining detected silence in milliseconds (0–1000). Zero removes silence; omit this option to disable. Streaming playback may need additional buffering.',
|
|
613
620
|
},
|
|
614
|
-
{
|
|
615
|
-
displayName: 'Seed',
|
|
616
|
-
name: 'seed',
|
|
617
|
-
type: 'number',
|
|
618
|
-
default: 42,
|
|
619
|
-
description:
|
|
620
|
-
'Random seed for controlling speech generation variations Use any integer value. Using the same seed with identical parameters will produce consistent results, useful for reproducibility.',
|
|
621
|
-
},
|
|
622
621
|
{
|
|
623
622
|
displayName: 'Target LUFS',
|
|
624
623
|
name: 'targetLufs',
|
|
@@ -208,7 +208,12 @@ export const voiceDescription: INodeProperties[] = [
|
|
|
208
208
|
description: 'List all available voices for all models',
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
name: 'SSFM-
|
|
211
|
+
name: 'SSFM-V31',
|
|
212
|
+
value: 'ssfm-v31',
|
|
213
|
+
description: 'List voices compatible with SSFM 3.1',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'SSFM-V30',
|
|
212
217
|
value: 'ssfm-v30',
|
|
213
218
|
description: 'Latest model with improved prosody and additional emotion presets',
|
|
214
219
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neosapience/n8n-nodes-typecast",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "n8n node for Typecast TTS API integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -58,14 +58,6 @@
|
|
|
58
58
|
"dist/nodes/Typecast/Typecast.node.js"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@n8n/node-cli": "^0.46.1",
|
|
63
|
-
"@types/node": "^26.1.1",
|
|
64
|
-
"eslint": "9.39.5",
|
|
65
|
-
"n8n-workflow": "^2.16.0",
|
|
66
|
-
"prettier": "^3.9.5",
|
|
67
|
-
"typescript": "^6.0.3"
|
|
68
|
-
},
|
|
69
61
|
"peerDependencies": {
|
|
70
62
|
"n8n-workflow": "*"
|
|
71
63
|
}
|