matt HOFFNER
commited on
Commit
·
eab5884
1
Parent(s):
20635bb
load model when recording
Browse files- app/input.tsx +3 -1
app/input.tsx
CHANGED
|
@@ -81,7 +81,7 @@ const VoiceInputForm: React.FC<VoiceInputFormProps> = ({ handleSubmit, input, se
|
|
| 81 |
};
|
| 82 |
|
| 83 |
processRecording();
|
| 84 |
-
}, [
|
| 85 |
|
| 86 |
const vad = useMicVAD({
|
| 87 |
modelURL: "/_next/static/chunks/silero_vad.onnx",
|
|
@@ -109,6 +109,8 @@ const VoiceInputForm: React.FC<VoiceInputFormProps> = ({ handleSubmit, input, se
|
|
| 109 |
const startRecording = async () => {
|
| 110 |
// Reset recording (if any)
|
| 111 |
setRecordedBlob(null);
|
|
|
|
|
|
|
| 112 |
|
| 113 |
let startTime = Date.now();
|
| 114 |
|
|
|
|
| 81 |
};
|
| 82 |
|
| 83 |
processRecording();
|
| 84 |
+
}, [recordedBlob, startListening]);
|
| 85 |
|
| 86 |
const vad = useMicVAD({
|
| 87 |
modelURL: "/_next/static/chunks/silero_vad.onnx",
|
|
|
|
| 109 |
const startRecording = async () => {
|
| 110 |
// Reset recording (if any)
|
| 111 |
setRecordedBlob(null);
|
| 112 |
+
// @ts-ignore
|
| 113 |
+
transcriber.start();
|
| 114 |
|
| 115 |
let startTime = Date.now();
|
| 116 |
|