Skip to content

Commit

Permalink
Support push to talk for next-web.
Browse files Browse the repository at this point in the history
  • Loading branch information
hksfang committed Sep 19, 2023
1 parent fd1186a commit 6ee17f0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function InputField() {
const [isTalking, setIsTalking] = useState(false);
const {sendOverSocket, appendUserChat} = useAppStore();
const {stopAudioPlayback} = useAppStore();
const {startRecording, stopRecording} = useAppStore();

function handleOnEnter(text) {
if (text) {
Expand All @@ -27,12 +28,12 @@ export default function InputField() {

function startTalk() {
setIsTalking(true);
// todo
startRecording();
}

function stopTalk() {
setIsTalking(false);
// todo
stopRecording();
}

return (
Expand Down

0 comments on commit 6ee17f0

Please sign in to comment.