kingkont 0.7.33 → 0.7.34
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/index.html +3 -0
- package/package.json +1 -1
- package/server.js +5 -3
package/index.html
CHANGED
|
@@ -1847,6 +1847,9 @@ async function plannedProvider(kind) {
|
|
|
1847
1847
|
if (s.useOpenrouter === true) return 'openrouter';
|
|
1848
1848
|
return 'none';
|
|
1849
1849
|
case 'audio': case 'tts': case 'sfx': case 'music':
|
|
1850
|
+
// Если ElevenLabs включён С ключом — приоритет прямого ElevenLabs
|
|
1851
|
+
// (юзеру нужны его кастомные/cloned voices). Иначе KingKont.
|
|
1852
|
+
if (s.useElevenlabs === true && s.elevenKey) return 'elevenlabs';
|
|
1850
1853
|
if (hasChatium) return 'kingkont';
|
|
1851
1854
|
if (s.useElevenlabs === true) return 'elevenlabs';
|
|
1852
1855
|
return 'none';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kingkont",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.34",
|
|
4
4
|
"description": "KingKont \u00b7 Chatium \u2014 \u043d\u043e\u0434-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0446\u0435\u043d \u0441 AI-\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 (\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438/\u0432\u0438\u0434\u0435\u043e/\u0433\u043e\u043b\u043e\u0441/SFX/\u043c\u0443\u0437\u044b\u043a\u0430/\u0442\u0435\u043a\u0441\u0442)",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"bin": {
|
package/server.js
CHANGED
|
@@ -772,9 +772,11 @@ async function handleTts(req, res) {
|
|
|
772
772
|
if (!text) return send(res, 400, { error: 'нужен text' });
|
|
773
773
|
const s = getSettings();
|
|
774
774
|
|
|
775
|
-
//
|
|
776
|
-
//
|
|
777
|
-
|
|
775
|
+
// Приоритет: если ElevenLabs включён С ключом — идём прямо туда (юзер
|
|
776
|
+
// ожидает свои кастомные/cloned голоса из ElevenLabs API).
|
|
777
|
+
// Иначе — через KingKont (там 26-голосный enum eleven_v3 + qwen/minimax/gemini).
|
|
778
|
+
const directElevenAvailable = s.useElevenlabs && process.env.ELEVENLABS_API_KEY;
|
|
779
|
+
if (s.useChatium && s.chatium?.token && s.chatium?.base && !directElevenAvailable) {
|
|
778
780
|
const ttsBody = { kind: 'tts', text };
|
|
779
781
|
// Маппинг легаси `modelId` → `model` (старый клиент шлёт modelId='eleven_v3').
|
|
780
782
|
if (body.ttsModel) ttsBody.model = body.ttsModel;
|