Skip to content

Commit

Permalink
taking latest proto changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rakchaud committed Jan 24, 2025
1 parent 0e261c7 commit 3b7dcef
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ common Proto file for the media service flow
syntax = "proto3";

package com.cisco.wcc.ccai.media.v1;
import "google/protobuf/struct.proto";

/*
Content of the text input
Expand All @@ -14,7 +15,7 @@ message TextContent {
// Plain text input.
string text = 1;

// SSML formatted text input.
// Optional. SSML formatted text input.
string ssml = 2;
}
// Language code ofF the user input, e.g., 'en-US'.
Expand Down Expand Up @@ -144,13 +145,40 @@ message ListVAResponse{

}

// Events that represent the state of the session or call.
message OutputEvent {
//Possible types of events
enum EventType {
UNSPECIFIED_EVENT = 0; //unspecified event
SESSION_END = 1; // End of session with the virtual agent.
TRANSFER_TO_AGENT = 2; // Transfer the call to a human agent.
CUSTOM_EVENT = 3; // Custom event based on interaction.
/*
Triggers when user utter the first utterance in Voice Input mode or First DTMF is pressed in DTMF Input mode.
This event to be used to BargeIn the prompt based on prompt barge-in flag.
The event will be sent only if the current prompt being played is bargein enabled or prompt playing is complete.
*/
START_OF_INPUT = 4;
// Sent when user utterance Voice / DTMF is complete.
END_OF_INPUT = 5;
// Sent when utterance did not match any of the accepted input
NO_MATCH = 6;
// Sent when no audio received with in the expected timeframe
NO_INPUT = 7;
}
//input event type
EventType event_type = 1;
google.protobuf.Struct parameters = 2; // Optional: additional event parameters.custom event related info can also be passed here
}


/*
Represents the Type of Events
*/
message InputEvent {
message EventInput {
//Possible event types
enum EventType {
EVENT_UNSPECIFIED = 0; // unspecified event
UNSPECIFIED_INPUT = 0; // unspecified event
SESSION_START = 1; // Event indicating the start of the interaction. for voice agent its call_start
SESSION_END = 2; // Event indicating the end of the interaction.for voice agent its call_end
// Event indicating no input was received from the user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "google/protobuf/struct.proto";
/*
Represents the Request format for voice virtual agent
*/
message VoiceVirtualAgentRequest {
message VoiceVARequest {
// Conversation id - mapped to call id.
string conversation_id = 1;

Expand All @@ -39,7 +39,7 @@ message VoiceVirtualAgentRequest {
DTMFInputs dtmf_input = 7;

// Optional. Input events, such as call start, call end, no input, etc.
InputEvent event_input = 8;
EventInput event_input = 8;
}
}

Expand All @@ -52,7 +52,7 @@ message VoiceInput {

// Encoding format of the audio data.
enum VoiceEncoding {
AUDIO_ENCODING_UNSPECIFIED = 0;
UNSPECIFIED_FORMAT = 0;
LINEAR16_FORMAT = 1; // 16-bit linear PCM.
MULAW_FORMAT = 2; // G.711 mu-law.
ALAW_FORMAT = 3; // G.711 A-law.
Expand All @@ -74,12 +74,13 @@ message VoiceInput {

// Represents the output of the virtual agent, which includes response audio,
// events, and configurations.
message VoiceVirtualAgentResponse {
message VoiceVAResponse {
// List of prompt Voice responses to be played by the caller.
repeated Prompt prompts = 1;

// Output events from the virtual agent, such as session end or transfer
// to human agent.
//As of now only one event will be supported and first event will be considered.
repeated OutputEvent output_events = 2;

// Indicates whether the next input from the client is to be considered
Expand Down Expand Up @@ -125,30 +126,15 @@ enum VoiceVAInputMode {
INPUT_VOICE_DTMF = 3; //voice dtmf input
}

// Events that represent the state of the session or call.
message OutputEvent {
//Possible types of events
enum EventType {
VOICE_VA_EVENT_UNSPECIFIED = 0; //unspecified event
VA_CALL_END = 1; // Call ended with the virtual agent.
VOICE_TRANSFER_TO_AGENT = 2; // Transfer the call to a human agent.
SESSION_END = 3; // End of session with the virtual agent.
VOICE_CUSTOM_EVENT = 4; // Custom event based on interaction.
}
//input event type
EventType event_type = 1;
google.protobuf.Struct parameters = 2; // Optional: additional event parameters.
}

// Service definition for the Audio Virtual Agent gRPC API.
service AudioVirtualAgent {
service VoiceVirtualAgent {

// Bidirectional streaming RPC to send and receive caller audio, DTMF,
// or input events.
rpc ProcessCallerAudio(stream VoiceVirtualAgentRequest) returns (stream VoiceVirtualAgentResponse);
rpc ProcessCallerInput(stream VoiceVARequest) returns (stream VoiceVAResponse);

/*
The Service that takes virtual agent list request and org id and returns a list of bots
*/
rpc ListVirtualAgents(ListVARequest) returns (ListVAResponse) {}
}
}

0 comments on commit 3b7dcef

Please sign in to comment.