@siact/sime-x-vue 0.0.24 → 0.0.25
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/dist/sime-x-vue.mjs +20 -9
- package/dist/sime-x-vue.mjs.map +1 -1
- package/dist/sime-x-vue.umd.js +20 -9
- package/dist/sime-x-vue.umd.js.map +1 -1
- package/dist/style.css +49 -49
- package/package.json +1 -1
package/dist/sime-x-vue.umd.js
CHANGED
|
@@ -1513,11 +1513,7 @@
|
|
|
1513
1513
|
}
|
|
1514
1514
|
};
|
|
1515
1515
|
const test = () => {
|
|
1516
|
-
[
|
|
1517
|
-
"1你好,世界,今天是想起五天气横扫的缺点",
|
|
1518
|
-
"2你好,世界,今天是想起五天气横扫的缺点",
|
|
1519
|
-
"3你好,世界,今天是想起五天气横扫的缺点"
|
|
1520
|
-
].forEach((text, index) => {
|
|
1516
|
+
["0.732~0.8124"].forEach((text, index) => {
|
|
1521
1517
|
setTimeout(() => {
|
|
1522
1518
|
aiChatbotX.speakText(text).call(() => {
|
|
1523
1519
|
console.log("speak end");
|
|
@@ -1689,7 +1685,7 @@
|
|
|
1689
1685
|
}
|
|
1690
1686
|
});
|
|
1691
1687
|
|
|
1692
|
-
const commandTest = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
1688
|
+
const commandTest = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-74573d6c"]]);
|
|
1693
1689
|
|
|
1694
1690
|
class CommandManager {
|
|
1695
1691
|
commands = /* @__PURE__ */ new Map();
|
|
@@ -1826,19 +1822,34 @@
|
|
|
1826
1822
|
}
|
|
1827
1823
|
return -1;
|
|
1828
1824
|
};
|
|
1825
|
+
const DIGIT_TO_CN = {
|
|
1826
|
+
"0": "零",
|
|
1827
|
+
"1": "一",
|
|
1828
|
+
"2": "二",
|
|
1829
|
+
"3": "三",
|
|
1830
|
+
"4": "四",
|
|
1831
|
+
"5": "五",
|
|
1832
|
+
"6": "六",
|
|
1833
|
+
"7": "七",
|
|
1834
|
+
"8": "八",
|
|
1835
|
+
"9": "九"
|
|
1836
|
+
};
|
|
1829
1837
|
const normalizeNumbers = (text) => {
|
|
1830
1838
|
return text.replace(/(-?\d[\d,]*\.?\d*)\s*%/g, (_, num) => {
|
|
1831
1839
|
const cleanNum = num.replace(/,/g, "");
|
|
1832
1840
|
const n = parseFloat(cleanNum);
|
|
1833
|
-
const
|
|
1841
|
+
const [intPart, decPart] = cleanNum.split(".");
|
|
1842
|
+
let spoken = intPart;
|
|
1843
|
+
if (decPart) spoken += "点" + decPart.replace(/\d/g, (d) => DIGIT_TO_CN[d] || d);
|
|
1834
1844
|
if (n < 0) return `负百分之${spoken.replace("-", "")}`;
|
|
1835
1845
|
return `百分之${spoken}`;
|
|
1836
1846
|
}).replace(/(-?\d[\d,]*)\.(\d+)/g, (_, intPart, decPart) => {
|
|
1837
1847
|
const cleanInt = intPart.replace(/,/g, "");
|
|
1848
|
+
const decCn = decPart.replace(/\d/g, (d) => DIGIT_TO_CN[d] || d);
|
|
1838
1849
|
if (cleanInt.startsWith("-")) {
|
|
1839
|
-
return `负${cleanInt.slice(1)}点${
|
|
1850
|
+
return `负${cleanInt.slice(1)}点${decCn}`;
|
|
1840
1851
|
}
|
|
1841
|
-
return `${cleanInt}点${
|
|
1852
|
+
return `${cleanInt}点${decCn}`;
|
|
1842
1853
|
}).replace(/-(\d)/g, "负$1");
|
|
1843
1854
|
};
|
|
1844
1855
|
const stripMarkdown = (text) => {
|