Documentation
¶
Overview ¶
Package ivr navigates automated phone menus (IVR systems). The Processor watches the LLM's streamed response for control tags: <dtmf>N</dtmf> presses keypad keys to make a menu selection, and <ivr>status</ivr> reports navigation progress. The tags are stripped from the spoken output. Drive it with an LLM prompted to emit those tags as it listens to the menu.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// OnStatusChanged is called when the LLM reports an IVR navigation status.
OnStatusChanged func(status Status)
}
Config configures an IVR Processor.
type Processor ¶
Processor navigates an IVR by acting on the control tags in the LLM's output: it emits an OutputDTMFFrame for each key in a <dtmf> tag and reports each <ivr> status through OnStatusChanged, forwarding the remaining text as speech.
type Status ¶
type Status string
Status is the IVR navigation status the LLM reports through an <ivr> tag.
const ( // StatusDetected means an IVR menu was detected and navigation has begun. StatusDetected Status = "detected" // StatusCompleted means navigation reached a human or the target option. StatusCompleted Status = "completed" // StatusStuck means the menu could not be navigated. StatusStuck Status = "stuck" // StatusWait means the system is waiting (e.g. on hold) before acting. StatusWait Status = "wait" )