iobroker.sayit 4.0.5 → 5.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/LICENSE +1 -1
- package/README.md +41 -20
- package/admin/blockly.js +1313 -174
- package/admin/jsonConfig.json +1193 -1073
- package/build/engines.js +1107 -0
- package/build/engines.js.map +1 -0
- package/build/lib/engines.js +1347 -0
- package/build/lib/engines.js.map +1 -0
- package/build/lib/speech2device.js +682 -0
- package/build/lib/speech2device.js.map +1 -0
- package/build/lib/text2speech.js +517 -0
- package/build/lib/text2speech.js.map +1 -0
- package/build/main.js +997 -0
- package/build/main.js.map +1 -0
- package/build/speech2device.js +675 -0
- package/build/speech2device.js.map +1 -0
- package/build/text2speech.js +516 -0
- package/build/text2speech.js.map +1 -0
- package/io-package.json +34 -28
- package/package.json +20 -15
- package/admin/engines.js +0 -198
- package/admin/index.html +0 -671
- package/admin/index_m.html +0 -877
- package/admin/words.js +0 -103
- package/lib/speech2device.js +0 -681
- package/lib/text2speech.js +0 -460
- package/main.js +0 -923
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015-
|
|
3
|
+
Copyright (c) 2015-2025 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
|
@@ -16,12 +16,12 @@ SayIt Adapter can convert text to speech and play it on some device.
|
|
|
16
16
|
## Configuration
|
|
17
17
|
Actually, the following outputs are supported:
|
|
18
18
|
|
|
19
|
-
- *Browser* -
|
|
19
|
+
- *Browser* - browser will play the text within opened `iobroker.vis` page. It is supported almost by every desktop browser and by few mobile Browsers.
|
|
20
20
|
|
|
21
21
|
- *[Home24- MediaPlayer](http://www.home-24.net/index.php?app=media)* - the text will be sent and played to the Android device with Home24 - MediaPlayer installed. For this will be used build in Android text to speech engine. The port cannot be changed and set to 50000.
|
|
22
22
|
|
|
23
23
|
- *Home24 - MediaPlayer and [FTP Server](https://play.google.com/store/apps/details?id=lutey.FTPServer)* - the text will be sent and played on the Android device with Home24 - MediaPlayer installed. For this will be used the Google text to speech engine. Generated mp3 file will be copied over FTP to an Android device and played with Home24 - MediaPlayer.
|
|
24
|
-
Both apps have to have same home directories. (E.g
|
|
24
|
+
Both apps have to have same home directories. (E.g., root directory of \"sd card\").
|
|
25
25
|
|
|
26
26
|
- *System* - the text will be played by OS, where the ioBroker adapter runs. Following OS are supported: Windows, linux, Mac OSx.
|
|
27
27
|
|
|
@@ -49,7 +49,7 @@ Online:
|
|
|
49
49
|
To use Yandex.cloud you should register here: [https://cloud.yandex.ru/], install SpeechKIT API in the Cloud and get Auth Token and Folder ID as described in API instructions.
|
|
50
50
|
- Cloud: To use Cloud voices you need configured and running `cloud` adapter or enter app-key directly in settings
|
|
51
51
|
- Amazon Web Services Polly:
|
|
52
|
-
To use AWS Polly voices you need to create an access key and secret key [here](https://console.aws.amazon.com/iam/home). The Amazon documentation can you find [here](http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html).
|
|
52
|
+
To use AWS Polly voices, you need to create an access key and secret key [here](https://console.aws.amazon.com/iam/home). The Amazon documentation can you find [here](http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html).
|
|
53
53
|
|
|
54
54
|
Offline:
|
|
55
55
|
- PicoTTS (linux only): English, German, Italian, Spanish, French;
|
|
@@ -73,17 +73,17 @@ More [info](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit
|
|
|
73
73
|
### System command
|
|
74
74
|
If you have some program, that can play audio files locally or somewhere else, you can write this command here. E.g.
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
`myCustomPlayer --option`
|
|
77
77
|
|
|
78
78
|
If **System** output is selected, the `sayit` adapter will execute the following command on a local system:
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
`myCustomPlayer --option /opt/iobroker/node_modules/iobroker.sayit/say.mp3`
|
|
81
81
|
|
|
82
82
|
If file name must stay somewhere in the middle, you can use *%s* to specify where the file name must be placed:
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
`myCustomPlayer --option "%s" > /dev/null`
|
|
85
85
|
|
|
86
|
-
sayIt will make
|
|
86
|
+
sayIt will make `myCustomPlayer --option "/opt/iobroker/node_modules/iobroker.sayit/say.mp3" > /dev/null` from it.
|
|
87
87
|
|
|
88
88
|
## Usage
|
|
89
89
|
SayIt adapter cannot be used alone. It must be controlled from javascript adapter or from "vis" with specific widget.
|
|
@@ -95,20 +95,31 @@ After creation of adapter instance, you can find the following objects:
|
|
|
95
95
|
E.g., you can enter here manually "No internet" and if ping to google.com is negative, write "No internet" to "tts.text" and it will be pronounced. Of course, cache must be enabled.
|
|
96
96
|
|
|
97
97
|
State `tts.text` supports extended syntax, so the language/engine and volume can be defined together with text. It is used to enable multi-language text2speech engines.
|
|
98
|
-
E.g., if adapter has engine
|
|
98
|
+
E.g., if adapter has engine `Google-english`, it is possible with phrase `de:Sag es` to force using Google-Deutsch speech engine.
|
|
99
99
|
|
|
100
|
-
With
|
|
100
|
+
With `ru;75;Погода хорошая` we can force using russian language and volume 75%.
|
|
101
101
|
|
|
102
|
-
You can specify the volume of announcement in percent from current or given volume (not from maximal). E.g., if command is
|
|
102
|
+
You can specify the volume of announcement in percent from current or given volume (not from maximal). E.g., if command is `de;75;Gutes Wetter`and "announce volume" is 50%, the announcement will be played with volume 38% from 100% possible.
|
|
103
103
|
|
|
104
104
|
The system command to play the mp3 file can be specified too. If you leave it blank, the default settings will be used: windows - `cmdmp3.exe`, OSX - `/usr/bin/afplay`, linux - `mpg321` or `omxplayer` (recommended).
|
|
105
105
|
|
|
106
|
-
To install omxplayer write
|
|
106
|
+
To install omxplayer write `sudo apt-get install omxplayer` or write `sudo apt-get install mpg321` to install mpg321.
|
|
107
107
|
|
|
108
108
|
**Note:** The default announce selection will be possible only after the start of the instance.
|
|
109
109
|
|
|
110
|
+
With `sendTo` you can send more different parameters, like `sonosDevice` or `browserInstance`:
|
|
111
|
+
```javascript
|
|
112
|
+
sendTo('sayit.0', 'say', {
|
|
113
|
+
text: 'Hello',
|
|
114
|
+
sonosDevice: 'Wohnzimmer', // optional, if not defined, the device from configuration will be used
|
|
115
|
+
engine: 'Google-de', // optional, if not defined, the device from configuration will be used
|
|
116
|
+
type: 'sonos', // optional, if not defined, the device from configuration will be used
|
|
117
|
+
volume: 20, // optional, if not defined, the device from configuration will be used
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
110
121
|
### Priorities
|
|
111
|
-
To immediately pronounce the text despite the queued texts, you have
|
|
122
|
+
To immediately pronounce the text despite the queued texts, you have two possibilities:
|
|
112
123
|
- place "!" as a first character in text, so this text will be pronounced immediately after the current one.
|
|
113
124
|
- write true into "tts.clearQueue" state and the queue will be cleared. After that you can write a new text into `tts.text`, but all queued texts are thrown away.
|
|
114
125
|
|
|
@@ -267,6 +278,16 @@ The following values for engines are possible:
|
|
|
267
278
|
### **WORK IN PROGRESS**
|
|
268
279
|
-->
|
|
269
280
|
## Changelog
|
|
281
|
+
### 5.1.0 (2025-09-17)
|
|
282
|
+
* (bluefox) Adapter was rewritten with TypeScript
|
|
283
|
+
* (bluefox) Updated Polly voices list
|
|
284
|
+
* (bluefox) Added option to send sonos device as parameter in sendTo command
|
|
285
|
+
|
|
286
|
+
### 5.0.0 (2024-07-16)
|
|
287
|
+
* (mcm1957) Adapter requires admin v7 or newer now
|
|
288
|
+
* (mcm1957) Adapter requires jas-controller 5 or newer now
|
|
289
|
+
* (bluefox) Added possibility to play directly from states: `sayit.0/tts.userfiles/gong.mp3`
|
|
290
|
+
|
|
270
291
|
### 4.0.5 (2024-07-12)
|
|
271
292
|
* (bluefox) Packages updated
|
|
272
293
|
* (bluefox) Corrected playing in vis
|
|
@@ -337,7 +358,7 @@ The following values for engines are possible:
|
|
|
337
358
|
|
|
338
359
|
### 1.11.0 (2020-08-02)
|
|
339
360
|
* (Apollon77) Move the generated mp3 file to an own directory in iobroker-data instead of inside node_modules (Hopefully not breaking)
|
|
340
|
-
* (Apollon77) Change
|
|
361
|
+
* (Apollon77) Change the file writing to use Sync methods to make sure they cannot run in parallel
|
|
341
362
|
|
|
342
363
|
### 1.10.2 (2020-07-19)
|
|
343
364
|
* (Apollon77) Crash case prevented (Sentry IOBROKER-SAYIT-8)
|
|
@@ -411,7 +432,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
411
432
|
|
|
412
433
|
### 1.6.3 (2017-10-04)
|
|
413
434
|
* (bluefox) Code refactoring
|
|
414
|
-
* (bluefox) Add
|
|
435
|
+
* (bluefox) Add Google Home as output
|
|
415
436
|
* (bluefox) Remove ivona because not more supported
|
|
416
437
|
|
|
417
438
|
### 1.5.2 (2017-03-09)
|
|
@@ -422,11 +443,11 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
422
443
|
|
|
423
444
|
### 1.5.0 (2017-01-27)
|
|
424
445
|
* (DarkChaos) Add AWS Polly as source
|
|
425
|
-
* (bluefox) Add cloud as source
|
|
446
|
+
* (bluefox) Add cloud as a source
|
|
426
447
|
|
|
427
448
|
### 1.4.0 (2017-01-16)
|
|
428
449
|
* (bluefox) fixed install problem
|
|
429
|
-
* (bluefox) add PicoTTS as source
|
|
450
|
+
* (bluefox) add PicoTTS as a source
|
|
430
451
|
|
|
431
452
|
### 1.3.3 (2017-01-13)
|
|
432
453
|
* (bluefox) show only installed instances in blockly
|
|
@@ -454,7 +475,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
454
475
|
* (bluefox) Add omxplayer option
|
|
455
476
|
|
|
456
477
|
### 1.0.1 (2016-10-12)
|
|
457
|
-
* (bluefox) support
|
|
478
|
+
* (bluefox) support for blockly
|
|
458
479
|
|
|
459
480
|
### 1.0.0 (2016-05-14)
|
|
460
481
|
* (bluefox) Make the type of mp3 as file
|
|
@@ -476,7 +497,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
476
497
|
|
|
477
498
|
### 0.3.12 (2015-10-06)
|
|
478
499
|
* (bluefox) fixed error if received mp3 file is too short
|
|
479
|
-
* (bluefox) try to implement cache datapoint (you can use sayit.0.tts.cachetext to create cache for phrases and use sayit without internet)
|
|
500
|
+
* (bluefox) try to implement cache datapoint (you can use `sayit.0.tts.cachetext` to create cache for phrases and use sayit without internet)
|
|
480
501
|
|
|
481
502
|
### 0.3.11 (2015-08-03)
|
|
482
503
|
* (bluefox) change google requests from http to https
|
|
@@ -494,7 +515,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
494
515
|
|
|
495
516
|
### 0.3.7 (2015-05-28)
|
|
496
517
|
* (bluefox) fixed volume for an announcement
|
|
497
|
-
* (bluefox) support for play files from internal filesystem, like
|
|
518
|
+
* (bluefox) support for play files from internal filesystem, like `/sayit.0/tts.userfiles/myGong.mp3`
|
|
498
519
|
|
|
499
520
|
### 0.3.6 (2015-03-24)
|
|
500
521
|
* (bluefox) fixed error with volume by sonos
|
|
@@ -536,7 +557,7 @@ Changed type of top-level object to "meta" in order to comply with js-controller
|
|
|
536
557
|
|
|
537
558
|
The MIT License (MIT)
|
|
538
559
|
|
|
539
|
-
Copyright (c) 2014-
|
|
560
|
+
Copyright (c) 2014-2025, bluefox <dogafox@gmail.com>
|
|
540
561
|
|
|
541
562
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
542
563
|
of this software and associated documentation files (the "Software"), to deal
|