@dreamtree-org/twreact-ui 1.1.32 → 1.1.33

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SpeechToText.d.ts","sourceRoot":"","sources":["../../../src/components/core/SpeechToText.jsx"],"names":[],"mappings":";AAcA,sFAwOE;kBA/OK,OAAO"}
1
+ {"version":3,"file":"SpeechToText.d.ts","sourceRoot":"","sources":["../../../src/components/core/SpeechToText.jsx"],"names":[],"mappings":";AAcA,sFA2OE;kBAlPK,OAAO"}
package/dist/index.esm.js CHANGED
@@ -16245,6 +16245,7 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
16245
16245
  if (!isMountedRef.current) return;
16246
16246
  setIsListening(true);
16247
16247
  setError(null);
16248
+ console.log("debuggin is oned");
16248
16249
  onStart();
16249
16250
  };
16250
16251
  recognition.onresult = function (event) {
@@ -16257,6 +16258,7 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
16257
16258
  var text = ((_res$ = res[0]) === null || _res$ === void 0 ? void 0 : _res$.transcript) || "";
16258
16259
  if (res.isFinal) {
16259
16260
  finalChunk += text + " ";
16261
+ finalTranscriptRef.current += text + " ";
16260
16262
  } else {
16261
16263
  interim += text;
16262
16264
  }
@@ -16273,11 +16275,14 @@ var SpeechToText = /*#__PURE__*/forwardRef(function (_ref, ref) {
16273
16275
  recognition.onend = function () {
16274
16276
  if (!isMountedRef.current) return;
16275
16277
  setIsListening(false);
16276
- var finalTranscript = buildFinalTranscript();
16277
- if (finalTranscript && finalTranscript !== lastEmittedFinalRef.current) {
16278
- lastEmittedFinalRef.current = finalTranscript;
16279
- onSpeechComplete(finalTranscript);
16280
- }
16278
+ buildFinalTranscript();
16279
+ // if (
16280
+ // finalTranscript &&
16281
+ // finalTranscript !== lastEmittedFinalRef.current
16282
+ // ) {
16283
+ // lastEmittedFinalRef.current = finalTranscript;
16284
+ // onSpeechComplete(finalTranscript);
16285
+ // }
16281
16286
  onStop();
16282
16287
  };
16283
16288
  recognitionRef.current = recognition;
package/dist/index.js CHANGED
@@ -16265,6 +16265,7 @@ var SpeechToText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16265
16265
  if (!isMountedRef.current) return;
16266
16266
  setIsListening(true);
16267
16267
  setError(null);
16268
+ console.log("debuggin is oned");
16268
16269
  onStart();
16269
16270
  };
16270
16271
  recognition.onresult = function (event) {
@@ -16277,6 +16278,7 @@ var SpeechToText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16277
16278
  var text = ((_res$ = res[0]) === null || _res$ === void 0 ? void 0 : _res$.transcript) || "";
16278
16279
  if (res.isFinal) {
16279
16280
  finalChunk += text + " ";
16281
+ finalTranscriptRef.current += text + " ";
16280
16282
  } else {
16281
16283
  interim += text;
16282
16284
  }
@@ -16293,11 +16295,14 @@ var SpeechToText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16293
16295
  recognition.onend = function () {
16294
16296
  if (!isMountedRef.current) return;
16295
16297
  setIsListening(false);
16296
- var finalTranscript = buildFinalTranscript();
16297
- if (finalTranscript && finalTranscript !== lastEmittedFinalRef.current) {
16298
- lastEmittedFinalRef.current = finalTranscript;
16299
- onSpeechComplete(finalTranscript);
16300
- }
16298
+ buildFinalTranscript();
16299
+ // if (
16300
+ // finalTranscript &&
16301
+ // finalTranscript !== lastEmittedFinalRef.current
16302
+ // ) {
16303
+ // lastEmittedFinalRef.current = finalTranscript;
16304
+ // onSpeechComplete(finalTranscript);
16305
+ // }
16301
16306
  onStop();
16302
16307
  };
16303
16308
  recognitionRef.current = recognition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamtree-org/twreact-ui",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "A comprehensive React + Tailwind components library for building modern web apps",
5
5
  "author": {
6
6
  "name": "Partha Preetham Krishna",