Documentation ¶
Index ¶
- Variables
- func RegisterDiathekeServer(s *grpc.Server, srv DiathekeServer)
- type ASRInput
- func (*ASRInput) Descriptor() ([]byte, []int)deprecated
- func (x *ASRInput) GetAudio() []byte
- func (m *ASRInput) GetData() isASRInput_Data
- func (x *ASRInput) GetToken() *TokenData
- func (*ASRInput) ProtoMessage()
- func (x *ASRInput) ProtoReflect() protoreflect.Message
- func (x *ASRInput) Reset()
- func (x *ASRInput) String() string
- type ASRInput_Audio
- type ASRInput_Token
- type ASRResult
- func (*ASRResult) Descriptor() ([]byte, []int)deprecated
- func (x *ASRResult) GetConfidence() float64
- func (x *ASRResult) GetText() string
- func (x *ASRResult) GetTimedOut() bool
- func (*ASRResult) ProtoMessage()
- func (x *ASRResult) ProtoReflect() protoreflect.Message
- func (x *ASRResult) Reset()
- func (x *ASRResult) String() string
- type ActionData
- func (*ActionData) Descriptor() ([]byte, []int)deprecated
- func (m *ActionData) GetAction() isActionData_Action
- func (x *ActionData) GetCommand() *CommandAction
- func (x *ActionData) GetInput() *WaitForUserAction
- func (x *ActionData) GetReply() *ReplyAction
- func (x *ActionData) GetTranscribe() *TranscribeAction
- func (*ActionData) ProtoMessage()
- func (x *ActionData) ProtoReflect() protoreflect.Message
- func (x *ActionData) Reset()
- func (x *ActionData) String() string
- type ActionData_Command
- type ActionData_Input
- type ActionData_Reply
- type ActionData_Transcribe
- type CommandAction
- func (*CommandAction) Descriptor() ([]byte, []int)deprecated
- func (x *CommandAction) GetId() string
- func (x *CommandAction) GetInputParameters() map[string]string
- func (*CommandAction) ProtoMessage()
- func (x *CommandAction) ProtoReflect() protoreflect.Message
- func (x *CommandAction) Reset()
- func (x *CommandAction) String() string
- type CommandResult
- func (*CommandResult) Descriptor() ([]byte, []int)deprecated
- func (x *CommandResult) GetError() string
- func (x *CommandResult) GetId() string
- func (x *CommandResult) GetOutParameters() map[string]string
- func (*CommandResult) ProtoMessage()
- func (x *CommandResult) ProtoReflect() protoreflect.Message
- func (x *CommandResult) Reset()
- func (x *CommandResult) String() string
- type DiathekeClient
- type DiathekeServer
- type Diatheke_StreamASRClient
- type Diatheke_StreamASRServer
- type Diatheke_StreamTTSClient
- type Diatheke_StreamTTSServer
- type Diatheke_TranscribeClient
- type Diatheke_TranscribeServer
- type Empty
- type ListModelsResponse
- func (*ListModelsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListModelsResponse) GetModels() []*ModelInfo
- func (*ListModelsResponse) ProtoMessage()
- func (x *ListModelsResponse) ProtoReflect() protoreflect.Message
- func (x *ListModelsResponse) Reset()
- func (x *ListModelsResponse) String() string
- type ModelInfo
- func (*ModelInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ModelInfo) GetAsrSampleRate() uint32
- func (x *ModelInfo) GetId() string
- func (x *ModelInfo) GetLanguage() string
- func (x *ModelInfo) GetName() string
- func (x *ModelInfo) GetTtsSampleRate() uint32
- func (*ModelInfo) ProtoMessage()
- func (x *ModelInfo) ProtoReflect() protoreflect.Message
- func (x *ModelInfo) Reset()
- func (x *ModelInfo) String() string
- type ReplyAction
- func (*ReplyAction) Descriptor() ([]byte, []int)deprecated
- func (x *ReplyAction) GetLunaModel() string
- func (x *ReplyAction) GetText() string
- func (*ReplyAction) ProtoMessage()
- func (x *ReplyAction) ProtoReflect() protoreflect.Message
- func (x *ReplyAction) Reset()
- func (x *ReplyAction) String() string
- type SessionInput
- func (*SessionInput) Descriptor() ([]byte, []int)deprecated
- func (x *SessionInput) GetAsr() *ASRResult
- func (x *SessionInput) GetCmd() *CommandResult
- func (m *SessionInput) GetInput() isSessionInput_Input
- func (x *SessionInput) GetStory() *SetStory
- func (x *SessionInput) GetText() *TextInput
- func (x *SessionInput) GetToken() *TokenData
- func (*SessionInput) ProtoMessage()
- func (x *SessionInput) ProtoReflect() protoreflect.Message
- func (x *SessionInput) Reset()
- func (x *SessionInput) String() string
- type SessionInput_Asr
- type SessionInput_Cmd
- type SessionInput_Story
- type SessionInput_Text
- type SessionOutput
- func (*SessionOutput) Descriptor() ([]byte, []int)deprecated
- func (x *SessionOutput) GetActionList() []*ActionData
- func (x *SessionOutput) GetToken() *TokenData
- func (*SessionOutput) ProtoMessage()
- func (x *SessionOutput) ProtoReflect() protoreflect.Message
- func (x *SessionOutput) Reset()
- func (x *SessionOutput) String() string
- type SessionStart
- func (*SessionStart) Descriptor() ([]byte, []int)deprecated
- func (x *SessionStart) GetModelId() string
- func (x *SessionStart) GetWakeword() string
- func (*SessionStart) ProtoMessage()
- func (x *SessionStart) ProtoReflect() protoreflect.Message
- func (x *SessionStart) Reset()
- func (x *SessionStart) String() string
- type SetStory
- type TTSAudio
- type TextInput
- type TokenData
- func (*TokenData) Descriptor() ([]byte, []int)deprecated
- func (x *TokenData) GetData() []byte
- func (x *TokenData) GetId() string
- func (x *TokenData) GetMetadata() string
- func (*TokenData) ProtoMessage()
- func (x *TokenData) ProtoReflect() protoreflect.Message
- func (x *TokenData) Reset()
- func (x *TokenData) String() string
- type TranscribeAction
- func (*TranscribeAction) Descriptor() ([]byte, []int)deprecated
- func (x *TranscribeAction) GetCubicModelId() string
- func (x *TranscribeAction) GetDiathekeModelId() string
- func (x *TranscribeAction) GetId() string
- func (*TranscribeAction) ProtoMessage()
- func (x *TranscribeAction) ProtoReflect() protoreflect.Message
- func (x *TranscribeAction) Reset()
- func (x *TranscribeAction) String() string
- type TranscribeInput
- func (*TranscribeInput) Descriptor() ([]byte, []int)deprecated
- func (x *TranscribeInput) GetAction() *TranscribeAction
- func (x *TranscribeInput) GetAudio() []byte
- func (m *TranscribeInput) GetData() isTranscribeInput_Data
- func (*TranscribeInput) ProtoMessage()
- func (x *TranscribeInput) ProtoReflect() protoreflect.Message
- func (x *TranscribeInput) Reset()
- func (x *TranscribeInput) String() string
- type TranscribeInput_Action
- type TranscribeInput_Audio
- type TranscribeResult
- func (*TranscribeResult) Descriptor() ([]byte, []int)deprecated
- func (x *TranscribeResult) GetConfidence() float64
- func (x *TranscribeResult) GetIsPartial() bool
- func (x *TranscribeResult) GetText() string
- func (*TranscribeResult) ProtoMessage()
- func (x *TranscribeResult) ProtoReflect() protoreflect.Message
- func (x *TranscribeResult) Reset()
- func (x *TranscribeResult) String() string
- type UnimplementedDiathekeServer
- func (*UnimplementedDiathekeServer) CreateSession(context.Context, *SessionStart) (*SessionOutput, error)
- func (*UnimplementedDiathekeServer) DeleteSession(context.Context, *TokenData) (*Empty, error)
- func (*UnimplementedDiathekeServer) ListModels(context.Context, *Empty) (*ListModelsResponse, error)
- func (*UnimplementedDiathekeServer) StreamASR(Diatheke_StreamASRServer) error
- func (*UnimplementedDiathekeServer) StreamTTS(*ReplyAction, Diatheke_StreamTTSServer) error
- func (*UnimplementedDiathekeServer) Transcribe(Diatheke_TranscribeServer) error
- func (*UnimplementedDiathekeServer) UpdateSession(context.Context, *SessionInput) (*SessionOutput, error)
- func (*UnimplementedDiathekeServer) Version(context.Context, *Empty) (*VersionResponse, error)
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetChosun() string
- func (x *VersionResponse) GetCubic() string
- func (x *VersionResponse) GetDiatheke() string
- func (x *VersionResponse) GetLuna() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
- type WaitForUserAction
- func (*WaitForUserAction) Descriptor() ([]byte, []int)deprecated
- func (x *WaitForUserAction) GetImmediate() bool
- func (x *WaitForUserAction) GetRequiresWakeWord() bool
- func (*WaitForUserAction) ProtoMessage()
- func (x *WaitForUserAction) ProtoReflect() protoreflect.Message
- func (x *WaitForUserAction) Reset()
- func (x *WaitForUserAction) String() string
Constants ¶
This section is empty.
Variables ¶
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) ProtoMessage ¶
func (*ASRInput) ProtoMessage()
func (*ASRInput) ProtoReflect ¶
func (x *ASRInput) ProtoReflect() protoreflect.Message
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) GetConfidence ¶
func (*ASRResult) GetTimedOut ¶
func (*ASRResult) ProtoMessage ¶
func (*ASRResult) ProtoMessage()
func (*ASRResult) ProtoReflect ¶
func (x *ASRResult) ProtoReflect() protoreflect.Message
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_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) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
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) GetAsrSampleRate ¶
func (*ModelInfo) GetLanguage ¶
func (*ModelInfo) GetTtsSampleRate ¶
func (*ModelInfo) ProtoMessage ¶
func (*ModelInfo) ProtoMessage()
func (*ModelInfo) ProtoReflect ¶
func (x *ModelInfo) ProtoReflect() protoreflect.Message
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) GetParameters ¶
func (*SetStory) GetStoryId ¶
func (*SetStory) ProtoMessage ¶
func (*SetStory) ProtoMessage()
func (*SetStory) ProtoReflect ¶
func (x *SetStory) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*TTSAudio) ProtoMessage()
func (*TTSAudio) ProtoReflect ¶
func (x *TTSAudio) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*TextInput) ProtoMessage()
func (*TextInput) ProtoReflect ¶
func (x *TextInput) ProtoReflect() protoreflect.Message
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) GetMetadata ¶
func (*TokenData) ProtoMessage ¶
func (*TokenData) ProtoMessage()
func (*TokenData) ProtoReflect ¶
func (x *TokenData) ProtoReflect() protoreflect.Message
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) CreateSession(context.Context, *SessionStart) (*SessionOutput, error)
func (*UnimplementedDiathekeServer) DeleteSession ¶
func (*UnimplementedDiathekeServer) ListModels ¶
func (*UnimplementedDiathekeServer) ListModels(context.Context, *Empty) (*ListModelsResponse, error)
func (*UnimplementedDiathekeServer) StreamASR ¶
func (*UnimplementedDiathekeServer) StreamASR(Diatheke_StreamASRServer) error
func (*UnimplementedDiathekeServer) StreamTTS ¶
func (*UnimplementedDiathekeServer) StreamTTS(*ReplyAction, Diatheke_StreamTTSServer) error
func (*UnimplementedDiathekeServer) Transcribe ¶ added in v2.1.0
func (*UnimplementedDiathekeServer) Transcribe(Diatheke_TranscribeServer) error
func (*UnimplementedDiathekeServer) UpdateSession ¶
func (*UnimplementedDiathekeServer) UpdateSession(context.Context, *SessionInput) (*SessionOutput, error)
func (*UnimplementedDiathekeServer) Version ¶
func (*UnimplementedDiathekeServer) Version(context.Context, *Empty) (*VersionResponse, error)
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