diathekepb

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_diatheke_proto protoreflect.FileDescriptor

Functions

func RegisterDiathekeServer

func RegisterDiathekeServer(s *grpc.Server, srv DiathekeServer)

Types

type ASRInput

type ASRInput struct {

	// Types that are assignable to Data:
	//	*ASRInput_Token
	//	*ASRInput_Audio
	Data isASRInput_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

Data to send to the ASR stream. The first message on the stream must be the session token followed by audio data.

func (*ASRInput) Descriptor deprecated

func (*ASRInput) Descriptor() ([]byte, []int)

Deprecated: Use ASRInput.ProtoReflect.Descriptor instead.

func (*ASRInput) GetAudio

func (x *ASRInput) GetAudio() []byte

func (*ASRInput) GetData

func (m *ASRInput) GetData() isASRInput_Data

func (*ASRInput) GetToken

func (x *ASRInput) GetToken() *TokenData

func (*ASRInput) ProtoMessage

func (*ASRInput) ProtoMessage()

func (*ASRInput) ProtoReflect

func (x *ASRInput) ProtoReflect() protoreflect.Message

func (*ASRInput) Reset

func (x *ASRInput) Reset()

func (*ASRInput) String

func (x *ASRInput) String() string

type ASRInput_Audio

type ASRInput_Audio struct {
	// Audio data to transcribe.
	Audio []byte `protobuf:"bytes,2,opt,name=audio,proto3,oneof"`
}

type ASRInput_Token

type ASRInput_Token struct {
	// Session data, used to determine the correct Cubic
	// model to use for ASR, with other contextual
	// information.
	Token *TokenData `protobuf:"bytes,1,opt,name=token,proto3,oneof"`
}

type ASRResult

type ASRResult struct {

	// The transcription.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// Confidence estimate between 0 and 1. A higher number
	// represents a higher likelihood of the output being
	// correct.
	Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// True if a timeout was defined for the session's current
	// input state in the Diatheke model, and the timeout
	// expired before getting a transcription. This timeout
	// refers to the amount of time a user has to verbally
	// respond to Diatheke after the ASR stream has been
	// created, and should not be confused with a network
	// connection timeout.
	TimedOut bool `protobuf:"varint,3,opt,name=timedOut,proto3" json:"timedOut,omitempty"`
	// contains filtered or unexported fields
}

The result from the ASR stream, sent after the ASR engine has endpointed or the stream was closed by the client.

func (*ASRResult) Descriptor deprecated

func (*ASRResult) Descriptor() ([]byte, []int)

Deprecated: Use ASRResult.ProtoReflect.Descriptor instead.

func (*ASRResult) GetConfidence

func (x *ASRResult) GetConfidence() float64

func (*ASRResult) GetText

func (x *ASRResult) GetText() string

func (*ASRResult) GetTimedOut

func (x *ASRResult) GetTimedOut() bool

func (*ASRResult) ProtoMessage

func (*ASRResult) ProtoMessage()

func (*ASRResult) ProtoReflect

func (x *ASRResult) ProtoReflect() protoreflect.Message

func (*ASRResult) Reset

func (x *ASRResult) Reset()

func (*ASRResult) String

func (x *ASRResult) String() string

type ActionData

type ActionData struct {

	// Types that are assignable to Action:
	//	*ActionData_Input
	//	*ActionData_Command
	//	*ActionData_Reply
	//	*ActionData_Transcribe
	Action isActionData_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Specifies an action that the client application should take.

func (*ActionData) Descriptor deprecated

func (*ActionData) Descriptor() ([]byte, []int)

Deprecated: Use ActionData.ProtoReflect.Descriptor instead.

func (*ActionData) GetAction

func (m *ActionData) GetAction() isActionData_Action

func (*ActionData) GetCommand

func (x *ActionData) GetCommand() *CommandAction

func (*ActionData) GetInput

func (x *ActionData) GetInput() *WaitForUserAction

func (*ActionData) GetReply

func (x *ActionData) GetReply() *ReplyAction

func (*ActionData) GetTranscribe added in v2.1.0

func (x *ActionData) GetTranscribe() *TranscribeAction

func (*ActionData) ProtoMessage

func (*ActionData) ProtoMessage()

func (*ActionData) ProtoReflect

func (x *ActionData) ProtoReflect() protoreflect.Message

func (*ActionData) Reset

func (x *ActionData) Reset()

func (*ActionData) String

func (x *ActionData) String() string

type ActionData_Command

type ActionData_Command struct {
	// The client app must execute the specified command.
	Command *CommandAction `protobuf:"bytes,2,opt,name=command,proto3,oneof"`
}

type ActionData_Input

type ActionData_Input struct {
	// The user must provide input to Diatheke.
	Input *WaitForUserAction `protobuf:"bytes,1,opt,name=input,proto3,oneof"`
}

type ActionData_Reply

type ActionData_Reply struct {
	// The client app should provide the reply to the user.
	Reply *ReplyAction `protobuf:"bytes,3,opt,name=reply,proto3,oneof"`
}

type ActionData_Transcribe added in v2.1.0

type ActionData_Transcribe struct {
	// The client app should call the Transcribe method to
	// capture the user's input.
	Transcribe *TranscribeAction `protobuf:"bytes,4,opt,name=transcribe,proto3,oneof"`
}

type CommandAction

type CommandAction struct {

	// The ID of the command to execute, as defined in the
	// Diatheke model.
	Id              string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	InputParameters map[string]string `` /* 194-byte string literal not displayed */
	// contains filtered or unexported fields
}

This action indicates that the client application should execute a command.

func (*CommandAction) Descriptor deprecated

func (*CommandAction) Descriptor() ([]byte, []int)

Deprecated: Use CommandAction.ProtoReflect.Descriptor instead.

func (*CommandAction) GetId

func (x *CommandAction) GetId() string

func (*CommandAction) GetInputParameters

func (x *CommandAction) GetInputParameters() map[string]string

func (*CommandAction) ProtoMessage

func (*CommandAction) ProtoMessage()

func (*CommandAction) ProtoReflect

func (x *CommandAction) ProtoReflect() protoreflect.Message

func (*CommandAction) Reset

func (x *CommandAction) Reset()

func (*CommandAction) String

func (x *CommandAction) String() string

type CommandResult

type CommandResult struct {

	// The command ID, as given by the CommandAction
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Output from the command expected by the Diatheke model.
	// For example, this could be the result of a data query.
	OutParameters map[string]string `` /* 188-byte string literal not displayed */
	// If there was an error during execution, indicate it
	// here with a brief message that will be logged by
	// Diatheke.
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

The result of executing a command.

func (*CommandResult) Descriptor deprecated

func (*CommandResult) Descriptor() ([]byte, []int)

Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.

func (*CommandResult) GetError

func (x *CommandResult) GetError() string

func (*CommandResult) GetId

func (x *CommandResult) GetId() string

func (*CommandResult) GetOutParameters

func (x *CommandResult) GetOutParameters() map[string]string

func (*CommandResult) ProtoMessage

func (*CommandResult) ProtoMessage()

func (*CommandResult) ProtoReflect

func (x *CommandResult) ProtoReflect() protoreflect.Message

func (*CommandResult) Reset

func (x *CommandResult) Reset()

func (*CommandResult) String

func (x *CommandResult) String() string

type DiathekeClient

type DiathekeClient interface {
	// Returns version information from the server.
	Version(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionResponse, error)
	// ListModels returns information about the Diatheke models
	// the server can access.
	ListModels(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListModelsResponse, error)
	// Create a new Diatheke session. Also returns a list of
	// actions to take next.
	CreateSession(ctx context.Context, in *SessionStart, opts ...grpc.CallOption) (*SessionOutput, error)
	// Delete the session. Behavior is undefined if the given
	// TokenData is used again after this function is called.
	DeleteSession(ctx context.Context, in *TokenData, opts ...grpc.CallOption) (*Empty, error)
	// Process input for a session and get an updated session with
	// a list of actions to take next. This is the only method
	// that modifies the Diatheke session state.
	UpdateSession(ctx context.Context, in *SessionInput, opts ...grpc.CallOption) (*SessionOutput, error)
	// Create an ASR stream. A result is returned when the
	// stream is closed by the client (which forces the ASR to
	// endpoint), or when a transcript becomes available on its
	// own, in which case the stream is closed by the server.
	// The ASR result may be used in the UpdateSession method.
	// <br/><br/>
	// If the session has a wakeword enabled, and the client
	// application is using Diatheke and Cubic to handle the
	// wakeword processing, this method will not return a
	// result until the wakeword condition has been satisfied.
	// Utterances without the required wakeword will be
	// discarded and no transcription will be returned.
	StreamASR(ctx context.Context, opts ...grpc.CallOption) (Diatheke_StreamASRClient, error)
	// Create a TTS stream to receive audio for the given reply.
	// The stream will close when TTS is finished. The client
	// may also close the stream early to cancel the speech
	// synthesis.
	StreamTTS(ctx context.Context, in *ReplyAction, opts ...grpc.CallOption) (Diatheke_StreamTTSClient, error)
	// Create an ASR stream for transcription. Unlike StreamASR,
	// Transcribe does not listen for a wakeword. This method
	// returns a bi-directional stream, and its intended use is
	// for situations where a user may say anything at all, whether
	// it is short or long, and the application wants to save the
	// transcript (e.g., take a note, send a message).
	// <br/><br/>
	// The first message sent to the server must be the TranscribeAction,
	// with remaining messages sending audio data.
	// Messages received from the server will include the current
	// best partial transcription until the full transcription is
	// ready. The stream ends when either the client application
	// closes it, a predefined duration of silence (non-speech)
	// occurs, or the end-transcription intent is recognized.
	Transcribe(ctx context.Context, opts ...grpc.CallOption) (Diatheke_TranscribeClient, error)
}

DiathekeClient is the client API for Diatheke service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDiathekeClient

func NewDiathekeClient(cc grpc.ClientConnInterface) DiathekeClient

type DiathekeServer

type DiathekeServer interface {
	// Returns version information from the server.
	Version(context.Context, *Empty) (*VersionResponse, error)
	// ListModels returns information about the Diatheke models
	// the server can access.
	ListModels(context.Context, *Empty) (*ListModelsResponse, error)
	// Create a new Diatheke session. Also returns a list of
	// actions to take next.
	CreateSession(context.Context, *SessionStart) (*SessionOutput, error)
	// Delete the session. Behavior is undefined if the given
	// TokenData is used again after this function is called.
	DeleteSession(context.Context, *TokenData) (*Empty, error)
	// Process input for a session and get an updated session with
	// a list of actions to take next. This is the only method
	// that modifies the Diatheke session state.
	UpdateSession(context.Context, *SessionInput) (*SessionOutput, error)
	// Create an ASR stream. A result is returned when the
	// stream is closed by the client (which forces the ASR to
	// endpoint), or when a transcript becomes available on its
	// own, in which case the stream is closed by the server.
	// The ASR result may be used in the UpdateSession method.
	// <br/><br/>
	// If the session has a wakeword enabled, and the client
	// application is using Diatheke and Cubic to handle the
	// wakeword processing, this method will not return a
	// result until the wakeword condition has been satisfied.
	// Utterances without the required wakeword will be
	// discarded and no transcription will be returned.
	StreamASR(Diatheke_StreamASRServer) error
	// Create a TTS stream to receive audio for the given reply.
	// The stream will close when TTS is finished. The client
	// may also close the stream early to cancel the speech
	// synthesis.
	StreamTTS(*ReplyAction, Diatheke_StreamTTSServer) error
	// Create an ASR stream for transcription. Unlike StreamASR,
	// Transcribe does not listen for a wakeword. This method
	// returns a bi-directional stream, and its intended use is
	// for situations where a user may say anything at all, whether
	// it is short or long, and the application wants to save the
	// transcript (e.g., take a note, send a message).
	// <br/><br/>
	// The first message sent to the server must be the TranscribeAction,
	// with remaining messages sending audio data.
	// Messages received from the server will include the current
	// best partial transcription until the full transcription is
	// ready. The stream ends when either the client application
	// closes it, a predefined duration of silence (non-speech)
	// occurs, or the end-transcription intent is recognized.
	Transcribe(Diatheke_TranscribeServer) error
}

DiathekeServer is the server API for Diatheke service.

type Diatheke_StreamASRClient

type Diatheke_StreamASRClient interface {
	Send(*ASRInput) error
	CloseAndRecv() (*ASRResult, error)
	grpc.ClientStream
}

type Diatheke_StreamASRServer

type Diatheke_StreamASRServer interface {
	SendAndClose(*ASRResult) error
	Recv() (*ASRInput, error)
	grpc.ServerStream
}

type Diatheke_StreamTTSClient

type Diatheke_StreamTTSClient interface {
	Recv() (*TTSAudio, error)
	grpc.ClientStream
}

type Diatheke_StreamTTSServer

type Diatheke_StreamTTSServer interface {
	Send(*TTSAudio) error
	grpc.ServerStream
}

type Diatheke_TranscribeClient added in v2.1.0

type Diatheke_TranscribeClient interface {
	Send(*TranscribeInput) error
	Recv() (*TranscribeResult, error)
	grpc.ClientStream
}

type Diatheke_TranscribeServer added in v2.1.0

type Diatheke_TranscribeServer interface {
	Send(*TranscribeResult) error
	Recv() (*TranscribeInput, error)
	grpc.ServerStream
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ListModelsResponse

type ListModelsResponse struct {
	Models []*ModelInfo `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
	// contains filtered or unexported fields
}

A list of models available on the Diatheke server.

func (*ListModelsResponse) Descriptor deprecated

func (*ListModelsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListModelsResponse.ProtoReflect.Descriptor instead.

func (*ListModelsResponse) GetModels

func (x *ListModelsResponse) GetModels() []*ModelInfo

func (*ListModelsResponse) ProtoMessage

func (*ListModelsResponse) ProtoMessage()

func (*ListModelsResponse) ProtoReflect

func (x *ListModelsResponse) ProtoReflect() protoreflect.Message

func (*ListModelsResponse) Reset

func (x *ListModelsResponse) Reset()

func (*ListModelsResponse) String

func (x *ListModelsResponse) String() string

type ModelInfo

type ModelInfo struct {

	// Diatheke model ID, which is used to create a new session.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Pretty model name, which may be used for display purposes.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Language code of the model.
	Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"`
	// The ASR audio sample rate, if ASR is enabled.
	AsrSampleRate uint32 `protobuf:"varint,4,opt,name=asr_sample_rate,json=asrSampleRate,proto3" json:"asr_sample_rate,omitempty"`
	// The TTS audio sample rate, if TTS is enabled.
	TtsSampleRate uint32 `protobuf:"varint,5,opt,name=tts_sample_rate,json=ttsSampleRate,proto3" json:"tts_sample_rate,omitempty"`
	// contains filtered or unexported fields
}

Information about a single Diatheke model.

func (*ModelInfo) Descriptor deprecated

func (*ModelInfo) Descriptor() ([]byte, []int)

Deprecated: Use ModelInfo.ProtoReflect.Descriptor instead.

func (*ModelInfo) GetAsrSampleRate

func (x *ModelInfo) GetAsrSampleRate() uint32

func (*ModelInfo) GetId

func (x *ModelInfo) GetId() string

func (*ModelInfo) GetLanguage

func (x *ModelInfo) GetLanguage() string

func (*ModelInfo) GetName

func (x *ModelInfo) GetName() string

func (*ModelInfo) GetTtsSampleRate

func (x *ModelInfo) GetTtsSampleRate() uint32

func (*ModelInfo) ProtoMessage

func (*ModelInfo) ProtoMessage()

func (*ModelInfo) ProtoReflect

func (x *ModelInfo) ProtoReflect() protoreflect.Message

func (*ModelInfo) Reset

func (x *ModelInfo) Reset()

func (*ModelInfo) String

func (x *ModelInfo) String() string

type ReplyAction

type ReplyAction struct {

	// Text of the reply
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// TTS model to use with the TTSReply method
	LunaModel string `protobuf:"bytes,2,opt,name=luna_model,json=lunaModel,proto3" json:"luna_model,omitempty"`
	// contains filtered or unexported fields
}

This action indicates that the client application should give the provided text to the user. This action may also be used to synthesize speech with the StreamTTS method.

func (*ReplyAction) Descriptor deprecated

func (*ReplyAction) Descriptor() ([]byte, []int)

Deprecated: Use ReplyAction.ProtoReflect.Descriptor instead.

func (*ReplyAction) GetLunaModel

func (x *ReplyAction) GetLunaModel() string

func (*ReplyAction) GetText

func (x *ReplyAction) GetText() string

func (*ReplyAction) ProtoMessage

func (*ReplyAction) ProtoMessage()

func (*ReplyAction) ProtoReflect

func (x *ReplyAction) ProtoReflect() protoreflect.Message

func (*ReplyAction) Reset

func (x *ReplyAction) Reset()

func (*ReplyAction) String

func (x *ReplyAction) String() string

type SessionInput

type SessionInput struct {

	// The session token.
	Token *TokenData `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Types that are assignable to Input:
	//	*SessionInput_Text
	//	*SessionInput_Asr
	//	*SessionInput_Cmd
	//	*SessionInput_Story
	Input isSessionInput_Input `protobuf_oneof:"input"`
	// contains filtered or unexported fields
}

Used by Diatheke to update the session state.

func (*SessionInput) Descriptor deprecated

func (*SessionInput) Descriptor() ([]byte, []int)

Deprecated: Use SessionInput.ProtoReflect.Descriptor instead.

func (*SessionInput) GetAsr

func (x *SessionInput) GetAsr() *ASRResult

func (*SessionInput) GetCmd

func (x *SessionInput) GetCmd() *CommandResult

func (*SessionInput) GetInput

func (m *SessionInput) GetInput() isSessionInput_Input

func (*SessionInput) GetStory

func (x *SessionInput) GetStory() *SetStory

func (*SessionInput) GetText

func (x *SessionInput) GetText() *TextInput

func (*SessionInput) GetToken

func (x *SessionInput) GetToken() *TokenData

func (*SessionInput) ProtoMessage

func (*SessionInput) ProtoMessage()

func (*SessionInput) ProtoReflect

func (x *SessionInput) ProtoReflect() protoreflect.Message

func (*SessionInput) Reset

func (x *SessionInput) Reset()

func (*SessionInput) String

func (x *SessionInput) String() string

type SessionInput_Asr

type SessionInput_Asr struct {
	// Process an ASR result.
	Asr *ASRResult `protobuf:"bytes,3,opt,name=asr,proto3,oneof"`
}

type SessionInput_Cmd

type SessionInput_Cmd struct {
	// Process the result of a completed command.
	Cmd *CommandResult `protobuf:"bytes,4,opt,name=cmd,proto3,oneof"`
}

type SessionInput_Story

type SessionInput_Story struct {
	// Change the current session state.
	Story *SetStory `protobuf:"bytes,5,opt,name=story,proto3,oneof"`
}

type SessionInput_Text

type SessionInput_Text struct {
	// Process the user supplied text.
	Text *TextInput `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

type SessionOutput

type SessionOutput struct {

	// The updated session token.
	Token *TokenData `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// The list of actions the client should take next,
	// using the session token returned with this result.
	ActionList []*ActionData `protobuf:"bytes,2,rep,name=action_list,json=actionList,proto3" json:"action_list,omitempty"`
	// contains filtered or unexported fields
}

The result of updating a session.

func (*SessionOutput) Descriptor deprecated

func (*SessionOutput) Descriptor() ([]byte, []int)

Deprecated: Use SessionOutput.ProtoReflect.Descriptor instead.

func (*SessionOutput) GetActionList

func (x *SessionOutput) GetActionList() []*ActionData

func (*SessionOutput) GetToken

func (x *SessionOutput) GetToken() *TokenData

func (*SessionOutput) ProtoMessage

func (*SessionOutput) ProtoMessage()

func (*SessionOutput) ProtoReflect

func (x *SessionOutput) ProtoReflect() protoreflect.Message

func (*SessionOutput) Reset

func (x *SessionOutput) Reset()

func (*SessionOutput) String

func (x *SessionOutput) String() string

type SessionStart

type SessionStart struct {

	// Specifies the Diatheke model ID to use for the session.
	ModelId string `protobuf:"bytes,1,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"`
	// Specifies a custom wakeword to use for this session. The
	// wakeword must be enabled in the Diatheke model for this
	// to have any effect. It will override the default wakeword
	// specified in the model.
	Wakeword string `protobuf:"bytes,2,opt,name=wakeword,proto3" json:"wakeword,omitempty"`
	// contains filtered or unexported fields
}

Used to create a new session.

func (*SessionStart) Descriptor deprecated

func (*SessionStart) Descriptor() ([]byte, []int)

Deprecated: Use SessionStart.ProtoReflect.Descriptor instead.

func (*SessionStart) GetModelId

func (x *SessionStart) GetModelId() string

func (*SessionStart) GetWakeword added in v2.1.0

func (x *SessionStart) GetWakeword() string

func (*SessionStart) ProtoMessage

func (*SessionStart) ProtoMessage()

func (*SessionStart) ProtoReflect

func (x *SessionStart) ProtoReflect() protoreflect.Message

func (*SessionStart) Reset

func (x *SessionStart) Reset()

func (*SessionStart) String

func (x *SessionStart) String() string

type SetStory

type SetStory struct {

	// The ID of the story to run, as defined in the
	// Diatheke model.
	StoryId string `protobuf:"bytes,1,opt,name=story_id,json=storyId,proto3" json:"story_id,omitempty"`
	// A list of parameters to set before running the given
	// story. This will replace any parameters currently
	// defined in the session.
	Parameters map[string]string `` /* 161-byte string literal not displayed */
	// contains filtered or unexported fields
}

Changes the current state of a Diatheke session to run at the specified story.

func (*SetStory) Descriptor deprecated

func (*SetStory) Descriptor() ([]byte, []int)

Deprecated: Use SetStory.ProtoReflect.Descriptor instead.

func (*SetStory) GetParameters

func (x *SetStory) GetParameters() map[string]string

func (*SetStory) GetStoryId

func (x *SetStory) GetStoryId() string

func (*SetStory) ProtoMessage

func (*SetStory) ProtoMessage()

func (*SetStory) ProtoReflect

func (x *SetStory) ProtoReflect() protoreflect.Message

func (*SetStory) Reset

func (x *SetStory) Reset()

func (*SetStory) String

func (x *SetStory) String() string

type TTSAudio

type TTSAudio struct {
	Audio []byte `protobuf:"bytes,1,opt,name=audio,proto3" json:"audio,omitempty"`
	// contains filtered or unexported fields
}

Contains synthesized speech audio. The specific encoding is defined in the server config file.

func (*TTSAudio) Descriptor deprecated

func (*TTSAudio) Descriptor() ([]byte, []int)

Deprecated: Use TTSAudio.ProtoReflect.Descriptor instead.

func (*TTSAudio) GetAudio

func (x *TTSAudio) GetAudio() []byte

func (*TTSAudio) ProtoMessage

func (*TTSAudio) ProtoMessage()

func (*TTSAudio) ProtoReflect

func (x *TTSAudio) ProtoReflect() protoreflect.Message

func (*TTSAudio) Reset

func (x *TTSAudio) Reset()

func (*TTSAudio) String

func (x *TTSAudio) String() string

type TextInput

type TextInput struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

User supplied text to send to Diatheke for processing.

func (*TextInput) Descriptor deprecated

func (*TextInput) Descriptor() ([]byte, []int)

Deprecated: Use TextInput.ProtoReflect.Descriptor instead.

func (*TextInput) GetText

func (x *TextInput) GetText() string

func (*TextInput) ProtoMessage

func (*TextInput) ProtoMessage()

func (*TextInput) ProtoReflect

func (x *TextInput) ProtoReflect() protoreflect.Message

func (*TextInput) Reset

func (x *TextInput) Reset()

func (*TextInput) String

func (x *TextInput) String() string

type TokenData

type TokenData struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Session ID, useful for correlating logging between a
	// client and the server.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Additional data supplied by the client app, which will
	// be logged with other session info by the server.
	Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A token that represents a single Diatheke session and its current state.

func (*TokenData) Descriptor deprecated

func (*TokenData) Descriptor() ([]byte, []int)

Deprecated: Use TokenData.ProtoReflect.Descriptor instead.

func (*TokenData) GetData

func (x *TokenData) GetData() []byte

func (*TokenData) GetId

func (x *TokenData) GetId() string

func (*TokenData) GetMetadata

func (x *TokenData) GetMetadata() string

func (*TokenData) ProtoMessage

func (*TokenData) ProtoMessage()

func (*TokenData) ProtoReflect

func (x *TokenData) ProtoReflect() protoreflect.Message

func (*TokenData) Reset

func (x *TokenData) Reset()

func (*TokenData) String

func (x *TokenData) String() string

type TranscribeAction added in v2.1.0

type TranscribeAction struct {

	// The ID of the transcribe action, which is useful to
	// differentiate separate transcription tasks within a
	// single sesssion.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// (Required) The ASR model to use for transcription.
	CubicModelId string `protobuf:"bytes,2,opt,name=cubic_model_id,json=cubicModelId,proto3" json:"cubic_model_id,omitempty"`
	// (Optional) A Diatheke model to use for end-of-stream
	// conditions. If empty, the server will not be able to
	// automatically close the transcribe stream based on
	// conditions defined in the model, such as
	// a non-speech timeout or an "end-transcription" intent.
	// When empty, the stream must be closed by the client
	// application.
	DiathekeModelId string `protobuf:"bytes,3,opt,name=diatheke_model_id,json=diathekeModelId,proto3" json:"diatheke_model_id,omitempty"`
	// contains filtered or unexported fields
}

This action indicates that the client application should call the Transcribe method to capture the user's input.

func (*TranscribeAction) Descriptor deprecated added in v2.1.0

func (*TranscribeAction) Descriptor() ([]byte, []int)

Deprecated: Use TranscribeAction.ProtoReflect.Descriptor instead.

func (*TranscribeAction) GetCubicModelId added in v2.1.0

func (x *TranscribeAction) GetCubicModelId() string

func (*TranscribeAction) GetDiathekeModelId added in v2.1.0

func (x *TranscribeAction) GetDiathekeModelId() string

func (*TranscribeAction) GetId added in v2.1.0

func (x *TranscribeAction) GetId() string

func (*TranscribeAction) ProtoMessage added in v2.1.0

func (*TranscribeAction) ProtoMessage()

func (*TranscribeAction) ProtoReflect added in v2.1.0

func (x *TranscribeAction) ProtoReflect() protoreflect.Message

func (*TranscribeAction) Reset added in v2.1.0

func (x *TranscribeAction) Reset()

func (*TranscribeAction) String added in v2.1.0

func (x *TranscribeAction) String() string

type TranscribeInput added in v2.1.0

type TranscribeInput struct {

	// Types that are assignable to Data:
	//	*TranscribeInput_Action
	//	*TranscribeInput_Audio
	Data isTranscribeInput_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

Data to send to the Transcribe stream. The first message on the stream must be a TranscribeAction, followed by audio data.

func (*TranscribeInput) Descriptor deprecated added in v2.1.0

func (*TranscribeInput) Descriptor() ([]byte, []int)

Deprecated: Use TranscribeInput.ProtoReflect.Descriptor instead.

func (*TranscribeInput) GetAction added in v2.1.0

func (x *TranscribeInput) GetAction() *TranscribeAction

func (*TranscribeInput) GetAudio added in v2.1.0

func (x *TranscribeInput) GetAudio() []byte

func (*TranscribeInput) GetData added in v2.1.0

func (m *TranscribeInput) GetData() isTranscribeInput_Data

func (*TranscribeInput) ProtoMessage added in v2.1.0

func (*TranscribeInput) ProtoMessage()

func (*TranscribeInput) ProtoReflect added in v2.1.0

func (x *TranscribeInput) ProtoReflect() protoreflect.Message

func (*TranscribeInput) Reset added in v2.1.0

func (x *TranscribeInput) Reset()

func (*TranscribeInput) String added in v2.1.0

func (x *TranscribeInput) String() string

type TranscribeInput_Action added in v2.1.0

type TranscribeInput_Action struct {
	// Action defining the transcribe configuration.
	Action *TranscribeAction `protobuf:"bytes,1,opt,name=action,proto3,oneof"`
}

type TranscribeInput_Audio added in v2.1.0

type TranscribeInput_Audio struct {
	// Audio data to transcribe.
	Audio []byte `protobuf:"bytes,2,opt,name=audio,proto3,oneof"`
}

type TranscribeResult added in v2.1.0

type TranscribeResult struct {

	// The transcription.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// Confidence estimate between 0 and 1. A higher number
	// represents a higher likelihood that the transcription
	// is correct.
	Confidence float64 `protobuf:"fixed64,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
	// True if this is a partial result, in which case the
	// next result will be for the same audio, either repeating
	// or correcting the text in this result. When false, this
	// represents the final transcription for an utterance, which
	// will not change with further audio input. It is sent when
	// the ASR has identified an endpoint. After the final
	// transcription is sent, any additional results sent on the
	// Transcribe stream belong to the next utterance.
	IsPartial bool `protobuf:"varint,3,opt,name=is_partial,json=isPartial,proto3" json:"is_partial,omitempty"`
	// contains filtered or unexported fields
}

The result from the Transcribe stream. Usually, several partial (or intermediate) transcriptions will be sent until the final transcription is ready for every utterance processed.

func (*TranscribeResult) Descriptor deprecated added in v2.1.0

func (*TranscribeResult) Descriptor() ([]byte, []int)

Deprecated: Use TranscribeResult.ProtoReflect.Descriptor instead.

func (*TranscribeResult) GetConfidence added in v2.1.0

func (x *TranscribeResult) GetConfidence() float64

func (*TranscribeResult) GetIsPartial added in v2.1.0

func (x *TranscribeResult) GetIsPartial() bool

func (*TranscribeResult) GetText added in v2.1.0

func (x *TranscribeResult) GetText() string

func (*TranscribeResult) ProtoMessage added in v2.1.0

func (*TranscribeResult) ProtoMessage()

func (*TranscribeResult) ProtoReflect added in v2.1.0

func (x *TranscribeResult) ProtoReflect() protoreflect.Message

func (*TranscribeResult) Reset added in v2.1.0

func (x *TranscribeResult) Reset()

func (*TranscribeResult) String added in v2.1.0

func (x *TranscribeResult) String() string

type UnimplementedDiathekeServer

type UnimplementedDiathekeServer struct {
}

UnimplementedDiathekeServer can be embedded to have forward compatible implementations.

func (*UnimplementedDiathekeServer) CreateSession

func (*UnimplementedDiathekeServer) DeleteSession

func (*UnimplementedDiathekeServer) ListModels

func (*UnimplementedDiathekeServer) StreamASR

func (*UnimplementedDiathekeServer) StreamTTS

func (*UnimplementedDiathekeServer) Transcribe added in v2.1.0

func (*UnimplementedDiathekeServer) UpdateSession

func (*UnimplementedDiathekeServer) Version

type VersionResponse

type VersionResponse struct {

	// Dialog management engine
	Diatheke string `protobuf:"bytes,1,opt,name=diatheke,proto3" json:"diatheke,omitempty"`
	// NLU engine
	Chosun string `protobuf:"bytes,2,opt,name=chosun,proto3" json:"chosun,omitempty"`
	// ASR engine
	Cubic string `protobuf:"bytes,3,opt,name=cubic,proto3" json:"cubic,omitempty"`
	// TTS engine
	Luna string `protobuf:"bytes,4,opt,name=luna,proto3" json:"luna,omitempty"`
	// contains filtered or unexported fields
}

Lists the version of Diatheke and the engines it uses.

func (*VersionResponse) Descriptor deprecated

func (*VersionResponse) Descriptor() ([]byte, []int)

Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.

func (*VersionResponse) GetChosun

func (x *VersionResponse) GetChosun() string

func (*VersionResponse) GetCubic

func (x *VersionResponse) GetCubic() string

func (*VersionResponse) GetDiatheke

func (x *VersionResponse) GetDiatheke() string

func (*VersionResponse) GetLuna

func (x *VersionResponse) GetLuna() string

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) ProtoReflect

func (x *VersionResponse) ProtoReflect() protoreflect.Message

func (*VersionResponse) Reset

func (x *VersionResponse) Reset()

func (*VersionResponse) String

func (x *VersionResponse) String() string

type WaitForUserAction

type WaitForUserAction struct {

	// True if the next user input must begin with a wake-word.
	RequiresWakeWord bool `protobuf:"varint,1,opt,name=requires_wake_word,json=requiresWakeWord,proto3" json:"requires_wake_word,omitempty"`
	// True if the input is required immediately (i.e., in
	// response to a question Diatheke asked the user). When
	// false, the client should be allowed to wait indefinitely
	// for the user to provide input.
	Immediate bool `protobuf:"varint,2,opt,name=immediate,proto3" json:"immediate,omitempty"`
	// contains filtered or unexported fields
}

This action indicates that Diatheke is expecting user input.

func (*WaitForUserAction) Descriptor deprecated

func (*WaitForUserAction) Descriptor() ([]byte, []int)

Deprecated: Use WaitForUserAction.ProtoReflect.Descriptor instead.

func (*WaitForUserAction) GetImmediate

func (x *WaitForUserAction) GetImmediate() bool

func (*WaitForUserAction) GetRequiresWakeWord

func (x *WaitForUserAction) GetRequiresWakeWord() bool

func (*WaitForUserAction) ProtoMessage

func (*WaitForUserAction) ProtoMessage()

func (*WaitForUserAction) ProtoReflect

func (x *WaitForUserAction) ProtoReflect() protoreflect.Message

func (*WaitForUserAction) Reset

func (x *WaitForUserAction) Reset()

func (*WaitForUserAction) String

func (x *WaitForUserAction) String() string

Jump to

Keyboard shortcuts

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