Documentation ¶
Index ¶
- Constants
- Variables
- type ClientNotifyType
- type Proxy
- func (p *Proxy) GetNotifyPort() int
- func (p *Proxy) GetProxyPort() int
- func (p *Proxy) GetRedirectAddress() string
- func (p *Proxy) Init() error
- func (p *Proxy) IsConnected() bool
- func (p *Proxy) ProcessMessage(byData []byte) error
- func (p *Proxy) SendMessages(m *interfaces.UserDefinedMessages) error
- func (p *Proxy) SendRecognition(r *interfaces.UserDefinedRecognition) error
- func (p *Proxy) Start() error
- func (p *Proxy) Stop() error
- type ProxyOptions
Constants ¶
View Source
const ( DefaultSymblWebSocket string = "wss://api.symbl.ai" MessageTypeMessage string = "message" MessageTypeInitConversation string = "conversation_created" MessageTypeTeardownConversation string = "conversation_completed" )
Variables ¶
View Source
var ( // ErrInvalidInput required input was not found ErrInvalidInput = errors.New("required input was not found") // ErrInvalidNotifyConfig invalid notify configuration ErrInvalidNotifyConfig = errors.New("invalid notify configuration") // ErrUnknownNotifyType unknown notify message type ErrUnknownNotifyType = errors.New("unknown notify message type") )
Functions ¶
This section is empty.
Types ¶
type ClientNotifyType ¶
type ClientNotifyType int
const ( ClientNotifyTypeWebSocket ClientNotifyType = iota ClientNotifyTypeServerSendEvent )
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func New ¶
func New(options ProxyOptions) *Proxy
func (*Proxy) GetNotifyPort ¶
func (*Proxy) GetProxyPort ¶
func (*Proxy) GetRedirectAddress ¶
func (*Proxy) IsConnected ¶
func (*Proxy) ProcessMessage ¶
func (*Proxy) SendMessages ¶
func (p *Proxy) SendMessages(m *interfaces.UserDefinedMessages) error
This sends a completely transcribed sentence or collection of sentences back to the client usually for display in the UI. A typical use case is displaying completed sentences in a chat window/widget/box/etc
func (*Proxy) SendRecognition ¶
func (p *Proxy) SendRecognition(r *interfaces.UserDefinedRecognition) error
This provides the live voice-to-text word-for-word transcription usually for display in the UI. A typical use case is displaying closed captioning in a video conference window/widget/box/etc
type ProxyOptions ¶
type ProxyOptions struct { // housekeeping ConversationId string RabbitURI string ProxyBindAddress string NotifyBindAddress string RedirectAddress string ProxyPort int NotifyPort int NotifyType ClientNotifyType // functionality TranscriptionEnabled bool MessagingEnabled bool // SSL Serve CrtFile string KeyFile string // objects Neo4jMgr *neo4j.SessionWithContext ProxyMgr *wsinterfaces.ManageCallback }
Click to show internal directories.
Click to hide internal directories.