You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-11Lines changed: 26 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,9 +305,7 @@ Example:
305
305
"voicerss": "Your api key for TTS with voicerss",
306
306
"microsoft": {
307
307
"key": "Your api for Bing speech API",
308
-
"gender": "Female",
309
-
"name": "Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)",
310
-
"language": "en-US"
308
+
"name": "ZiraRUS"
311
309
},
312
310
"port": 5005,
313
311
"securePort": 5006,
@@ -440,25 +438,41 @@ The following configuration is available (the entered values except key are defa
440
438
{
441
439
"microsoft": {
442
440
"key": "Your api for Bing speech API",
443
-
"gender": "Female",
444
-
"name": "Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)",
445
-
"language": "en-US"
441
+
"name": "ZiraRUS"
446
442
}
447
443
}
448
444
```
449
445
450
-
If you change language, you need to change the name matching the gender for that language, according to this list: https://www.microsoft.com/cognitive-services/en-us/speech-api/documentation/API-Reference-REST/BingVoiceOutput#SupLocales. This one doesn't support providing language directly in the request for this reason.
446
+
You change language by specifying a voice name correlating to the desired language.
447
+
Name should be specified according to this list: https://www.microsoft.com/cognitive-services/en-us/speech-api/documentation/API-Reference-REST/BingVoiceOutput#SupLocales
448
+
where name is the right most part of the voice font name (without optional Apollo suffix). Example:
449
+
450
+
`Microsoft Server Speech Text to Speech Voice (ar-EG, Hoda)` name should be specified as `Hoda`
451
+
452
+
`Microsoft Server Speech Text to Speech Voice (de-DE, Stefan, Apollo)` name should be specified as `Stefan`
453
+
454
+
`Microsoft Server Speech Text to Speech Voice (en-US, BenjaminRUS)` name should be specified as `BenjaminRUS`
Copy file name to clipboardExpand all lines: lib/actions/say.js
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,15 @@ let port;
11
11
letsystem;
12
12
13
13
functionsay(player,values){
14
-
consttext=decodeURIComponent(values[0]);
14
+
lettext;
15
+
try{
16
+
text=decodeURIComponent(values[0]);
17
+
}catch(err){
18
+
if(errinstanceofURIError){
19
+
err.message=`The encoded phrase ${values[0]} could not be URI decoded. Make sure your url encoded values (%xx) are within valid ranges. xx should be hexadecimal representations`;
Copy file name to clipboardExpand all lines: lib/actions/sayall.js
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,15 @@ let port;
7
7
letsystem;
8
8
9
9
functionsayAll(player,values){
10
-
consttext=decodeURIComponent(values[0]);
10
+
lettext;
11
+
try{
12
+
text=decodeURIComponent(values[0]);
13
+
}catch(err){
14
+
if(errinstanceofURIError){
15
+
err.message=`The encoded phrase ${values[0]} could not be URI decoded. Make sure your url encoded values (%xx) are within valid ranges. xx should be hexadecimal representations`;
0 commit comments