instance

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 (p *Proxy) GetNotifyPort() int

func (*Proxy) GetProxyPort

func (p *Proxy) GetProxyPort() int

func (*Proxy) GetRedirectAddress

func (p *Proxy) GetRedirectAddress() string

func (*Proxy) Init

func (p *Proxy) Init() error

func (*Proxy) IsConnected

func (p *Proxy) IsConnected() bool

func (*Proxy) ProcessMessage

func (p *Proxy) ProcessMessage(byData []byte) error

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

func (*Proxy) Start

func (p *Proxy) Start() error

func (*Proxy) Stop

func (p *Proxy) Stop() error

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
}

Jump to

Keyboard shortcuts

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