Voice testing

This commit is contained in:
2026-01-05 22:34:25 +01:00
parent 07dbac50c8
commit 1af261058f
4 changed files with 106 additions and 10 deletions
+6 -2
View File
@@ -3,7 +3,7 @@
import App from "@/types/app";
import { ClientMessage, IndicatorContext } from "@/types/protocol";
import { Message } from "@/types/types";
import { useEffect } from "react";
import { useEffect, useState } from "react";
import { startMic } from "@/lib/audio";
export default function VoiceBox({
@@ -18,7 +18,11 @@ export default function VoiceBox({
sendVoice: (data: Int16Array) => void;
}) {
useEffect(() => {
startMic(sendVoice);
const stop = startMic(sendVoice);
return () => {
stop.then((s) => s());
};
}, []);
return (