@contentgrowth/llm-service 1.0.0 → 1.0.1
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.
|
@@ -696,6 +696,7 @@ var TapToTalk = ({
|
|
|
696
696
|
setVoiceTrigger(null);
|
|
697
697
|
}, []);
|
|
698
698
|
const customRecorder = useAudioRecorder(async (blob) => {
|
|
699
|
+
var _a2;
|
|
699
700
|
setVoiceTrigger(null);
|
|
700
701
|
setIsTranscribing(true);
|
|
701
702
|
setErrorMsg(null);
|
|
@@ -719,11 +720,13 @@ var TapToTalk = ({
|
|
|
719
720
|
} else {
|
|
720
721
|
setIsTranscribing(false);
|
|
721
722
|
}
|
|
723
|
+
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceEnd) == null ? void 0 : _a2.call(voiceConfig);
|
|
722
724
|
});
|
|
723
725
|
const isListening = !!voiceTrigger || customRecorder.isRecording;
|
|
724
726
|
const isActive = isListening || isTranscribing;
|
|
725
727
|
const processingRef = useRef3(false);
|
|
726
728
|
const toggleVoice = async () => {
|
|
729
|
+
var _a2, _b, _c;
|
|
727
730
|
if (processingRef.current) {
|
|
728
731
|
console.log("[TapToTalk] toggleVoice ignored - processing");
|
|
729
732
|
return;
|
|
@@ -756,17 +759,20 @@ var TapToTalk = ({
|
|
|
756
759
|
console.log("[TapToTalk] Stopping voice...");
|
|
757
760
|
customRecorder.stop();
|
|
758
761
|
setVoiceTrigger(null);
|
|
762
|
+
(_a2 = voiceConfig == null ? void 0 : voiceConfig.onVoiceEnd) == null ? void 0 : _a2.call(voiceConfig);
|
|
759
763
|
} else {
|
|
760
764
|
console.log("[TapToTalk] Starting voice...");
|
|
761
765
|
setErrorMsg(null);
|
|
762
766
|
onFocusTarget == null ? void 0 : onFocusTarget();
|
|
763
767
|
setVoiceTrigger("click");
|
|
768
|
+
(_b = voiceConfig == null ? void 0 : voiceConfig.onVoiceStart) == null ? void 0 : _b.call(voiceConfig);
|
|
764
769
|
try {
|
|
765
770
|
await customRecorder.start();
|
|
766
771
|
} catch (e) {
|
|
767
772
|
console.error("[TapToTalk] Custom recorder failed:", e);
|
|
768
773
|
setErrorMsg("Mic access denied");
|
|
769
774
|
setVoiceTrigger(null);
|
|
775
|
+
(_c = voiceConfig == null ? void 0 : voiceConfig.onVoiceEnd) == null ? void 0 : _c.call(voiceConfig);
|
|
770
776
|
}
|
|
771
777
|
}
|
|
772
778
|
} finally {
|