Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Type string `json:"type"`
Payload interface{} `json:"payload,omitempty"`
APIVersion string `json:"api_version,omitempty"`
RequestID string `json:"request_id,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Error string `json:"error,omitempty"`
}
Protocol structure for bidirectional client communication
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
Enables real-time speech-to-text API for external clients
func NewWebSocketServer ¶
func NewWebSocketServer(config *config.Config, recorder interfaces.AudioRecorder, whisperEngine *whisper.WhisperEngine, logger logger.Logger) *WebSocketServer
Initialize server with security and resource constraints
func (*WebSocketServer) BroadcastMessage ¶
func (s *WebSocketServer) BroadcastMessage(messageType string, payload interface{})
Notify all active clients of server-wide events
func (*WebSocketServer) Start ¶
func (s *WebSocketServer) Start() error
Begin accepting client connections with health monitoring
func (*WebSocketServer) Stop ¶
func (s *WebSocketServer) Stop()
Ensure clean client disconnection before termination
Click to show internal directories.
Click to hide internal directories.