Documentation ¶
Index ¶
- Variables
- func RegisterNsServer(s grpc.ServiceRegistrar, srv NsServer)
- type NsClient
- type NsServer
- type Ns_StreamingSuppressClient
- type Ns_StreamingSuppressServer
- type StreamingSuppressRequest
- func (*StreamingSuppressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingSuppressRequest) GetAudioContent() []byte
- func (x *StreamingSuppressRequest) GetRequestSequence() uint64
- func (x *StreamingSuppressRequest) GetRequestTime() *timestamppb.Timestamp
- func (x *StreamingSuppressRequest) GetStreamingConfig() *StreamingSuppressionConfig
- func (m *StreamingSuppressRequest) GetStreamingRequest() isStreamingSuppressRequest_StreamingRequest
- func (*StreamingSuppressRequest) ProtoMessage()
- func (x *StreamingSuppressRequest) ProtoReflect() protoreflect.Message
- func (x *StreamingSuppressRequest) Reset()
- func (x *StreamingSuppressRequest) String() string
- type StreamingSuppressRequest_AudioContent
- type StreamingSuppressRequest_StreamingConfig
- type StreamingSuppressResponse
- func (*StreamingSuppressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingSuppressResponse) GetError() *status.Status
- func (x *StreamingSuppressResponse) GetResults() []*StreamingSuppressionResult
- func (*StreamingSuppressResponse) ProtoMessage()
- func (x *StreamingSuppressResponse) ProtoReflect() protoreflect.Message
- func (x *StreamingSuppressResponse) Reset()
- func (x *StreamingSuppressResponse) String() string
- type StreamingSuppressionConfig
- func (*StreamingSuppressionConfig) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingSuppressionConfig) GetAudioContentBytesOfEachResponse() int32
- func (x *StreamingSuppressionConfig) GetConfig() *SuppressionConfig
- func (*StreamingSuppressionConfig) ProtoMessage()
- func (x *StreamingSuppressionConfig) ProtoReflect() protoreflect.Message
- func (x *StreamingSuppressionConfig) Reset()
- func (x *StreamingSuppressionConfig) String() string
- type StreamingSuppressionResult
- func (*StreamingSuppressionResult) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingSuppressionResult) GetAudioContent() []byte
- func (x *StreamingSuppressionResult) GetResponseSequence() uint64
- func (x *StreamingSuppressionResult) GetResponseTime() *timestamppb.Timestamp
- func (*StreamingSuppressionResult) ProtoMessage()
- func (x *StreamingSuppressionResult) ProtoReflect() protoreflect.Message
- func (x *StreamingSuppressionResult) Reset()
- func (x *StreamingSuppressionResult) String() string
- type SuppressionConfig
- func (*SuppressionConfig) Descriptor() ([]byte, []int)deprecated
- func (x *SuppressionConfig) GetEncodingIn() SuppressionConfig_AudioEncoding
- func (x *SuppressionConfig) GetEncodingOut() SuppressionConfig_AudioEncoding
- func (x *SuppressionConfig) GetModel() string
- func (x *SuppressionConfig) GetUid() string
- func (*SuppressionConfig) ProtoMessage()
- func (x *SuppressionConfig) ProtoReflect() protoreflect.Message
- func (x *SuppressionConfig) Reset()
- func (x *SuppressionConfig) String() string
- type SuppressionConfig_AudioEncoding
- func (SuppressionConfig_AudioEncoding) Descriptor() protoreflect.EnumDescriptor
- func (x SuppressionConfig_AudioEncoding) Enum() *SuppressionConfig_AudioEncoding
- func (SuppressionConfig_AudioEncoding) EnumDescriptor() ([]byte, []int)deprecated
- func (x SuppressionConfig_AudioEncoding) Number() protoreflect.EnumNumber
- func (x SuppressionConfig_AudioEncoding) String() string
- func (SuppressionConfig_AudioEncoding) Type() protoreflect.EnumType
- type UnimplementedNsServer
- type UnsafeNsServer
Constants ¶
This section is empty.
Variables ¶
var ( SuppressionConfig_AudioEncoding_name = map[int32]string{ 0: "ENCODING_UNSPECIFIED", 1: "LINEAR16", } SuppressionConfig_AudioEncoding_value = map[string]int32{ "ENCODING_UNSPECIFIED": 0, "LINEAR16": 1, } )
Enum value maps for SuppressionConfig_AudioEncoding.
var File_sogou_speech_ns_v1_ns_proto protoreflect.FileDescriptor
var Ns_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sogou.speech.ns.v1.ns", HandlerType: (*NsServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamingSuppress", Handler: _Ns_StreamingSuppress_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "sogou/speech/ns/v1/ns.proto", }
Ns_ServiceDesc is the grpc.ServiceDesc for Ns service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNsServer ¶
func RegisterNsServer(s grpc.ServiceRegistrar, srv NsServer)
Types ¶
type NsClient ¶
type NsClient interface {
StreamingSuppress(ctx context.Context, opts ...grpc.CallOption) (Ns_StreamingSuppressClient, error)
}
NsClient is the client API for Ns service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewNsClient ¶
func NewNsClient(cc grpc.ClientConnInterface) NsClient
type NsServer ¶
type NsServer interface { StreamingSuppress(Ns_StreamingSuppressServer) error // contains filtered or unexported methods }
NsServer is the server API for Ns service. All implementations must embed UnimplementedNsServer for forward compatibility
type Ns_StreamingSuppressClient ¶
type Ns_StreamingSuppressClient interface { Send(*StreamingSuppressRequest) error Recv() (*StreamingSuppressResponse, error) grpc.ClientStream }
type Ns_StreamingSuppressServer ¶
type Ns_StreamingSuppressServer interface { Send(*StreamingSuppressResponse) error Recv() (*StreamingSuppressRequest, error) grpc.ServerStream }
type StreamingSuppressRequest ¶
type StreamingSuppressRequest struct { // *Required* The streaming request, which is either a streaming config or audio content. // // Types that are assignable to StreamingRequest: // *StreamingSuppressRequest_StreamingConfig // *StreamingSuppressRequest_AudioContent StreamingRequest isStreamingSuppressRequest_StreamingRequest `protobuf_oneof:"streaming_request"` // *Optional* The sequence number of the request // It must be specified through all streaming requests including the config request // incremented by one each time, ** STARTING FROM 0 ** RequestSequence uint64 `protobuf:"varint,3,opt,name=request_sequence,json=requestSequence,proto3" json:"request_sequence,omitempty"` // *Optional* The timestamp when the request will be sending RequestTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"` // contains filtered or unexported fields }
The top-level message sent by the client for the `StreamingSuppress` method. Multiple `StreamingSuppressRequest` messages are sent. The first message must contain a `streaming_config` message and must not contain `audio_content` data. All subsequent messages must contain `audio_content` data and must NOT contain a `streaming_config` message.
func (*StreamingSuppressRequest) Descriptor
deprecated
func (*StreamingSuppressRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSuppressRequest.ProtoReflect.Descriptor instead.
func (*StreamingSuppressRequest) GetAudioContent ¶
func (x *StreamingSuppressRequest) GetAudioContent() []byte
func (*StreamingSuppressRequest) GetRequestSequence ¶
func (x *StreamingSuppressRequest) GetRequestSequence() uint64
func (*StreamingSuppressRequest) GetRequestTime ¶
func (x *StreamingSuppressRequest) GetRequestTime() *timestamppb.Timestamp
func (*StreamingSuppressRequest) GetStreamingConfig ¶
func (x *StreamingSuppressRequest) GetStreamingConfig() *StreamingSuppressionConfig
func (*StreamingSuppressRequest) GetStreamingRequest ¶
func (m *StreamingSuppressRequest) GetStreamingRequest() isStreamingSuppressRequest_StreamingRequest
func (*StreamingSuppressRequest) ProtoMessage ¶
func (*StreamingSuppressRequest) ProtoMessage()
func (*StreamingSuppressRequest) ProtoReflect ¶
func (x *StreamingSuppressRequest) ProtoReflect() protoreflect.Message
func (*StreamingSuppressRequest) Reset ¶
func (x *StreamingSuppressRequest) Reset()
func (*StreamingSuppressRequest) String ¶
func (x *StreamingSuppressRequest) String() string
type StreamingSuppressRequest_AudioContent ¶
type StreamingSuppressRequest_AudioContent struct { // The audio data to be suppressed. Sequential chunks of audio data are sent // in sequential `StreamingSuppressRequest` messages. The first // `StreamingSuppressRequest` message must not contain `audio_content` data // and all subsequent `StreamingSuppressRequest` messages must contain // `audio_content` data. AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"` }
type StreamingSuppressRequest_StreamingConfig ¶
type StreamingSuppressRequest_StreamingConfig struct { // Provides information to the suppressor that specifies how to process the // request. The first `StreamingSuppressRequest` message must contain a // `streaming_config` message. StreamingConfig *StreamingSuppressionConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"` }
type StreamingSuppressResponse ¶
type StreamingSuppressResponse struct { // *Output-only* If set, returns a [google.rpc.Status] message that // specifies the error for the operation. // NOTICE: this field is used for websocket / http2-multipart-stream protocol // to return error on the end of the response stream. // gRPC protocol will NEVER use it, it will return error status directly from method instead. Error *status.Status `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // *Output-only* This repeated list contains zero or more results that // correspond to consecutive portions of the audio currently being processed. Results []*StreamingSuppressionResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
`StreamingSuppressResponse` is the only message returned to the client by `StreamingSuppress`. A series of zero or more `StreamingSuppressResponse` messages are streamed back to the client. Suppressed audio slice will be filled in each response.
func (*StreamingSuppressResponse) Descriptor
deprecated
func (*StreamingSuppressResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSuppressResponse.ProtoReflect.Descriptor instead.
func (*StreamingSuppressResponse) GetError ¶
func (x *StreamingSuppressResponse) GetError() *status.Status
func (*StreamingSuppressResponse) GetResults ¶
func (x *StreamingSuppressResponse) GetResults() []*StreamingSuppressionResult
func (*StreamingSuppressResponse) ProtoMessage ¶
func (*StreamingSuppressResponse) ProtoMessage()
func (*StreamingSuppressResponse) ProtoReflect ¶
func (x *StreamingSuppressResponse) ProtoReflect() protoreflect.Message
func (*StreamingSuppressResponse) Reset ¶
func (x *StreamingSuppressResponse) Reset()
func (*StreamingSuppressResponse) String ¶
func (x *StreamingSuppressResponse) String() string
type StreamingSuppressionConfig ¶
type StreamingSuppressionConfig struct { // *Required* Provides information to the suppressor that specifies how to // process the request. Config *SuppressionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // *Optional* If non-zero value specified, the audio_content of each // `StreamingSuppressionResult` in `StreamingSuppressResponse` will guaranteed to be // the specified bytes, except the last one. AudioContentBytesOfEachResponse int32 `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
Provides information to the suppressor that specifies how to process the request.
func (*StreamingSuppressionConfig) Descriptor
deprecated
func (*StreamingSuppressionConfig) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSuppressionConfig.ProtoReflect.Descriptor instead.
func (*StreamingSuppressionConfig) GetAudioContentBytesOfEachResponse ¶
func (x *StreamingSuppressionConfig) GetAudioContentBytesOfEachResponse() int32
func (*StreamingSuppressionConfig) GetConfig ¶
func (x *StreamingSuppressionConfig) GetConfig() *SuppressionConfig
func (*StreamingSuppressionConfig) ProtoMessage ¶
func (*StreamingSuppressionConfig) ProtoMessage()
func (*StreamingSuppressionConfig) ProtoReflect ¶
func (x *StreamingSuppressionConfig) ProtoReflect() protoreflect.Message
func (*StreamingSuppressionConfig) Reset ¶
func (x *StreamingSuppressionConfig) Reset()
func (*StreamingSuppressionConfig) String ¶
func (x *StreamingSuppressionConfig) String() string
type StreamingSuppressionResult ¶
type StreamingSuppressionResult struct { // *Output-only* a portion of the audio that is currently being processed. // It will be the encoding specified by corresponding request config. AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"` // *Optional* The sequence number of the response // It must be specified through all streaming results // incremented by one each time, ** STARTING FROM 1 ** ResponseSequence uint64 `protobuf:"varint,3,opt,name=response_sequence,json=responseSequence,proto3" json:"response_sequence,omitempty"` // *Optional* The timestamp when the response will be sending ResponseTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"` // contains filtered or unexported fields }
A streaming suppression result corresponding to a portion of the audio that is currently being processed.
func (*StreamingSuppressionResult) Descriptor
deprecated
func (*StreamingSuppressionResult) Descriptor() ([]byte, []int)
Deprecated: Use StreamingSuppressionResult.ProtoReflect.Descriptor instead.
func (*StreamingSuppressionResult) GetAudioContent ¶
func (x *StreamingSuppressionResult) GetAudioContent() []byte
func (*StreamingSuppressionResult) GetResponseSequence ¶
func (x *StreamingSuppressionResult) GetResponseSequence() uint64
func (*StreamingSuppressionResult) GetResponseTime ¶
func (x *StreamingSuppressionResult) GetResponseTime() *timestamppb.Timestamp
func (*StreamingSuppressionResult) ProtoMessage ¶
func (*StreamingSuppressionResult) ProtoMessage()
func (*StreamingSuppressionResult) ProtoReflect ¶
func (x *StreamingSuppressionResult) ProtoReflect() protoreflect.Message
func (*StreamingSuppressionResult) Reset ¶
func (x *StreamingSuppressionResult) Reset()
func (*StreamingSuppressionResult) String ¶
func (x *StreamingSuppressionResult) String() string
type SuppressionConfig ¶
type SuppressionConfig struct { // *Required* Encoding of audio data sent IN all suppression request messages. EncodingIn SuppressionConfig_AudioEncoding `` /* 148-byte string literal not displayed */ // *Required* Expected encoding of audio data FROM all suppression response messages. EncodingOut SuppressionConfig_AudioEncoding `` /* 151-byte string literal not displayed */ // *Optional* Which model to select for the given request. Select the model // best suited to your domain to get best results. If a model is not // explicitly specified, "default" model is used. Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` // *Optional* Obfuscated ID of request, to identify number of unique requests using the service. Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
Provides information to the suppressor that specifies how to process the request.
func (*SuppressionConfig) Descriptor
deprecated
func (*SuppressionConfig) Descriptor() ([]byte, []int)
Deprecated: Use SuppressionConfig.ProtoReflect.Descriptor instead.
func (*SuppressionConfig) GetEncodingIn ¶
func (x *SuppressionConfig) GetEncodingIn() SuppressionConfig_AudioEncoding
func (*SuppressionConfig) GetEncodingOut ¶
func (x *SuppressionConfig) GetEncodingOut() SuppressionConfig_AudioEncoding
func (*SuppressionConfig) GetModel ¶
func (x *SuppressionConfig) GetModel() string
func (*SuppressionConfig) GetUid ¶
func (x *SuppressionConfig) GetUid() string
func (*SuppressionConfig) ProtoMessage ¶
func (*SuppressionConfig) ProtoMessage()
func (*SuppressionConfig) ProtoReflect ¶
func (x *SuppressionConfig) ProtoReflect() protoreflect.Message
func (*SuppressionConfig) Reset ¶
func (x *SuppressionConfig) Reset()
func (*SuppressionConfig) String ¶
func (x *SuppressionConfig) String() string
type SuppressionConfig_AudioEncoding ¶
type SuppressionConfig_AudioEncoding int32
Audio encoding of the data sent in the audio message. All encodings support only 1 channel (mono) audio.
const ( // Not specified. Will return result status equal to http 400 Bad Request. SuppressionConfig_ENCODING_UNSPECIFIED SuppressionConfig_AudioEncoding = 0 // Uncompressed 16-bit signed little-endian samples (Linear PCM). // `sample_rate_hertz` must be 16000. SuppressionConfig_LINEAR16 SuppressionConfig_AudioEncoding = 1 )
func (SuppressionConfig_AudioEncoding) Descriptor ¶
func (SuppressionConfig_AudioEncoding) Descriptor() protoreflect.EnumDescriptor
func (SuppressionConfig_AudioEncoding) Enum ¶
func (x SuppressionConfig_AudioEncoding) Enum() *SuppressionConfig_AudioEncoding
func (SuppressionConfig_AudioEncoding) EnumDescriptor
deprecated
func (SuppressionConfig_AudioEncoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use SuppressionConfig_AudioEncoding.Descriptor instead.
func (SuppressionConfig_AudioEncoding) Number ¶
func (x SuppressionConfig_AudioEncoding) Number() protoreflect.EnumNumber
func (SuppressionConfig_AudioEncoding) String ¶
func (x SuppressionConfig_AudioEncoding) String() string
func (SuppressionConfig_AudioEncoding) Type ¶
func (SuppressionConfig_AudioEncoding) Type() protoreflect.EnumType
type UnimplementedNsServer ¶
type UnimplementedNsServer struct { }
UnimplementedNsServer must be embedded to have forward compatible implementations.
func (UnimplementedNsServer) StreamingSuppress ¶
func (UnimplementedNsServer) StreamingSuppress(Ns_StreamingSuppressServer) error
type UnsafeNsServer ¶
type UnsafeNsServer interface {
// contains filtered or unexported methods
}
UnsafeNsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NsServer will result in compilation errors.