sera-ai 1.0.5 → 1.0.6
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.
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -46,6 +46,8 @@ interface AudioDictationProps {
|
|
|
46
46
|
specialty?: string;
|
|
47
47
|
selectedFormat?: "json" | "hl7" | "fhir";
|
|
48
48
|
onDictationComplete: (message: string) => void;
|
|
49
|
+
onDictationStart?: () => void;
|
|
50
|
+
onProcessingStart?: () => void;
|
|
49
51
|
className?: string;
|
|
50
52
|
style?: React$1.CSSProperties;
|
|
51
53
|
buttonText?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ interface AudioDictationProps {
|
|
|
46
46
|
specialty?: string;
|
|
47
47
|
selectedFormat?: "json" | "hl7" | "fhir";
|
|
48
48
|
onDictationComplete: (message: string) => void;
|
|
49
|
+
onDictationStart?: () => void;
|
|
50
|
+
onProcessingStart?: () => void;
|
|
49
51
|
className?: string;
|
|
50
52
|
style?: React$1.CSSProperties;
|
|
51
53
|
buttonText?: string;
|
package/dist/index.js
CHANGED
|
@@ -4605,6 +4605,8 @@ var AudioRecorder_default = AudioRecorder;
|
|
|
4605
4605
|
var API_BASE_URL2 = "https://nuxera.cloud";
|
|
4606
4606
|
var useAudioDictation = ({
|
|
4607
4607
|
onDictationComplete,
|
|
4608
|
+
onDictationStart,
|
|
4609
|
+
onProcessingStart,
|
|
4608
4610
|
apiKey,
|
|
4609
4611
|
apiBaseUrl = API_BASE_URL2,
|
|
4610
4612
|
appendMode = true,
|
|
@@ -4702,6 +4704,7 @@ var useAudioDictation = ({
|
|
|
4702
4704
|
audioContextRef.current = audioContext;
|
|
4703
4705
|
processorRef.current = processor;
|
|
4704
4706
|
setIsDictating(true);
|
|
4707
|
+
onDictationStart?.();
|
|
4705
4708
|
console.log("Recording started successfully");
|
|
4706
4709
|
} catch (error) {
|
|
4707
4710
|
console.error("Error starting dictation:", error);
|
|
@@ -4819,6 +4822,7 @@ var useAudioDictation = ({
|
|
|
4819
4822
|
console.log(`Processing dictation with audio data length: ${audioData.length}`);
|
|
4820
4823
|
console.log(`Using format: ${selectedFormat}`);
|
|
4821
4824
|
setIsProcessing(true);
|
|
4825
|
+
onProcessingStart?.();
|
|
4822
4826
|
const wavBlob = encodeWAV(audioData);
|
|
4823
4827
|
console.log(`Sending audio to dictation API (${wavBlob.size / 1024} KB)`);
|
|
4824
4828
|
const requestData = {
|
|
@@ -4982,6 +4986,8 @@ var AudioDictation = ({
|
|
|
4982
4986
|
specialty = "general",
|
|
4983
4987
|
selectedFormat = "json",
|
|
4984
4988
|
onDictationComplete,
|
|
4989
|
+
onDictationStart,
|
|
4990
|
+
onProcessingStart,
|
|
4985
4991
|
className = "",
|
|
4986
4992
|
style,
|
|
4987
4993
|
buttonText,
|
|
@@ -4992,6 +4998,8 @@ var AudioDictation = ({
|
|
|
4992
4998
|
}, []);
|
|
4993
4999
|
const { startDictating, stopDictating, dictationError, isDictating, isProcessing } = useAudioDictation_default({
|
|
4994
5000
|
onDictationComplete,
|
|
5001
|
+
onDictationStart,
|
|
5002
|
+
onProcessingStart,
|
|
4995
5003
|
apiKey,
|
|
4996
5004
|
apiBaseUrl,
|
|
4997
5005
|
appendMode,
|