@fonoster/ctl 0.7.56 → 0.7.57
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.
|
@@ -123,7 +123,25 @@ class Create extends AuthenticatedCommand_1.AuthenticatedCommand {
|
|
|
123
123
|
{ name: "Azure", value: "tts.azure" }
|
|
124
124
|
]
|
|
125
125
|
}),
|
|
126
|
+
config: {}
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
const answersPartTwo = {
|
|
130
|
+
textToSpeech: {
|
|
126
131
|
config: {
|
|
132
|
+
model: answers.textToSpeech.productRef === "tts.elevenlabs" ? yield (0, prompts_1.select)({
|
|
133
|
+
message: "TTS Model",
|
|
134
|
+
choices: [
|
|
135
|
+
{ name: "Multilingual v2", value: "eleven_multilingual_v2" },
|
|
136
|
+
{ name: "Flash v2.5", value: "eleven_flash_v2_5" },
|
|
137
|
+
{ name: "Flash v2", value: "eleven_flash_v" },
|
|
138
|
+
{ name: "Turbo v2", value: "eleven_turbo_v2" },
|
|
139
|
+
{ name: "Turbo v2.5", value: "eleven_turbo_v2_5" },
|
|
140
|
+
{ name: "Multilingual Speech to Speech", value: "eleven_multilingual_sts_v2" },
|
|
141
|
+
// { name: "English Speech to Speech", value: "eleven_english_sts_v2" }
|
|
142
|
+
],
|
|
143
|
+
default: null
|
|
144
|
+
}) : null,
|
|
127
145
|
voice: yield (0, prompts_1.input)({
|
|
128
146
|
message: "TTS Voice",
|
|
129
147
|
required: true
|
|
@@ -134,10 +152,11 @@ class Create extends AuthenticatedCommand_1.AuthenticatedCommand {
|
|
|
134
152
|
message: "Ready?"
|
|
135
153
|
})
|
|
136
154
|
};
|
|
137
|
-
if (!
|
|
155
|
+
if (!answersPartTwo.confirm) {
|
|
138
156
|
this.log("Aborted!");
|
|
139
157
|
return;
|
|
140
158
|
}
|
|
159
|
+
answers.textToSpeech.config = Object.assign(Object.assign({}, answers.textToSpeech.config), answersPartTwo.textToSpeech.config);
|
|
141
160
|
try {
|
|
142
161
|
const client = yield this.createSdkClient();
|
|
143
162
|
const applications = new SDK.Applications(client);
|
|
@@ -72,8 +72,9 @@ const errorHandler_1 = __importDefault(require("../../errorHandler"));
|
|
|
72
72
|
class Update extends AuthenticatedCommand_1.AuthenticatedCommand {
|
|
73
73
|
run() {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c, _d, _e;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f;
|
|
76
76
|
const { args } = yield this.parse(Update);
|
|
77
|
+
const { ref } = args;
|
|
77
78
|
const client = yield this.createSdkClient();
|
|
78
79
|
const applications = new SDK.Applications(client);
|
|
79
80
|
const applicationFromDB = yield applications.getApplication(args.ref);
|
|
@@ -138,11 +139,29 @@ class Update extends AuthenticatedCommand_1.AuthenticatedCommand {
|
|
|
138
139
|
],
|
|
139
140
|
default: (_d = applicationFromDB.textToSpeech) === null || _d === void 0 ? void 0 : _d.productRef
|
|
140
141
|
}),
|
|
142
|
+
config: {}
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
const answersPartTwo = {
|
|
146
|
+
textToSpeech: {
|
|
141
147
|
config: {
|
|
148
|
+
model: answers.textToSpeech.productRef === "tts.elevenlabs" ? yield (0, prompts_1.select)({
|
|
149
|
+
message: "TTS Model",
|
|
150
|
+
choices: [
|
|
151
|
+
{ name: "Multilingual v2", value: "eleven_multilingual_v2" },
|
|
152
|
+
{ name: "Flash v2.5", value: "eleven_flash_v2_5" },
|
|
153
|
+
{ name: "Flash v2", value: "eleven_flash_v" },
|
|
154
|
+
{ name: "Turbo v2", value: "eleven_turbo_v2" },
|
|
155
|
+
{ name: "Turbo v2.5", value: "eleven_turbo_v2_5" },
|
|
156
|
+
{ name: "Multilingual Speech to Speech", value: "eleven_multilingual_sts_v2" },
|
|
157
|
+
// { name: "English Speech to Speech", value: "eleven_english_sts_v2" }
|
|
158
|
+
],
|
|
159
|
+
default: null
|
|
160
|
+
}) : null,
|
|
142
161
|
voice: yield (0, prompts_1.input)({
|
|
143
162
|
message: "TTS Voice",
|
|
144
163
|
required: true,
|
|
145
|
-
default: (_e = applicationFromDB.textToSpeech) === null || _e === void 0 ? void 0 : _e.config.voice
|
|
164
|
+
default: (_f = (_e = applicationFromDB.textToSpeech) === null || _e === void 0 ? void 0 : _e.config) === null || _f === void 0 ? void 0 : _f.voice
|
|
146
165
|
})
|
|
147
166
|
}
|
|
148
167
|
},
|
|
@@ -150,12 +169,13 @@ class Update extends AuthenticatedCommand_1.AuthenticatedCommand {
|
|
|
150
169
|
message: "Ready?"
|
|
151
170
|
})
|
|
152
171
|
};
|
|
153
|
-
if (!
|
|
172
|
+
if (!answersPartTwo.confirm) {
|
|
154
173
|
this.log("Aborted!");
|
|
155
174
|
return;
|
|
156
175
|
}
|
|
176
|
+
answers.textToSpeech.config = Object.assign(Object.assign({}, answers.textToSpeech.config), answersPartTwo.textToSpeech.config);
|
|
157
177
|
try {
|
|
158
|
-
yield applications.updateApplication(Object.assign({ ref
|
|
178
|
+
yield applications.updateApplication(Object.assign({ ref }, answers));
|
|
159
179
|
this.log("Done!");
|
|
160
180
|
}
|
|
161
181
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/ctl",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.57",
|
|
4
4
|
"description": "Fonoster Control Tool",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"bugs": {
|
|
31
31
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "6049222cffcda692472cf27efc2af216c73bcf47",
|
|
34
34
|
"bin": {
|
|
35
35
|
"fonoster": "./bin/run.js"
|
|
36
36
|
},
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"helpClass": "./dist/help"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@fonoster/sdk": "^0.7.
|
|
45
|
+
"@fonoster/sdk": "^0.7.57",
|
|
46
46
|
"@inquirer/prompts": "^7.1.0",
|
|
47
47
|
"@oclif/core": "^4.0.34",
|
|
48
48
|
"cliui": "^8.0.1",
|