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.
@@ -20117,11 +20117,8 @@ const wakeUpState = () => {
20117
20117
  return bool;
20118
20118
  };
20119
20119
  const getMatch = opt => {
20120
- const {
20121
- voice_text_str
20122
- } = opt?.result ?? {
20123
- voice_text_str: ''
20124
- };
20120
+ // const { voice_text_str } = opt?.result ?? { voice_text_str: '' }
20121
+ let voice_text_str = opt?.result?.voice_text_str;
20125
20122
  const sentence = voice_text_str.replace(/[\s+.!/_,$%^*()/[\]:/"/'?【】+——!,。?、~@#¥%……&*():;《){}《》“”()»〔〕-]+/g, '');
20126
20123
  const match = sentence.match(/[\u4e00-\u9fff]+/g) ?? [];
20127
20124
  return match;