webui

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package webui serves the minimal browser voice-mode interface.

Index

Constants

View Source
const (
	// VoiceModePath is the browser voice-mode page route.
	VoiceModePath = "/voice-mode"
	// KeepalivePath is the lightweight browser keepalive route.
	KeepalivePath = "/keepalive"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the dedicated browser web UI HTTP server.

func Start

func Start(
	ctx context.Context,
	logger *slog.Logger,
	workspace, listenAddr, certFile, keyFile string,
	transcriber transcriber,
	tts synthesizer,
	publisher *voice.TranscriptionPublisher,
) (*Server, error)

Start launches the browser-facing web UI listener.

func StartIn

func StartIn(
	ctx context.Context,
	logger *slog.Logger,
	workspace, workDir, listenAddr, certFile, keyFile string,
	transcriber transcriber,
	tts synthesizer,
	publisher *voice.TranscriptionPublisher,
) (*Server, error)

StartIn launches the browser-facing web UI listener using workDir for fallback TLS assets.

func (*Server) Close

func (s *Server) Close(ctx context.Context) error

Close stops the HTTP server and waits for it to exit.

func (*Server) Name

func (s *Server) Name() string

Name returns the server identifier used in logs.

func (*Server) SendResponse

func (s *Server) SendResponse(ctx context.Context, msg *events.OutboundMessage) error

SendResponse synthesizes and queues browser playback for a web voice session.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stops the HTTP server and waits for it to exit.

func (*Server) URL

func (s *Server) URL() string

URL returns the voice-mode page URL.

func (*Server) URLs

func (s *Server) URLs() []string

URLs returns numeric IPv4 voice-mode page URLs served by this listener.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL