Free components for building your own support agent — bring any backend.Want the agent too? Inflection resolves support requests inside your app.

Hook

useInflectionVoice

Voice state and controls: hold-to-talk, live transcript, and starting or stopping the realtime voice channel.

Install

npm i @inflection/sdk-react   #  or: bun add @inflection/sdk-react

A package, not a copy: this is protocol logic, so fixes reach you without re-copying files.

Usage

import { useInflectionVoice } from "@inflection/sdk-react"

function HoldToTalk() {
  const { listening, transcript, listen, stopListening } = useInflectionVoice()

  return (
    <button
      onPointerDown={listen}
      onPointerUp={stopListening}
      aria-label={listening ? "Listening" : "Hold to talk"}
    >
      {listening ? transcript || "Listening…" : "Hold to talk"}
    </button>
  )
}

Returns

NameTypeDescription
voiceOnbooleanThe realtime voice channel is up.
listeningbooleanThe mic is open.
transcriptstringWhat has been heard so far.
listen() => Promise<void>Open the mic.
stopListening() => Promise<void>Close it and submit the turn.
startVoice() => voidBring the voice channel up.
stopVoice() => voidTake it down.