Files
guardian/crates/dcs-grpc/protos/dcs/srs/v0/srs.proto

107 lines
3.8 KiB
Protocol Buffer
Executable File

syntax = "proto3";
package dcs.srs.v0;
import "dcs/common/v0/common.proto";
option csharp_namespace = "RurouniJones.Dcs.Grpc.V0.Srs";
option go_package = "github.com/DCS-gRPC/go-bindings/dcs/v0/srs";
service SrsService {
// Synthesize text to speech and transmit it over SRS. By default, this blocks until a
// transmission completed (unless `async` is set to `true`). This can be used to prevent
// transmission to overlap each other, by not sending another transmission on the same frequency
// until you've received the response from the previous transmission on that frequency. However,
// it does not block or prevent any other client from transmitting over the same frequency at the
// same time.
rpc Transmit(TransmitRequest) returns (TransmitResponse) {}
// Retrieve a list of units (players) and their active frequencies that are connected to SRS.
rpc GetClients(GetClientsRequest) returns (GetClientsResponse) {}
}
message TransmitRequest {
// The text that is synthesized to speech and transmitted to SRS. Supports SSML tags (you should
// not wrap the text in the root `<speak>` tag though).
string ssml = 1;
// The plain text without any transformations made to it for the purpose of getting it spoken out
// as desired (no SSML tags, no FOUR NINER instead of 49, ...). Even though this field is
// optional, please consider providing it as it can be used to display the spoken text to players
// with hearing impairments.
optional string plaintext = 2;
// The radio frequency in Hz the transmission is send to. Example: 251000000
// for 251.00MHz.
uint64 frequency = 3;
// Name of the SRS client. Defaults to "DCS-gRPC".
optional string srs_client_name = 4;
// The origin of the transmission. Relevant if the SRS server has "Line of
// Sight" and/or "Distance Limit" enabled.
dcs.common.v0.InputPosition position = 5;
// The coalition of the transmission. Relevant if the SRS server has "Secure
// Coalition Radios" enabled. Only Blue and Red are supported, all other
// values will fallback to Spectator.
dcs.common.v0.Coalition coalition = 6;
// Whether to keep the request open until the whole transmission was sent. If
// enabled, you can send the next transmission after you've received the
// response for the previous one and be sure that they don't overlap (talk
// over each other). If disabled, you'll receive a response right away (kind
// of fire and forget). You can use the returned duration as a spacing between
// TTS requests to prevent the overlap of multiple playbacks yourself.
bool async =7;
message Aws {
// The voice the text is synthesized in, see:
// https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
optional string voice = 1;
}
message Azure {
// The voice the text is synthesized in, see:
// https://learn.microsoft.com/azure/cognitive-services/speech-service/language-support
optional string voice = 1;
}
message GCloud {
// The voice the text is synthesized in, see:
// https://cloud.google.com/text-to-speech/docs/voices
optional string voice = 1;
}
message Windows {
// The voice the text is synthesized in.
optional string voice = 1;
}
// Optional TTS provider to be use. Defaults to the one configured in your
// config or to Windows' built-in TTS.
oneof provider {
Aws aws = 8;
Azure azure = 9;
GCloud gcloud = 10;
Windows win = 11;
}
}
message TransmitResponse {
// The duration in milliseconds it roughly takes to speak the transmission.
uint32 duration_ms = 1;
}
message GetClientsRequest {
}
message GetClientsResponse {
message Client {
// The unit that is connected to SRS.
dcs.common.v0.Unit unit = 1;
// The radio frequencies in Hz the unit is connected to.
repeated uint64 frequencies = 2;
}
repeated Client clients = 1;
}