dmed-voice-assistant 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@ const VoiceAssistant = _ref => {
25
25
  onNewRecognitionEvent,
26
26
  onRecognitionDataChange,
27
27
  onCloseRecognition,
28
+ onRecognitionStartEvent,
28
29
  onRecognitionStopEvent,
29
30
  onRealTimeRecognitionCommandEvent
30
31
  } = _ref;
@@ -48,6 +49,7 @@ const VoiceAssistant = _ref => {
48
49
  onRecognitionDataChange: onRecognitionDataChange,
49
50
  isOnlyRecognitionMode: isOnlyRecognitionMode,
50
51
  onCloseRecognition: onCloseRecognition,
52
+ onRecognitionStartEvent: onRecognitionStartEvent,
51
53
  onRecognitionStopEvent: onRecognitionStopEvent
52
54
  })]
53
55
  })
@@ -77,6 +77,7 @@ const Recognition = _ref4 => {
77
77
  onRecognitionDataChange,
78
78
  onCloseRecognition,
79
79
  onRealTimeRecognitionCommandEvent,
80
+ onRecognitionStartEvent,
80
81
  onRecognitionStopEvent
81
82
  } = _ref4;
82
83
  const [open, setOpen] = (0, _react.useState)(false);
@@ -155,6 +156,9 @@ const Recognition = _ref4 => {
155
156
  mediaRecorderRef.current = newRecorder;
156
157
  }
157
158
  mediaRecorderRef.current.start();
159
+ if (onRecognitionStartEvent) {
160
+ onRecognitionStartEvent();
161
+ }
158
162
  setResult([]);
159
163
  setRecordTime(0);
160
164
  const id = setInterval(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dmed-voice-assistant",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist"