Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init() chan WebSocketMessage
Init initializes the MQTT client with basic connection
func InitTranscriptionSubscription ¶
func InitTranscriptionSubscription() error
InitTranscriptionSubscription sets up subscription for satellite/transcription topic
func SubscribeToTopic ¶
func SubscribeToTopic(topic string, handler MessageHandler) error
SubscribeToTopic subscribes to a topic with a custom handler
Types ¶
type MessageHandler ¶
MessageHandler represents a generic handler for MQTT messages
type TranscriptionMessage ¶
type TranscriptionMessage struct {
UniqueID string `json:"uniqueid"`
Transcription string `json:"transcription"`
Timestamp float64 `json:"timestamp"`
SpeakerName string `json:"speaker_name"`
SpeakerNumber string `json:"speaker_number"`
SpeakerCounterpartName string `json:"speaker_counterpart_name"`
SpeakerCounterpartNumber string `json:"speaker_counterpart_number"`
IsFinal bool `json:"is_final"`
}
TranscriptionMessage represents the JSON payload from satellite/transcription topic
type WebSocketMessage ¶
type WebSocketMessage struct {
Type string `json:"type"`
Data interface{} `json:"data"`
}
WebSocketMessage represents the generic message sent to WebSocket clients
Click to show internal directories.
Click to hide internal directories.