@ssml-builder-js/ssml-editor-elements 2.7.0 → 2.8.1
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/CHANGELOG.md +15 -0
- package/dist/index.js +162 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/tsconfig.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @ssml-builder-js/ssml-editor-elements
|
|
2
2
|
|
|
3
|
+
## 2.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ba09a72: Prepare the v2.8.1 patch release.
|
|
8
|
+
- Updated dependencies [ba09a72]
|
|
9
|
+
- @ssml-builder-js/ssml-core@2.8.1
|
|
10
|
+
|
|
11
|
+
## 2.8.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [c7c8cb4]
|
|
16
|
+
- @ssml-builder-js/ssml-core@2.8.0
|
|
17
|
+
|
|
3
18
|
## 2.7.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -100,6 +100,7 @@ var INTRINSICALLY_EMPTY_ELEMENTS = /* @__PURE__ */ new Set([
|
|
|
100
100
|
"lexicon",
|
|
101
101
|
"mark",
|
|
102
102
|
"mstts:silence",
|
|
103
|
+
"mstts:audioduration",
|
|
103
104
|
"mstts:viseme",
|
|
104
105
|
"silence",
|
|
105
106
|
"viseme"
|
|
@@ -758,6 +759,8 @@ function updateEditableText(document2, value) {
|
|
|
758
759
|
// ../ssml-editor-react/src/constants/ssmlPresets.ts
|
|
759
760
|
var ssmlPresets_exports = {};
|
|
760
761
|
__export(ssmlPresets_exports, {
|
|
762
|
+
AUDIO_DURATION_DESCRIPTIONS: () => AUDIO_DURATION_DESCRIPTIONS,
|
|
763
|
+
AUDIO_DURATION_PRESETS: () => AUDIO_DURATION_PRESETS,
|
|
761
764
|
BREAK_STRENGTH_PRESETS: () => BREAK_STRENGTH_PRESETS,
|
|
762
765
|
BREAK_TIME_DESCRIPTIONS: () => BREAK_TIME_DESCRIPTIONS,
|
|
763
766
|
BREAK_TIME_PRESETS: () => BREAK_TIME_PRESETS,
|
|
@@ -790,6 +793,103 @@ __export(ssmlPresets_exports, {
|
|
|
790
793
|
getExpressAsStyleCategory: () => getExpressAsStyleCategory,
|
|
791
794
|
resolveExpressAsStyles: () => resolveExpressAsStyles
|
|
792
795
|
});
|
|
796
|
+
|
|
797
|
+
// ../ssml-editor-react/src/constants/azureVoiceStyleMap.generated.ts
|
|
798
|
+
var AZURE_VOICE_STYLE_MAP = {
|
|
799
|
+
"de-DE-ConradNeural": ["cheerful", "sad"],
|
|
800
|
+
"de-DE-KatjaNeural": ["cheerful", "sad"],
|
|
801
|
+
"en-US-AndrewNeural": ["empathetic", "relieved"],
|
|
802
|
+
"en-US-GuyNeural": [
|
|
803
|
+
"angry",
|
|
804
|
+
"cheerful",
|
|
805
|
+
"excited",
|
|
806
|
+
"friendly",
|
|
807
|
+
"hopeful",
|
|
808
|
+
"newscast",
|
|
809
|
+
"sad",
|
|
810
|
+
"shouting",
|
|
811
|
+
"terrified",
|
|
812
|
+
"unfriendly",
|
|
813
|
+
"whispering"
|
|
814
|
+
],
|
|
815
|
+
"en-US-JennyMultilingualNeural": [
|
|
816
|
+
"cheerful",
|
|
817
|
+
"empathetic",
|
|
818
|
+
"excited",
|
|
819
|
+
"friendly",
|
|
820
|
+
"hopeful",
|
|
821
|
+
"sad",
|
|
822
|
+
"shouting",
|
|
823
|
+
"terrified",
|
|
824
|
+
"unfriendly",
|
|
825
|
+
"whispering"
|
|
826
|
+
],
|
|
827
|
+
"en-US-JennyNeural": [
|
|
828
|
+
"assistant",
|
|
829
|
+
"chat",
|
|
830
|
+
"customerservice",
|
|
831
|
+
"newscast",
|
|
832
|
+
"cheerful",
|
|
833
|
+
"empathetic",
|
|
834
|
+
"excited",
|
|
835
|
+
"friendly",
|
|
836
|
+
"hopeful",
|
|
837
|
+
"sad",
|
|
838
|
+
"shouting",
|
|
839
|
+
"terrified",
|
|
840
|
+
"unfriendly",
|
|
841
|
+
"whispering"
|
|
842
|
+
],
|
|
843
|
+
"es-ES-ElviraNeural": [],
|
|
844
|
+
"fil-PH-AngeloNeural": [],
|
|
845
|
+
"fr-FR-DeniseNeural": ["cheerful", "sad"],
|
|
846
|
+
"fr-FR-HenriNeural": ["cheerful", "sad"],
|
|
847
|
+
"id-ID-GadisNeural": [],
|
|
848
|
+
"it-IT-ElsaNeural": ["cheerful", "sad"],
|
|
849
|
+
"ja-JP-KeitaNeural": ["chat"],
|
|
850
|
+
"ja-JP-MayuNeural": ["calm", "cheerful", "sad"],
|
|
851
|
+
"ja-JP-NanamiNeural": ["chat", "customerservice", "cheerful", "whispering", "sad"],
|
|
852
|
+
"ko-KR-SunHiNeural": ["cheerful", "sad"],
|
|
853
|
+
"ms-MY-YasminNeural": [],
|
|
854
|
+
"pt-BR-FranciscaNeural": ["calm"],
|
|
855
|
+
"ru-RU-SvetlanaNeural": ["cheerful", "sad", "angry", "disgruntled", "embarrassed", "fearful"],
|
|
856
|
+
"th-TH-PremwadeeNeural": [],
|
|
857
|
+
"vi-VN-HoaiMyNeural": [],
|
|
858
|
+
"zh-CN-XiaoxiaoNeural": [
|
|
859
|
+
"assistant",
|
|
860
|
+
"chat",
|
|
861
|
+
"customerservice",
|
|
862
|
+
"newscast",
|
|
863
|
+
"cheerful",
|
|
864
|
+
"empathetic",
|
|
865
|
+
"excited",
|
|
866
|
+
"friendly",
|
|
867
|
+
"hopeful",
|
|
868
|
+
"sad",
|
|
869
|
+
"terrified",
|
|
870
|
+
"whispering",
|
|
871
|
+
"poetry-reading",
|
|
872
|
+
"sports_commentary",
|
|
873
|
+
"sports_commentary_excited",
|
|
874
|
+
"story"
|
|
875
|
+
],
|
|
876
|
+
"zh-CN-YunxiNeural": [
|
|
877
|
+
"narration-relaxed",
|
|
878
|
+
"embarrassed",
|
|
879
|
+
"fearful",
|
|
880
|
+
"sad",
|
|
881
|
+
"disgruntled",
|
|
882
|
+
"serious",
|
|
883
|
+
"angry",
|
|
884
|
+
"depressed",
|
|
885
|
+
"chat",
|
|
886
|
+
"cheerful",
|
|
887
|
+
"assistant"
|
|
888
|
+
],
|
|
889
|
+
"zh-TW-HsiaoChenNeural": []
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
// ../ssml-editor-react/src/constants/ssmlPresets.ts
|
|
793
893
|
var SSML_PRESETS = [
|
|
794
894
|
{
|
|
795
895
|
id: "basic",
|
|
@@ -889,7 +989,7 @@ function getExpressAsStyleCategory(style) {
|
|
|
889
989
|
}
|
|
890
990
|
return "other";
|
|
891
991
|
}
|
|
892
|
-
var
|
|
992
|
+
var LEGACY_VOICE_STYLE_MAP = {
|
|
893
993
|
"ja-JP-MayuNeural": ["calm", "cheerful", "sad"],
|
|
894
994
|
"ja-JP-KeitaNeural": ["chat"],
|
|
895
995
|
"ja-JP-NanamiNeural": ["chat", "customerservice", "cheerful", "whispering", "sad"],
|
|
@@ -975,6 +1075,7 @@ var VOICE_STYLE_MAP = {
|
|
|
975
1075
|
"de-DE-ConradNeural": ["cheerful", "sad"],
|
|
976
1076
|
"ru-RU-SvetlanaNeural": ["cheerful", "sad", "angry", "disgruntled", "embarrassed", "fearful"]
|
|
977
1077
|
};
|
|
1078
|
+
var VOICE_STYLE_MAP = Object.keys(AZURE_VOICE_STYLE_MAP).length > 0 ? AZURE_VOICE_STYLE_MAP : LEGACY_VOICE_STYLE_MAP;
|
|
978
1079
|
var VOICE_STYLE_MAP_BY_NORMALIZED_NAME = new Map(
|
|
979
1080
|
Object.entries(VOICE_STYLE_MAP).map(([voiceName, styles]) => [voiceName.toLowerCase(), styles])
|
|
980
1081
|
);
|
|
@@ -1017,6 +1118,7 @@ var SAY_AS_PRESETS = [
|
|
|
1017
1118
|
];
|
|
1018
1119
|
var LANGUAGE_PRESETS = ["ja-JP", "en-US", "de-DE", "fr-FR"];
|
|
1019
1120
|
var SILENCE_VALUE_PRESETS = ["300ms", "500ms", "1s"];
|
|
1121
|
+
var AUDIO_DURATION_PRESETS = ["5s", "10s", "30s"];
|
|
1020
1122
|
var SILENCE_TYPE_PRESETS = [
|
|
1021
1123
|
"Leading",
|
|
1022
1124
|
"Tailing",
|
|
@@ -1025,6 +1127,11 @@ var SILENCE_TYPE_PRESETS = [
|
|
|
1025
1127
|
"Semicolon",
|
|
1026
1128
|
"Enumerationcomma"
|
|
1027
1129
|
];
|
|
1130
|
+
var AUDIO_DURATION_DESCRIPTIONS = {
|
|
1131
|
+
"5s": { ja: "5\u79D2", en: "5 seconds" },
|
|
1132
|
+
"10s": { ja: "10\u79D2", en: "10 seconds" },
|
|
1133
|
+
"30s": { ja: "30\u79D2", en: "30 seconds" }
|
|
1134
|
+
};
|
|
1028
1135
|
var PHONEME_ALPHABET_PRESETS = ["ipa", "sapi", "ups", "x-sampa"];
|
|
1029
1136
|
var VISEME_TYPE_PRESETS = ["redlips_front", "FacialExpression"];
|
|
1030
1137
|
var SSML_ATTRIBUTE_PRESETS = {
|
|
@@ -1068,6 +1175,9 @@ var SSML_ATTRIBUTE_PRESETS = {
|
|
|
1068
1175
|
type: SILENCE_TYPE_PRESETS,
|
|
1069
1176
|
value: SILENCE_VALUE_PRESETS
|
|
1070
1177
|
},
|
|
1178
|
+
"mstts:audioduration": {
|
|
1179
|
+
value: AUDIO_DURATION_PRESETS
|
|
1180
|
+
},
|
|
1071
1181
|
silence: {
|
|
1072
1182
|
type: SILENCE_TYPE_PRESETS,
|
|
1073
1183
|
value: SILENCE_VALUE_PRESETS
|
|
@@ -1555,6 +1665,10 @@ var SSML_COMPLETION_SNIPPETS = [
|
|
|
1555
1665
|
label: "mstts:express-as",
|
|
1556
1666
|
insertText: `<mstts:express-as style="cheerful">\${1:text}</mstts:express-as>`
|
|
1557
1667
|
},
|
|
1668
|
+
{
|
|
1669
|
+
label: "mstts:audioduration",
|
|
1670
|
+
insertText: '<mstts:audioduration value="10s" />'
|
|
1671
|
+
},
|
|
1558
1672
|
{
|
|
1559
1673
|
label: "sub",
|
|
1560
1674
|
insertText: `<sub alias="\${1:\u8AAD\u307F}">\${2:\u6F22\u5B57}</sub>`
|
|
@@ -1822,6 +1936,13 @@ var SSML_HOVER_COPY = {
|
|
|
1822
1936
|
parameters: {
|
|
1823
1937
|
type: { title: "type", description: "\u30D3\u30BC\u30FC\u30E0\u30A4\u30D9\u30F3\u30C8\u306E\u5F62\u5F0F\u3002" }
|
|
1824
1938
|
}
|
|
1939
|
+
},
|
|
1940
|
+
"mstts:audioduration": {
|
|
1941
|
+
title: "\u97F3\u58F0\u9577",
|
|
1942
|
+
description: "\u5408\u6210\u97F3\u58F0\u306E\u76EE\u6A19\u6642\u9593\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002",
|
|
1943
|
+
parameters: {
|
|
1944
|
+
value: { title: "value", description: "\u76EE\u6A19\u6642\u9593\u3002\u4F8B: `10s`\u3001`5000ms`\u3001`00:00:10`\u3002" }
|
|
1945
|
+
}
|
|
1825
1946
|
}
|
|
1826
1947
|
}
|
|
1827
1948
|
},
|
|
@@ -1979,6 +2100,13 @@ var SSML_HOVER_COPY = {
|
|
|
1979
2100
|
parameters: {
|
|
1980
2101
|
type: { title: "type", description: "The viseme event format." }
|
|
1981
2102
|
}
|
|
2103
|
+
},
|
|
2104
|
+
"mstts:audioduration": {
|
|
2105
|
+
title: "Audio duration",
|
|
2106
|
+
description: "Sets the target duration of synthesized audio.",
|
|
2107
|
+
parameters: {
|
|
2108
|
+
value: { title: "value", description: "The target duration, such as `10s`, `5000ms`, or `00:00:10`." }
|
|
2109
|
+
}
|
|
1982
2110
|
}
|
|
1983
2111
|
}
|
|
1984
2112
|
}
|
|
@@ -2275,6 +2403,17 @@ var SSML_TAG_DEFINITIONS = [
|
|
|
2275
2403
|
values: VISEME_TYPE_PRESETS2
|
|
2276
2404
|
}
|
|
2277
2405
|
]
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
name: "mstts:audioduration",
|
|
2409
|
+
description: "Sets the target duration of synthesized audio.",
|
|
2410
|
+
parameters: [
|
|
2411
|
+
{
|
|
2412
|
+
name: "value",
|
|
2413
|
+
description: "The target duration, such as `10s`, `5000ms`, or `00:00:10`.",
|
|
2414
|
+
example: "10s"
|
|
2415
|
+
}
|
|
2416
|
+
]
|
|
2278
2417
|
}
|
|
2279
2418
|
];
|
|
2280
2419
|
var definitionsByName = /* @__PURE__ */ new Map();
|
|
@@ -2816,13 +2955,34 @@ var SSML_INSERTIONS = [
|
|
|
2816
2955
|
suffix: "",
|
|
2817
2956
|
mode: "insert"
|
|
2818
2957
|
})
|
|
2958
|
+
},
|
|
2959
|
+
{
|
|
2960
|
+
id: "mstts:audioduration",
|
|
2961
|
+
icon: "\u25F7",
|
|
2962
|
+
tagName: "mstts:audioduration",
|
|
2963
|
+
selfClosing: true,
|
|
2964
|
+
labels: { ja: "\u97F3\u58F0\u9577", en: "Audio duration" },
|
|
2965
|
+
descriptions: {
|
|
2966
|
+
ja: "\u5408\u6210\u97F3\u58F0\u306E\u76EE\u6A19\u6642\u9593\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002",
|
|
2967
|
+
en: "Sets the target duration of synthesized audio."
|
|
2968
|
+
},
|
|
2969
|
+
parameterDescription: {
|
|
2970
|
+
ja: "\u76EE\u6A19\u6642\u9593\u3092\u9078\u629E\u3057\u307E\u3059\u3002",
|
|
2971
|
+
en: "Selects the target duration."
|
|
2972
|
+
},
|
|
2973
|
+
options: createInsertionOptions(AUDIO_DURATION_PRESETS, AUDIO_DURATION_DESCRIPTIONS),
|
|
2974
|
+
createTemplate: (value) => ({
|
|
2975
|
+
prefix: `<mstts:audioduration value="${value}"/>`,
|
|
2976
|
+
suffix: "",
|
|
2977
|
+
mode: "insert"
|
|
2978
|
+
})
|
|
2819
2979
|
}
|
|
2820
2980
|
];
|
|
2821
2981
|
var DEFAULT_INSERTION_GROUPS = [
|
|
2822
2982
|
{
|
|
2823
2983
|
id: "pauses",
|
|
2824
2984
|
labels: { ja: "\u9593\u30FB\u7121\u97F3", en: "Pauses" },
|
|
2825
|
-
insertionIds: ["break", "mstts:silence"]
|
|
2985
|
+
insertionIds: ["break", "mstts:silence", "mstts:audioduration"]
|
|
2826
2986
|
},
|
|
2827
2987
|
{
|
|
2828
2988
|
id: "prosody",
|