yxspeechrecognition 1.0.3 → 1.0.4
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.
|
@@ -20135,11 +20135,8 @@ const wakeUpState = () => {
|
|
|
20135
20135
|
return bool;
|
|
20136
20136
|
};
|
|
20137
20137
|
const getMatch = opt => {
|
|
20138
|
-
const {
|
|
20139
|
-
|
|
20140
|
-
} = opt?.result ?? {
|
|
20141
|
-
voice_text_str: ''
|
|
20142
|
-
};
|
|
20138
|
+
// const { voice_text_str } = opt?.result ?? { voice_text_str: '' }
|
|
20139
|
+
let voice_text_str = opt?.result?.voice_text_str;
|
|
20143
20140
|
const sentence = voice_text_str.replace(/[\s+.!/_,$%^*()/[\]:/"/'?【】+——!,。?、~@#¥%……&*():;《){}《》“”()»〔〕-]+/g, '');
|
|
20144
20141
|
const match = sentence.match(/[\u4e00-\u9fff]+/g) ?? [];
|
|
20145
20142
|
return match;
|