iobroker.sayit 1.12.6 → 1.13.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/LICENSE +1 -1
- package/README.md +5 -2
- package/admin/i18n/de/translations.json +3 -3
- package/admin/i18n/en/translations.json +1 -1
- package/admin/i18n/zh-cn/translations.json +1 -1
- package/admin/index_m.html +3 -4
- package/admin/words.js +4 -4
- package/io-package.json +14 -13
- package/main.js +9 -9
- package/package.json +11 -10
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 2015-2023 bluefox <dogafox@gmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -253,9 +253,12 @@ Following values for engines are possible:
|
|
|
253
253
|
|
|
254
254
|
<!--
|
|
255
255
|
Placeholder for the next version (at the beginning of the line):
|
|
256
|
-
###
|
|
256
|
+
### **WORK IN PROGRESS**
|
|
257
257
|
-->
|
|
258
258
|
## Changelog
|
|
259
|
+
### 1.13.0 (2023-03-22)
|
|
260
|
+
* (bluefox) Made compatible with future js-controller
|
|
261
|
+
|
|
259
262
|
### 1.12.6 (2022-02-09)
|
|
260
263
|
* (bluefox) used setForeignBinaryState if possible
|
|
261
264
|
|
|
@@ -485,7 +488,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
485
488
|
|
|
486
489
|
The MIT License (MIT)
|
|
487
490
|
|
|
488
|
-
Copyright (c) 2014-
|
|
491
|
+
Copyright (c) 2014-2023, bluefox <dogafox@gmail.com>
|
|
489
492
|
|
|
490
493
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
491
494
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"API Key is not set!": "API Key ist leer!",
|
|
3
|
-
"API Key:": "API
|
|
3
|
+
"API Key:": "API Schlüssel",
|
|
4
4
|
"AWS Region:": "AWS Region",
|
|
5
|
-
"Access Key:": "
|
|
5
|
+
"Access Key:": "Zugangs Schlüssel",
|
|
6
6
|
"Adapter must be enabled": "Adapter muss aktiviert sein",
|
|
7
7
|
"All": "Alle",
|
|
8
8
|
"Announce length (sec):": "Ankündigunglänge (Sek)",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"Install first cloud adapter": "Installieren Sie zuerst den Cloud-Adapter",
|
|
25
25
|
"Language:": "Sprache",
|
|
26
26
|
"Linux player:": "Linux-Player",
|
|
27
|
-
"Password:": "
|
|
27
|
+
"Password:": "Passwort",
|
|
28
28
|
"Port:": "Port",
|
|
29
29
|
"Robot:": "Roboter",
|
|
30
30
|
"Secret Key:": "Secret Key",
|
package/admin/index_m.html
CHANGED
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
function fillEngineParams() {
|
|
90
90
|
var engine = $('#engine').val();
|
|
91
91
|
if (!sayitEngines[engine]) return;
|
|
92
92
|
for (var i = 0; i < sayitEngines[engine].params.length; i++) {
|
|
@@ -117,7 +117,6 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
121
120
|
function fillSonosDevices(elem, current) {
|
|
122
121
|
socket.emit('getObjectView', 'system', 'channel', {startkey: 'sonos.', endkey: 'sonos.\u9999'}, function (err, res) {
|
|
123
122
|
if (!err && res) {
|
|
@@ -550,7 +549,7 @@
|
|
|
550
549
|
}
|
|
551
550
|
}
|
|
552
551
|
// Read names of files for gong
|
|
553
|
-
socket.emit('readDir', 'sayit.' + instance, 'tts.userfiles', function (err, dir) {
|
|
552
|
+
socket.emit('readDir', 'sayit.' + instance, 'tts.userfiles', null, function (err, dir) {
|
|
554
553
|
var text = '<option value="">' + _('none') + '</option>';
|
|
555
554
|
if (dir) {
|
|
556
555
|
for (var i = 0; i < dir.length; i++) {
|
|
@@ -694,7 +693,7 @@
|
|
|
694
693
|
<input type="file" accept=".mp3,audio/*" id="files" name="files[]" multiple />
|
|
695
694
|
</div>
|
|
696
695
|
<div class="file-path-wrapper">
|
|
697
|
-
<input class="file-path validate" type="text"
|
|
696
|
+
<input class="file-path validate" type="text" />
|
|
698
697
|
</div>
|
|
699
698
|
</div>
|
|
700
699
|
</div>
|
package/admin/words.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
systemDictionary = {
|
|
5
|
-
"API Key is not set!": { "en": "API Key is not set!", "de": "API Key ist leer!", "ru": "API Key отсутствует!", "pt": "A chave da API não está definida!", "nl": "API-sleutel is niet ingesteld!", "fr": "La clé de l'API n'est pas définie!", "it": "Chiave API non impostata!", "es": "¡La clave API no está configurada!", "pl": "Klucz API nie jest ustawiony!", "zh-cn": "API
|
|
6
|
-
"API Key:": { "en": "API Key", "de": "API
|
|
5
|
+
"API Key is not set!": { "en": "API Key is not set!", "de": "API Key ist leer!", "ru": "API Key отсутствует!", "pt": "A chave da API não está definida!", "nl": "API-sleutel is niet ingesteld!", "fr": "La clé de l'API n'est pas définie!", "it": "Chiave API non impostata!", "es": "¡La clave API no está configurada!", "pl": "Klucz API nie jest ustawiony!", "zh-cn": "API密钥未设置!"},
|
|
6
|
+
"API Key:": { "en": "API Key", "de": "API Schlüssel", "ru": "Ключ API", "pt": "Chave API", "nl": "API sleutel", "fr": "clé API", "it": "Chiave API", "es": "Clave API", "pl": "Klucz API", "zh-cn": "API关键"},
|
|
7
7
|
"AWS Region:": { "en": "AWS Region", "de": "AWS Region", "ru": "AWS регион", "pt": "Região da AWS", "nl": "AWS-regio", "fr": "Région AWS", "it": "Regione AWS", "es": "Región de AWS", "pl": "Region AWS", "zh-cn": "Amazon glacier区域"},
|
|
8
|
-
"Access Key:": { "en": "Access Key", "de": "
|
|
8
|
+
"Access Key:": { "en": "Access Key", "de": "Zugangs Schlüssel", "ru": "Ключ доступа", "pt": "Chave de acesso", "nl": "Toegangssleutel", "fr": "Clef d'accès", "it": "Chiave di accesso", "es": "Llave de acceso", "pl": "Klucz dostępu", "zh-cn": "访问的关键"},
|
|
9
9
|
"Adapter must be enabled": { "en": "Adapter must be enabled", "de": "Adapter muss aktiviert sein", "ru": "Адаптер должен быть включен", "pt": "O adaptador deve estar ativado", "nl": "Adapter moet zijn ingeschakeld", "fr": "L'adaptateur doit être activé", "it": "L'adattatore deve essere abilitato", "es": "El adaptador debe estar habilitado", "pl": "Adapter musi być włączony", "zh-cn": "必须启用的适配器"},
|
|
10
10
|
"All": { "en": "All", "de": "Alle", "ru": "Все", "pt": "Todos", "nl": "Alle", "fr": "Tout", "it": "Tutti", "es": "Todas", "pl": "Wszystko", "zh-cn": "所有"},
|
|
11
11
|
"Announce length (sec):": { "en": "Announce length (sec)", "de": "Ankündigunglänge (Sek)", "ru": "Длительность извещения (сек)", "pt": "Anunciar o comprimento (seg)", "nl": "Kondig lengte (sec)", "fr": "Annoncer la longueur (sec)", "it": "Annunciare la lunghezza (sec)", "es": "Anunciar longitud (sec)", "pl": "Ogłaszaj długość (s)", "zh-cn": "宣布的长度(sec)"},
|
|
@@ -27,7 +27,7 @@ systemDictionary = {
|
|
|
27
27
|
"Install first cloud adapter": { "en": "Install cloud adapter at first", "de": "Installieren Sie zuerst den Cloud-Adapter", "ru": "Сначала установить облачный адаптер", "pt": "Instale o adaptador de nuvem primeiro", "nl": "Installeer eerst de cloud-adapter", "fr": "Installer l'adaptateur cloud au début", "it": "Installare inizialmente l'adattatore cloud", "es": "Instalar el adaptador de nube al principio", "pl": "Najpierw zainstaluj adapter chmury", "zh-cn": "安装云器在第一"},
|
|
28
28
|
"Language:": { "en": "Language", "de": "Sprache", "ru": "Язык", "pt": "Língua", "nl": "Taal", "fr": "La langue", "it": "linguaggio", "es": "Idioma", "pl": "Język", "zh-cn": "语言"},
|
|
29
29
|
"Linux player:": { "en": "Linux player", "de": "Linux-Player", "ru": "Linux плейер", "pt": "Jogador Linux", "nl": "Linux-speler", "fr": "Lecteur Linux", "it": "Lettore Linux", "es": "Reproductor de Linux", "pl": "Odtwarzacz Linux", "zh-cn": "Linux播放器"},
|
|
30
|
-
"Password:": { "en": "Password", "de": "
|
|
30
|
+
"Password:": { "en": "Password", "de": "Passwort", "ru": "Пароль", "pt": "Senha", "nl": "Wachtwoord", "fr": "Mot de passe", "it": "Parola d'ordine", "es": "Contraseña", "pl": "Hasło", "zh-cn": "密码"},
|
|
31
31
|
"Port:": { "en": "Port", "de": "Port", "ru": "Порт", "pt": "Porta", "nl": "Haven", "fr": "Port", "it": "Porta", "es": "Puerto", "pl": "Port", "zh-cn": "口"},
|
|
32
32
|
"Robot:": { "en": "Robot", "de": "Roboter", "ru": "Голос робота", "pt": "Robô", "nl": "Robot", "fr": "Robot", "it": "Robot", "es": "Robot", "pl": "Robot", "zh-cn": "机器人"},
|
|
33
33
|
"Secret Key:": { "en": "Secret Key", "de": "Secret Key", "ru": "Secret Key", "pt": "Chave secreta", "nl": "Geheime sleutel", "fr": "Clef secrète", "it": "Chiave segreta", "es": "Llave secreta", "pl": "Sekretny klucz", "zh-cn": "秘密的关键"},
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "sayit",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.13.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.13.0": {
|
|
7
|
+
"en": "Made compatible with future js-controller",
|
|
8
|
+
"de": "Kompatibel mit zukünftigem js-Controller",
|
|
9
|
+
"ru": "Совместим с будущим js-контроллером",
|
|
10
|
+
"pt": "Feito compatível com futuro js-controller",
|
|
11
|
+
"nl": "Verbonden met toekomstige Js-controller",
|
|
12
|
+
"fr": "Fabriqué compatible avec le futur contrôleur js",
|
|
13
|
+
"it": "Realizzato compatibile con il futuro js-controller",
|
|
14
|
+
"es": "Hecho compatible con js-controller futuro",
|
|
15
|
+
"pl": "Umożliwiał się przyszłemu js-kontrolerowi",
|
|
16
|
+
"uk": "Виготовлений сумісний з майбутнім js-controller",
|
|
17
|
+
"zh-cn": "与今后控制的容忍"
|
|
18
|
+
},
|
|
6
19
|
"1.12.6": {
|
|
7
20
|
"en": "used setForeignBinaryState if possible",
|
|
8
21
|
"de": "wenn möglich setForeignBinaryState verwendet",
|
|
@@ -74,18 +87,6 @@
|
|
|
74
87
|
"es": "Caso de prevención de accidentes (Sentry IOBROKER-SAYIT-Q, IOBROKER-SAYIT-S, IOBROKER-SAYIT-T)",
|
|
75
88
|
"pl": "Zapobiegaj awariom (Sentry IOBROKER-SAYIT-Q, IOBROKER-SAYIT-S, IOBROKER-SAYIT-T)",
|
|
76
89
|
"zh-cn": "防止发生崩溃情况(哨兵IOBROKER-SAYIT-Q,IOBROKER-SAYIT-S,IOBROKER-SAYIT-T)"
|
|
77
|
-
},
|
|
78
|
-
"1.12.0": {
|
|
79
|
-
"en": "HEOS was added",
|
|
80
|
-
"de": "HEOS wurde hinzugefügt",
|
|
81
|
-
"ru": "HEOS добавлен",
|
|
82
|
-
"pt": "HEOS foi adicionado",
|
|
83
|
-
"nl": "HEOS is toegevoegd",
|
|
84
|
-
"fr": "HEOS a été ajouté",
|
|
85
|
-
"it": "È stato aggiunto HEOS",
|
|
86
|
-
"es": "HEOS fue agregado",
|
|
87
|
-
"pl": "HEOS został dodany",
|
|
88
|
-
"zh-cn": "HEOS已添加"
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
"title": "Text to speech",
|
package/main.js
CHANGED
|
@@ -10,11 +10,11 @@ const adapterName = require('./package.json').name.split('.').pop();
|
|
|
10
10
|
|
|
11
11
|
const sayitOptions = engines.sayitOptions;
|
|
12
12
|
const libs = {
|
|
13
|
-
fs:
|
|
14
|
-
path:
|
|
13
|
+
fs: require('fs'),
|
|
14
|
+
path: require('path'),
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
let dataDir =
|
|
17
|
+
let dataDir = `${utils.getAbsoluteDefaultDataDir()}sayit`;
|
|
18
18
|
|
|
19
19
|
process.on('SIGINT', stop);
|
|
20
20
|
|
|
@@ -31,18 +31,18 @@ function startAdapter(options) {
|
|
|
31
31
|
|
|
32
32
|
adapter.on('stateChange', (id, state) => {
|
|
33
33
|
if (state && !state.ack) {
|
|
34
|
-
if (id === adapter.namespace
|
|
34
|
+
if (id === `${adapter.namespace}.tts.clearQueue`) {
|
|
35
35
|
if (list.length > 1) {
|
|
36
36
|
list.splice(1);
|
|
37
37
|
adapter.setState('tts.clearQueue', false, true);
|
|
38
38
|
}
|
|
39
|
-
} else if (id === adapter.namespace
|
|
39
|
+
} else if (id === `${adapter.namespace}.tts.volume`) {
|
|
40
40
|
if (adapter.config.type === 'system') {
|
|
41
41
|
speech2device && speech2device.sayItSystemVolume(state.val);
|
|
42
42
|
} else {
|
|
43
43
|
options.sayLastVolume = state.val;
|
|
44
44
|
}
|
|
45
|
-
} else if (id === adapter.namespace
|
|
45
|
+
} else if (id === `${adapter.namespace}.tts.text`) {
|
|
46
46
|
if (typeof state.val !== 'string') {
|
|
47
47
|
if (state.val === null || state.val === undefined || state.val === '') {
|
|
48
48
|
return adapter.log.warn('Cannot cache empty text');
|
|
@@ -51,7 +51,7 @@ function startAdapter(options) {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
sayIt(state.val);
|
|
54
|
-
} else if (id === adapter.namespace
|
|
54
|
+
} else if (id === `${adapter.namespace}.tts.cachetext`) {
|
|
55
55
|
if (typeof state.val !== 'string') {
|
|
56
56
|
if (state.val === null || state.val === undefined || state.val === '') {
|
|
57
57
|
return adapter.log.warn('Cannot cache empty text');
|
|
@@ -74,7 +74,7 @@ function startAdapter(options) {
|
|
|
74
74
|
libs.fs.mkdirSync(dataDir);
|
|
75
75
|
}
|
|
76
76
|
} catch (err) {
|
|
77
|
-
adapter.log.error(
|
|
77
|
+
adapter.log.error(`Could not create Storage directory: ${err}`);
|
|
78
78
|
dataDir = __dirname;
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -96,7 +96,7 @@ function processMessage(obj) {
|
|
|
96
96
|
|
|
97
97
|
const result = [];
|
|
98
98
|
browser.on('serviceUp', service => result.push({name: service.name, ip: service.addresses[0]}));
|
|
99
|
-
browser.on('error', err => adapter.log.error(
|
|
99
|
+
browser.on('error', err => adapter.log.error(`Error on MDNS discovery: ${err}`));
|
|
100
100
|
processMessageTimeout = setTimeout(() => {
|
|
101
101
|
processMessageTimeout = null;
|
|
102
102
|
browser.stop();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.sayit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Text to speech interface for ioBroker.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"jsftp": "^2.1.3",
|
|
40
|
-
"aws-sdk": "~2.
|
|
41
|
-
"@iobroker/adapter-core": "^2.
|
|
40
|
+
"aws-sdk": "~2.1341.0",
|
|
41
|
+
"@iobroker/adapter-core": "^2.6.7",
|
|
42
42
|
"google-tts-api": "^2.0.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@alcalzone/release-script": "^3.5.
|
|
46
|
-
"@alcalzone/release-script-plugin-iobroker": "^3.5.
|
|
47
|
-
"@alcalzone/release-script-plugin-license": "^3.5.
|
|
45
|
+
"@alcalzone/release-script": "^3.5.9",
|
|
46
|
+
"@alcalzone/release-script-plugin-iobroker": "^3.5.9",
|
|
47
|
+
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
|
48
48
|
"gulp": "^4.0.2",
|
|
49
|
-
"axios": "^
|
|
50
|
-
"mocha": "^
|
|
51
|
-
"chai": "^4.3.
|
|
49
|
+
"axios": "^1.3.4",
|
|
50
|
+
"mocha": "^10.2.0",
|
|
51
|
+
"chai": "^4.3.7"
|
|
52
52
|
},
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/ioBroker/ioBroker.sayit/issues"
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"release": "release-script",
|
|
72
72
|
"release-patch": "release-script patch --yes",
|
|
73
73
|
"release-minor": "release-script minor --yes",
|
|
74
|
-
"release-major": "release-script major --yes"
|
|
74
|
+
"release-major": "release-script major --yes",
|
|
75
|
+
"update-packages": "ncu --upgrade"
|
|
75
76
|
},
|
|
76
77
|
"license": "MIT",
|
|
77
78
|
"readmeFilename": "README.md"
|