Documentation ¶
Index ¶
- Variables
- func RegisterSpeechTranslationServiceServer(s *grpc.Server, srv SpeechTranslationServiceServer)
- type SpeechTranslationServiceClient
- type SpeechTranslationServiceServer
- type SpeechTranslationService_StreamingTranslateSpeechClient
- type SpeechTranslationService_StreamingTranslateSpeechServer
- type StreamingTranslateSpeechConfig
- func (*StreamingTranslateSpeechConfig) Descriptor() ([]byte, []int)
- func (m *StreamingTranslateSpeechConfig) GetAudioConfig() *TranslateSpeechConfig
- func (m *StreamingTranslateSpeechConfig) GetSingleUtterance() bool
- func (*StreamingTranslateSpeechConfig) ProtoMessage()
- func (m *StreamingTranslateSpeechConfig) Reset()
- func (m *StreamingTranslateSpeechConfig) String() string
- func (m *StreamingTranslateSpeechConfig) XXX_DiscardUnknown()
- func (m *StreamingTranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamingTranslateSpeechConfig) XXX_Merge(src proto.Message)
- func (m *StreamingTranslateSpeechConfig) XXX_Size() int
- func (m *StreamingTranslateSpeechConfig) XXX_Unmarshal(b []byte) error
- type StreamingTranslateSpeechRequest
- func (*StreamingTranslateSpeechRequest) Descriptor() ([]byte, []int)
- func (m *StreamingTranslateSpeechRequest) GetAudioContent() []byte
- func (m *StreamingTranslateSpeechRequest) GetStreamingConfig() *StreamingTranslateSpeechConfig
- func (m *StreamingTranslateSpeechRequest) GetStreamingRequest() isStreamingTranslateSpeechRequest_StreamingRequest
- func (*StreamingTranslateSpeechRequest) ProtoMessage()
- func (m *StreamingTranslateSpeechRequest) Reset()
- func (m *StreamingTranslateSpeechRequest) String() string
- func (m *StreamingTranslateSpeechRequest) XXX_DiscardUnknown()
- func (m *StreamingTranslateSpeechRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamingTranslateSpeechRequest) XXX_Merge(src proto.Message)
- func (*StreamingTranslateSpeechRequest) XXX_OneofWrappers() []interface{}
- func (m *StreamingTranslateSpeechRequest) XXX_Size() int
- func (m *StreamingTranslateSpeechRequest) XXX_Unmarshal(b []byte) error
- type StreamingTranslateSpeechRequest_AudioContent
- type StreamingTranslateSpeechRequest_StreamingConfig
- type StreamingTranslateSpeechResponse
- func (*StreamingTranslateSpeechResponse) Descriptor() ([]byte, []int)
- func (m *StreamingTranslateSpeechResponse) GetError() *status.Status
- func (m *StreamingTranslateSpeechResponse) GetResult() *StreamingTranslateSpeechResult
- func (m *StreamingTranslateSpeechResponse) GetSpeechEventType() StreamingTranslateSpeechResponse_SpeechEventType
- func (*StreamingTranslateSpeechResponse) ProtoMessage()
- func (m *StreamingTranslateSpeechResponse) Reset()
- func (m *StreamingTranslateSpeechResponse) String() string
- func (m *StreamingTranslateSpeechResponse) XXX_DiscardUnknown()
- func (m *StreamingTranslateSpeechResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamingTranslateSpeechResponse) XXX_Merge(src proto.Message)
- func (m *StreamingTranslateSpeechResponse) XXX_Size() int
- func (m *StreamingTranslateSpeechResponse) XXX_Unmarshal(b []byte) error
- type StreamingTranslateSpeechResponse_SpeechEventType
- type StreamingTranslateSpeechResult
- func (*StreamingTranslateSpeechResult) Descriptor() ([]byte, []int)
- func (m *StreamingTranslateSpeechResult) GetRecognitionResult() string
- func (m *StreamingTranslateSpeechResult) GetResult() isStreamingTranslateSpeechResult_Result
- func (m *StreamingTranslateSpeechResult) GetTextTranslationResult() *StreamingTranslateSpeechResult_TextTranslationResult
- func (*StreamingTranslateSpeechResult) ProtoMessage()
- func (m *StreamingTranslateSpeechResult) Reset()
- func (m *StreamingTranslateSpeechResult) String() string
- func (m *StreamingTranslateSpeechResult) XXX_DiscardUnknown()
- func (m *StreamingTranslateSpeechResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamingTranslateSpeechResult) XXX_Merge(src proto.Message)
- func (*StreamingTranslateSpeechResult) XXX_OneofWrappers() []interface{}
- func (m *StreamingTranslateSpeechResult) XXX_Size() int
- func (m *StreamingTranslateSpeechResult) XXX_Unmarshal(b []byte) error
- type StreamingTranslateSpeechResult_TextTranslationResult
- func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor() ([]byte, []int)
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetDetectedSourceLanguageCode() string
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal() bool
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation() string
- func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage()
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) Reset()
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) String() string
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_DiscardUnknown()
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Merge(src proto.Message)
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Size() int
- func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Unmarshal(b []byte) error
- type StreamingTranslateSpeechResult_TextTranslationResult_
- type TranslateSpeechConfig
- func (*TranslateSpeechConfig) Descriptor() ([]byte, []int)
- func (m *TranslateSpeechConfig) GetAlternativeSourceLanguageCodes() []string
- func (m *TranslateSpeechConfig) GetAudioEncoding() string
- func (m *TranslateSpeechConfig) GetModel() string
- func (m *TranslateSpeechConfig) GetSampleRateHertz() int32
- func (m *TranslateSpeechConfig) GetSourceLanguageCode() string
- func (m *TranslateSpeechConfig) GetTargetLanguageCode() string
- func (*TranslateSpeechConfig) ProtoMessage()
- func (m *TranslateSpeechConfig) Reset()
- func (m *TranslateSpeechConfig) String() string
- func (m *TranslateSpeechConfig) XXX_DiscardUnknown()
- func (m *TranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TranslateSpeechConfig) XXX_Merge(src proto.Message)
- func (m *TranslateSpeechConfig) XXX_Size() int
- func (m *TranslateSpeechConfig) XXX_Unmarshal(b []byte) error
- type UnimplementedSpeechTranslationServiceServer
Constants ¶
This section is empty.
Variables ¶
var StreamingTranslateSpeechResponse_SpeechEventType_name = map[int32]string{
0: "SPEECH_EVENT_TYPE_UNSPECIFIED",
1: "END_OF_SINGLE_UTTERANCE",
}
var StreamingTranslateSpeechResponse_SpeechEventType_value = map[string]int32{
"SPEECH_EVENT_TYPE_UNSPECIFIED": 0,
"END_OF_SINGLE_UTTERANCE": 1,
}
Functions ¶
func RegisterSpeechTranslationServiceServer ¶
func RegisterSpeechTranslationServiceServer(s *grpc.Server, srv SpeechTranslationServiceServer)
Types ¶
type SpeechTranslationServiceClient ¶
type SpeechTranslationServiceClient interface { // Performs bidirectional streaming speech translation: receive results while // sending audio. This method is only available via the gRPC API (not REST). StreamingTranslateSpeech(ctx context.Context, opts ...grpc.CallOption) (SpeechTranslationService_StreamingTranslateSpeechClient, error) }
SpeechTranslationServiceClient is the client API for SpeechTranslationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSpeechTranslationServiceClient ¶
func NewSpeechTranslationServiceClient(cc grpc.ClientConnInterface) SpeechTranslationServiceClient
type SpeechTranslationServiceServer ¶
type SpeechTranslationServiceServer interface { // Performs bidirectional streaming speech translation: receive results while // sending audio. This method is only available via the gRPC API (not REST). StreamingTranslateSpeech(SpeechTranslationService_StreamingTranslateSpeechServer) error }
SpeechTranslationServiceServer is the server API for SpeechTranslationService service.
type SpeechTranslationService_StreamingTranslateSpeechClient ¶
type SpeechTranslationService_StreamingTranslateSpeechClient interface { Send(*StreamingTranslateSpeechRequest) error Recv() (*StreamingTranslateSpeechResponse, error) grpc.ClientStream }
type SpeechTranslationService_StreamingTranslateSpeechServer ¶
type SpeechTranslationService_StreamingTranslateSpeechServer interface { Send(*StreamingTranslateSpeechResponse) error Recv() (*StreamingTranslateSpeechRequest, error) grpc.ServerStream }
type StreamingTranslateSpeechConfig ¶
type StreamingTranslateSpeechConfig struct { // Required. The common config for all the following audio contents. AudioConfig *TranslateSpeechConfig `protobuf:"bytes,1,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"` // Optional. If `false` or omitted, the system performs // continuous translation (continuing to wait for and process audio even if // the user pauses speaking) until the client closes the input stream (gRPC // API) or until the maximum time limit has been reached. May return multiple // `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. // // If `true`, the speech translator will detect a single spoken utterance. // When it detects that the user has paused or stopped speaking, it will // return an `END_OF_SINGLE_UTTERANCE` event and cease translation. // When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should // stop sending the requests. However, clients should keep receiving remaining // responses until the stream is terminated. To construct the complete // sentence in a streaming way, one should override (if 'is_final' of previous // response is false), or append (if 'is_final' of previous response is true). SingleUtterance bool `protobuf:"varint,2,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Config used for streaming translation.
func (*StreamingTranslateSpeechConfig) Descriptor ¶
func (*StreamingTranslateSpeechConfig) Descriptor() ([]byte, []int)
func (*StreamingTranslateSpeechConfig) GetAudioConfig ¶
func (m *StreamingTranslateSpeechConfig) GetAudioConfig() *TranslateSpeechConfig
func (*StreamingTranslateSpeechConfig) GetSingleUtterance ¶
func (m *StreamingTranslateSpeechConfig) GetSingleUtterance() bool
func (*StreamingTranslateSpeechConfig) ProtoMessage ¶
func (*StreamingTranslateSpeechConfig) ProtoMessage()
func (*StreamingTranslateSpeechConfig) Reset ¶
func (m *StreamingTranslateSpeechConfig) Reset()
func (*StreamingTranslateSpeechConfig) String ¶
func (m *StreamingTranslateSpeechConfig) String() string
func (*StreamingTranslateSpeechConfig) XXX_DiscardUnknown ¶
func (m *StreamingTranslateSpeechConfig) XXX_DiscardUnknown()
func (*StreamingTranslateSpeechConfig) XXX_Marshal ¶
func (m *StreamingTranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamingTranslateSpeechConfig) XXX_Merge ¶
func (m *StreamingTranslateSpeechConfig) XXX_Merge(src proto.Message)
func (*StreamingTranslateSpeechConfig) XXX_Size ¶
func (m *StreamingTranslateSpeechConfig) XXX_Size() int
func (*StreamingTranslateSpeechConfig) XXX_Unmarshal ¶
func (m *StreamingTranslateSpeechConfig) XXX_Unmarshal(b []byte) error
type StreamingTranslateSpeechRequest ¶
type StreamingTranslateSpeechRequest struct { // The streaming request, which is either a streaming config or content. // // Types that are valid to be assigned to StreamingRequest: // *StreamingTranslateSpeechRequest_StreamingConfig // *StreamingTranslateSpeechRequest_AudioContent StreamingRequest isStreamingTranslateSpeechRequest_StreamingRequest `protobuf_oneof:"streaming_request"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The top-level message sent by the client for the `StreamingTranslateSpeech` method. Multiple `StreamingTranslateSpeechRequest` 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 (*StreamingTranslateSpeechRequest) Descriptor ¶
func (*StreamingTranslateSpeechRequest) Descriptor() ([]byte, []int)
func (*StreamingTranslateSpeechRequest) GetAudioContent ¶
func (m *StreamingTranslateSpeechRequest) GetAudioContent() []byte
func (*StreamingTranslateSpeechRequest) GetStreamingConfig ¶
func (m *StreamingTranslateSpeechRequest) GetStreamingConfig() *StreamingTranslateSpeechConfig
func (*StreamingTranslateSpeechRequest) GetStreamingRequest ¶
func (m *StreamingTranslateSpeechRequest) GetStreamingRequest() isStreamingTranslateSpeechRequest_StreamingRequest
func (*StreamingTranslateSpeechRequest) ProtoMessage ¶
func (*StreamingTranslateSpeechRequest) ProtoMessage()
func (*StreamingTranslateSpeechRequest) Reset ¶
func (m *StreamingTranslateSpeechRequest) Reset()
func (*StreamingTranslateSpeechRequest) String ¶
func (m *StreamingTranslateSpeechRequest) String() string
func (*StreamingTranslateSpeechRequest) XXX_DiscardUnknown ¶
func (m *StreamingTranslateSpeechRequest) XXX_DiscardUnknown()
func (*StreamingTranslateSpeechRequest) XXX_Marshal ¶
func (m *StreamingTranslateSpeechRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamingTranslateSpeechRequest) XXX_Merge ¶
func (m *StreamingTranslateSpeechRequest) XXX_Merge(src proto.Message)
func (*StreamingTranslateSpeechRequest) XXX_OneofWrappers ¶
func (*StreamingTranslateSpeechRequest) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*StreamingTranslateSpeechRequest) XXX_Size ¶
func (m *StreamingTranslateSpeechRequest) XXX_Size() int
func (*StreamingTranslateSpeechRequest) XXX_Unmarshal ¶
func (m *StreamingTranslateSpeechRequest) XXX_Unmarshal(b []byte) error
type StreamingTranslateSpeechRequest_AudioContent ¶
type StreamingTranslateSpeechRequest_AudioContent struct {
AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"`
}
type StreamingTranslateSpeechRequest_StreamingConfig ¶
type StreamingTranslateSpeechRequest_StreamingConfig struct {
StreamingConfig *StreamingTranslateSpeechConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"`
}
type StreamingTranslateSpeechResponse ¶
type StreamingTranslateSpeechResponse struct { // Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that // specifies the error for the operation. Error *status.Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // Output only. The translation result that is currently being processed (is_final could be // true or false). Result *StreamingTranslateSpeechResult `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` // Output only. Indicates the type of speech event. SpeechEventType StreamingTranslateSpeechResponse_SpeechEventType `` /* 201-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A streaming speech translation response corresponding to a portion of the audio currently processed.
func (*StreamingTranslateSpeechResponse) Descriptor ¶
func (*StreamingTranslateSpeechResponse) Descriptor() ([]byte, []int)
func (*StreamingTranslateSpeechResponse) GetError ¶
func (m *StreamingTranslateSpeechResponse) GetError() *status.Status
func (*StreamingTranslateSpeechResponse) GetResult ¶
func (m *StreamingTranslateSpeechResponse) GetResult() *StreamingTranslateSpeechResult
func (*StreamingTranslateSpeechResponse) GetSpeechEventType ¶
func (m *StreamingTranslateSpeechResponse) GetSpeechEventType() StreamingTranslateSpeechResponse_SpeechEventType
func (*StreamingTranslateSpeechResponse) ProtoMessage ¶
func (*StreamingTranslateSpeechResponse) ProtoMessage()
func (*StreamingTranslateSpeechResponse) Reset ¶
func (m *StreamingTranslateSpeechResponse) Reset()
func (*StreamingTranslateSpeechResponse) String ¶
func (m *StreamingTranslateSpeechResponse) String() string
func (*StreamingTranslateSpeechResponse) XXX_DiscardUnknown ¶
func (m *StreamingTranslateSpeechResponse) XXX_DiscardUnknown()
func (*StreamingTranslateSpeechResponse) XXX_Marshal ¶
func (m *StreamingTranslateSpeechResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamingTranslateSpeechResponse) XXX_Merge ¶
func (m *StreamingTranslateSpeechResponse) XXX_Merge(src proto.Message)
func (*StreamingTranslateSpeechResponse) XXX_Size ¶
func (m *StreamingTranslateSpeechResponse) XXX_Size() int
func (*StreamingTranslateSpeechResponse) XXX_Unmarshal ¶
func (m *StreamingTranslateSpeechResponse) XXX_Unmarshal(b []byte) error
type StreamingTranslateSpeechResponse_SpeechEventType ¶
type StreamingTranslateSpeechResponse_SpeechEventType int32
Indicates the type of speech event.
const ( // No speech event specified. StreamingTranslateSpeechResponse_SPEECH_EVENT_TYPE_UNSPECIFIED StreamingTranslateSpeechResponse_SpeechEventType = 0 // This event indicates that the server has detected the end of the user's // speech utterance and expects no additional speech. Therefore, the server // will not process additional audio (although it may subsequently return // additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' // event, the client should stop sending the requests. However, clients // should keep receiving remaining responses until the stream is terminated. // To construct the complete sentence in a streaming way, one should // override (if 'is_final' of previous response is false), or append (if // 'is_final' of previous response is true). This event is only sent if // `single_utterance` was set to `true`, and is not used otherwise. StreamingTranslateSpeechResponse_END_OF_SINGLE_UTTERANCE StreamingTranslateSpeechResponse_SpeechEventType = 1 )
func (StreamingTranslateSpeechResponse_SpeechEventType) EnumDescriptor ¶
func (StreamingTranslateSpeechResponse_SpeechEventType) EnumDescriptor() ([]byte, []int)
func (StreamingTranslateSpeechResponse_SpeechEventType) String ¶
func (x StreamingTranslateSpeechResponse_SpeechEventType) String() string
type StreamingTranslateSpeechResult ¶
type StreamingTranslateSpeechResult struct { // Translation result. // // Use oneof field to reserve for future tts result. // // Types that are valid to be assigned to Result: // *StreamingTranslateSpeechResult_TextTranslationResult_ Result isStreamingTranslateSpeechResult_Result `protobuf_oneof:"result"` // Output only. The debug only recognition result in original language. This field is debug // only and will be set to empty string if not available. // This is implementation detail and will not be backward compatible. // // Still need to decide whether to expose this field by default. RecognitionResult string `protobuf:"bytes,3,opt,name=recognition_result,json=recognitionResult,proto3" json:"recognition_result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A streaming speech translation result corresponding to a portion of the audio that is currently being processed.
func (*StreamingTranslateSpeechResult) Descriptor ¶
func (*StreamingTranslateSpeechResult) Descriptor() ([]byte, []int)
func (*StreamingTranslateSpeechResult) GetRecognitionResult ¶
func (m *StreamingTranslateSpeechResult) GetRecognitionResult() string
func (*StreamingTranslateSpeechResult) GetResult ¶
func (m *StreamingTranslateSpeechResult) GetResult() isStreamingTranslateSpeechResult_Result
func (*StreamingTranslateSpeechResult) GetTextTranslationResult ¶
func (m *StreamingTranslateSpeechResult) GetTextTranslationResult() *StreamingTranslateSpeechResult_TextTranslationResult
func (*StreamingTranslateSpeechResult) ProtoMessage ¶
func (*StreamingTranslateSpeechResult) ProtoMessage()
func (*StreamingTranslateSpeechResult) Reset ¶
func (m *StreamingTranslateSpeechResult) Reset()
func (*StreamingTranslateSpeechResult) String ¶
func (m *StreamingTranslateSpeechResult) String() string
func (*StreamingTranslateSpeechResult) XXX_DiscardUnknown ¶
func (m *StreamingTranslateSpeechResult) XXX_DiscardUnknown()
func (*StreamingTranslateSpeechResult) XXX_Marshal ¶
func (m *StreamingTranslateSpeechResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamingTranslateSpeechResult) XXX_Merge ¶
func (m *StreamingTranslateSpeechResult) XXX_Merge(src proto.Message)
func (*StreamingTranslateSpeechResult) XXX_OneofWrappers ¶
func (*StreamingTranslateSpeechResult) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*StreamingTranslateSpeechResult) XXX_Size ¶
func (m *StreamingTranslateSpeechResult) XXX_Size() int
func (*StreamingTranslateSpeechResult) XXX_Unmarshal ¶
func (m *StreamingTranslateSpeechResult) XXX_Unmarshal(b []byte) error
type StreamingTranslateSpeechResult_TextTranslationResult ¶
type StreamingTranslateSpeechResult_TextTranslationResult struct { // Output only. The translated sentence. Translation string `protobuf:"bytes,1,opt,name=translation,proto3" json:"translation,omitempty"` // Output only. If `false`, this `StreamingTranslateSpeechResult` represents // an interim result that may change. If `true`, this is the final time the // translation service will return this particular // `StreamingTranslateSpeechResult`, the streaming translator will not // return any further hypotheses for this portion of the transcript and // corresponding audio. IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"` // Output only. The source language code (BCP-47) detected in the audio. Speech // translation result will translate in the most likely language detected // including the alternative source languages and main source_language_code. DetectedSourceLanguageCode string `` /* 143-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Text translation result.
func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor ¶
func (*StreamingTranslateSpeechResult_TextTranslationResult) Descriptor() ([]byte, []int)
func (*StreamingTranslateSpeechResult_TextTranslationResult) GetDetectedSourceLanguageCode ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetDetectedSourceLanguageCode() string
func (*StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetIsFinal() bool
func (*StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) GetTranslation() string
func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage ¶
func (*StreamingTranslateSpeechResult_TextTranslationResult) ProtoMessage()
func (*StreamingTranslateSpeechResult_TextTranslationResult) Reset ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) Reset()
func (*StreamingTranslateSpeechResult_TextTranslationResult) String ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) String() string
func (*StreamingTranslateSpeechResult_TextTranslationResult) XXX_DiscardUnknown ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_DiscardUnknown()
func (*StreamingTranslateSpeechResult_TextTranslationResult) XXX_Marshal ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamingTranslateSpeechResult_TextTranslationResult) XXX_Merge ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Merge(src proto.Message)
func (*StreamingTranslateSpeechResult_TextTranslationResult) XXX_Size ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Size() int
func (*StreamingTranslateSpeechResult_TextTranslationResult) XXX_Unmarshal ¶
func (m *StreamingTranslateSpeechResult_TextTranslationResult) XXX_Unmarshal(b []byte) error
type StreamingTranslateSpeechResult_TextTranslationResult_ ¶
type StreamingTranslateSpeechResult_TextTranslationResult_ struct {
TextTranslationResult *StreamingTranslateSpeechResult_TextTranslationResult `protobuf:"bytes,1,opt,name=text_translation_result,json=textTranslationResult,proto3,oneof"`
}
type TranslateSpeechConfig ¶
type TranslateSpeechConfig struct { // Required. Encoding of audio data. // Supported formats: // // - `linear16` // // Uncompressed 16-bit signed little-endian samples (Linear PCM). // // AudioEncoding string `protobuf:"bytes,1,opt,name=audio_encoding,json=audioEncoding,proto3" json:"audio_encoding,omitempty"` // Required. Source language code (BCP-47) of the input audio. SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"` // Optional. A list of up to 3 additional language codes (BCP-47), listing possible // alternative languages of the supplied audio. If alternative source // languages are listed, speech translation result will translate in the most // likely language detected including the main source_language_code. The // translated result will include the language code of the language detected // in the audio. AlternativeSourceLanguageCodes []string `` /* 155-byte string literal not displayed */ // Required. Target language code (BCP-47) of the output. TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"` // Optional. Sample rate in Hertz of the audio data. Valid values are: // 8000-48000. 16000 is optimal. For best results, set the sampling rate of // the audio source to 16000 Hz. If that's not possible, use the native sample // rate of the audio source (instead of re-sampling). This field can only be // omitted for `FLAC` and `WAV` audio files. SampleRateHertz int32 `protobuf:"varint,4,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // Optional. Model string `protobuf:"bytes,5,opt,name=model,proto3" json:"model,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Provides information to the speech translation that specifies how to process the request.
func (*TranslateSpeechConfig) Descriptor ¶
func (*TranslateSpeechConfig) Descriptor() ([]byte, []int)
func (*TranslateSpeechConfig) GetAlternativeSourceLanguageCodes ¶
func (m *TranslateSpeechConfig) GetAlternativeSourceLanguageCodes() []string
func (*TranslateSpeechConfig) GetAudioEncoding ¶
func (m *TranslateSpeechConfig) GetAudioEncoding() string
func (*TranslateSpeechConfig) GetModel ¶
func (m *TranslateSpeechConfig) GetModel() string
func (*TranslateSpeechConfig) GetSampleRateHertz ¶
func (m *TranslateSpeechConfig) GetSampleRateHertz() int32
func (*TranslateSpeechConfig) GetSourceLanguageCode ¶
func (m *TranslateSpeechConfig) GetSourceLanguageCode() string
func (*TranslateSpeechConfig) GetTargetLanguageCode ¶
func (m *TranslateSpeechConfig) GetTargetLanguageCode() string
func (*TranslateSpeechConfig) ProtoMessage ¶
func (*TranslateSpeechConfig) ProtoMessage()
func (*TranslateSpeechConfig) Reset ¶
func (m *TranslateSpeechConfig) Reset()
func (*TranslateSpeechConfig) String ¶
func (m *TranslateSpeechConfig) String() string
func (*TranslateSpeechConfig) XXX_DiscardUnknown ¶
func (m *TranslateSpeechConfig) XXX_DiscardUnknown()
func (*TranslateSpeechConfig) XXX_Marshal ¶
func (m *TranslateSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TranslateSpeechConfig) XXX_Merge ¶
func (m *TranslateSpeechConfig) XXX_Merge(src proto.Message)
func (*TranslateSpeechConfig) XXX_Size ¶
func (m *TranslateSpeechConfig) XXX_Size() int
func (*TranslateSpeechConfig) XXX_Unmarshal ¶
func (m *TranslateSpeechConfig) XXX_Unmarshal(b []byte) error
type UnimplementedSpeechTranslationServiceServer ¶
type UnimplementedSpeechTranslationServiceServer struct { }
UnimplementedSpeechTranslationServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSpeechTranslationServiceServer) StreamingTranslateSpeech ¶
func (*UnimplementedSpeechTranslationServiceServer) StreamingTranslateSpeech(srv SpeechTranslationService_StreamingTranslateSpeechServer) error