interfaces

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfidenceThreshold float64 = 0.5

	DefaultSampleRateHertzLinear16 int = 16000
	DefaultSampleRateHertzMulaw    int = 8000
)

streaming API constants

Variables

This section is empty.

Functions

func WithCustomHeaders

func WithCustomHeaders(ctx context.Context, headers http.Header) context.Context

WithCustomHeaders appends a header to the given context

func WithCustomParameters

func WithCustomParameters(ctx context.Context, params map[string][]string) context.Context

WithCustomParameters

func WithSigner

func WithSigner(ctx context.Context, s Signer) context.Context

WithSigner appends a signer to the given context

Types

type AuthResp

type AuthResp struct {
	AccessToken string `json:"accessToken"`
	NebulaToken string `json:"newbulaToken"`
	ExpiresIn   int    `json:"expiresIn"`
}

AuthResp represents a Symbl platform bearer access token with expiry information.

type Config

type Config struct {
	ConfidenceThreshold float64           `json:"confidenceThreshold,omitempty"`
	DetectEntities      bool              `json:"detectEntities,omitempty"`
	LanguageCode        string            `json:"languageCode,omitempty"`
	MeetingTitle        string            `json:"meetingTitle,omitempty"`
	Sentiment           bool              `json:"sentiment,omitempty"`
	SpeechRecognition   SpeechRecognition `json:"speechRecognition,omitempty"`
	Trackers            Trackers          `json:"trackers,omitempty"`
}

Config captures the general options available for a given conversation

type Credentials

type Credentials struct {
	AuthURI   string
	Type      string `json:"type"`
	AppId     string `json:"appId" validate:"required"`
	AppSecret string `json:"appSecret" validate:"required"`
}
Symbl REST API

Credentials is the input needed to login to the Symbl.ai platform

type HeadersContext

type HeadersContext struct{}

HeadersContext blackbox of data

type ParametersContext

type ParametersContext struct{}

ParametersContext blackbox of data

type RawResponse

type RawResponse struct {
	bytes.Buffer
}

RawResponse may be used with the Do method as the resBody argument in order to capture the raw response data.

type Signer

type Signer interface {
	SignRequest(*http.Request) error
}
custom headers and configuration options

Signer callback for the certificant signer

type SignerContext

type SignerContext struct{}

SignerContext blackbox of data

type Speaker

type Speaker struct {
	UserID string `json:"userId,omitempty"`
	Name   string `json:"name,omitempty"`
}

Speaker identifies a participant in a conversation

type SpeechRecognition

type SpeechRecognition struct {
	Encoding        string `json:"encoding,omitempty"`
	SampleRateHertz int    `json:"sampleRateHertz,omitempty"`
}

SpeechRecognition provides stream configuration options for real-time conversations

type StatusError

type StatusError struct {
	Resp *http.Response
}

StatusError captures a REST error in the library

func (*StatusError) Error

func (e *StatusError) Error() string

Error string representation for a given error

type StreamingConfig

type StreamingConfig struct {
	Type                           string    `json:"type,omitempty"`
	Config                         Config    `json:"config,omitempty"`
	CustomVocabulary               []string  `json:"customVocabulary,omitempty"`
	DisconnectOnStopRequest        bool      `json:"disconnectOnStopRequest,omitempty"`
	DisconnectOnStopRequestTimeout int       `json:"disconnectOnStopRequestTimeout,omitempty"`
	EnableAllTrackers              bool      `json:"enableAllTrackers,omitempty"`
	InsightTypes                   []string  `json:"insightTypes,omitempty"`
	NoConnectionTimeout            bool      `json:"noConnectionTimeout,omitempty"`
	Speaker                        Speaker   `json:"speaker,omitempty"`
	Trackers                       []Tracker `json:"trackers,omitempty"`
}

StreamingConfig captures the options for a real-time conversation

type Tracker

type Tracker struct {
	Name       string   `json:"name,omitempty"`
	Vocabulary []string `json:"vocabulary,omitempty"`
}

Tracker captures a dynamic tracker definition

type Trackers

type Trackers struct {
	EnableAllTrackers bool `json:"enableAllTrackers,omitempty"`
	InterimResults    bool `json:"interimResults,omitempty"`
}

Trackers provides options for the Tracker functionality

Jump to

Keyboard shortcuts

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