Documentation
¶
Index ¶
- Variables
- func RegisterSpeechToTextServer(s *grpc.Server, srv SpeechToTextServer)
- type AudioEncoding
- func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor
- func (x AudioEncoding) Enum() *AudioEncoding
- func (AudioEncoding) EnumDescriptor() ([]byte, []int)deprecated
- func (x AudioEncoding) Number() protoreflect.EnumNumber
- func (x AudioEncoding) String() string
- func (AudioEncoding) Type() protoreflect.EnumType
- type InterimResultsConfig
- func (*InterimResultsConfig) Descriptor() ([]byte, []int)deprecated
- func (x *InterimResultsConfig) GetEnableInterimResults() bool
- func (x *InterimResultsConfig) GetInterval() float32
- func (*InterimResultsConfig) ProtoMessage()
- func (x *InterimResultsConfig) ProtoReflect() protoreflect.Message
- func (x *InterimResultsConfig) Reset()
- func (x *InterimResultsConfig) String() string
- type RecognitionAudio
- func (*RecognitionAudio) Descriptor() ([]byte, []int)deprecated
- func (m *RecognitionAudio) GetAudioSource() isRecognitionAudio_AudioSource
- func (x *RecognitionAudio) GetContent() []byte
- func (x *RecognitionAudio) GetUri() string
- func (*RecognitionAudio) ProtoMessage()
- func (x *RecognitionAudio) ProtoReflect() protoreflect.Message
- func (x *RecognitionAudio) Reset()
- func (x *RecognitionAudio) String() string
- type RecognitionAudio_Content
- type RecognitionAudio_Uri
- type RecognitionConfig
- func (*RecognitionConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RecognitionConfig) GetDoNotPerformVad() bool
- func (x *RecognitionConfig) GetEnableAutomaticPunctuation() bool
- func (x *RecognitionConfig) GetEnableDenormalization() bool
- func (x *RecognitionConfig) GetEnableGenderIdentification() bool
- func (x *RecognitionConfig) GetEnableSentimentAnalysis() bool
- func (x *RecognitionConfig) GetEncoding() AudioEncoding
- func (x *RecognitionConfig) GetLanguageCode() string
- func (x *RecognitionConfig) GetMaxAlternatives() uint32
- func (x *RecognitionConfig) GetModel() string
- func (x *RecognitionConfig) GetNumChannels() uint32
- func (x *RecognitionConfig) GetProfanityFilter() bool
- func (x *RecognitionConfig) GetSampleRateHertz() uint32
- func (x *RecognitionConfig) GetSpeechContexts() []*SpeechContext
- func (m *RecognitionConfig) GetVad() isRecognitionConfig_Vad
- func (x *RecognitionConfig) GetVadConfig() *VoiceActivityDetectionConfig
- func (*RecognitionConfig) ProtoMessage()
- func (x *RecognitionConfig) ProtoReflect() protoreflect.Message
- func (x *RecognitionConfig) Reset()
- func (x *RecognitionConfig) String() string
- type RecognitionConfig_DoNotPerformVad
- type RecognitionConfig_VadConfig
- type RecognizeRequest
- func (*RecognizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RecognizeRequest) GetAudio() *RecognitionAudio
- func (x *RecognizeRequest) GetConfig() *RecognitionConfig
- func (*RecognizeRequest) ProtoMessage()
- func (x *RecognizeRequest) ProtoReflect() protoreflect.Message
- func (x *RecognizeRequest) Reset()
- func (x *RecognizeRequest) String() string
- type RecognizeResponse
- func (*RecognizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RecognizeResponse) GetResults() []*SpeechRecognitionResult
- func (*RecognizeResponse) ProtoMessage()
- func (x *RecognizeResponse) ProtoReflect() protoreflect.Message
- func (x *RecognizeResponse) Reset()
- func (x *RecognizeResponse) String() string
- type SpeechContext
- type SpeechContextPhrase
- func (*SpeechContextPhrase) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechContextPhrase) GetScore() float32
- func (x *SpeechContextPhrase) GetText() string
- func (*SpeechContextPhrase) ProtoMessage()
- func (x *SpeechContextPhrase) ProtoReflect() protoreflect.Message
- func (x *SpeechContextPhrase) Reset()
- func (x *SpeechContextPhrase) String() string
- type SpeechGenderIdentificationResult
- func (*SpeechGenderIdentificationResult) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechGenderIdentificationResult) GetFemaleProba() float32
- func (x *SpeechGenderIdentificationResult) GetMaleProba() float32
- func (*SpeechGenderIdentificationResult) ProtoMessage()
- func (x *SpeechGenderIdentificationResult) ProtoReflect() protoreflect.Message
- func (x *SpeechGenderIdentificationResult) Reset()
- func (x *SpeechGenderIdentificationResult) String() string
- type SpeechRecognitionAlternative
- func (*SpeechRecognitionAlternative) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechRecognitionAlternative) GetConfidence() float32
- func (x *SpeechRecognitionAlternative) GetTranscript() string
- func (x *SpeechRecognitionAlternative) GetWords() []*WordInfo
- func (*SpeechRecognitionAlternative) ProtoMessage()
- func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message
- func (x *SpeechRecognitionAlternative) Reset()
- func (x *SpeechRecognitionAlternative) String() string
- type SpeechRecognitionResult
- func (*SpeechRecognitionResult) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechRecognitionResult) GetAlternatives() []*SpeechRecognitionAlternative
- func (x *SpeechRecognitionResult) GetChannel() int32
- func (x *SpeechRecognitionResult) GetEndTime() *duration.Duration
- func (x *SpeechRecognitionResult) GetGenderIdentificationResult() *SpeechGenderIdentificationResult
- func (x *SpeechRecognitionResult) GetSentimentAnalysisResult() *SpeechSentimentAnalysisResult
- func (x *SpeechRecognitionResult) GetStartTime() *duration.Duration
- func (*SpeechRecognitionResult) ProtoMessage()
- func (x *SpeechRecognitionResult) ProtoReflect() protoreflect.Message
- func (x *SpeechRecognitionResult) Reset()
- func (x *SpeechRecognitionResult) String() string
- type SpeechSentimentAnalysisResult
- func (*SpeechSentimentAnalysisResult) Descriptor() ([]byte, []int)deprecated
- func (x *SpeechSentimentAnalysisResult) GetNegativeProbAudio() float32
- func (x *SpeechSentimentAnalysisResult) GetNegativeProbAudioText() float32
- func (*SpeechSentimentAnalysisResult) ProtoMessage()
- func (x *SpeechSentimentAnalysisResult) ProtoReflect() protoreflect.Message
- func (x *SpeechSentimentAnalysisResult) Reset()
- func (x *SpeechSentimentAnalysisResult) String() string
- type SpeechToTextClient
- type SpeechToTextServer
- type SpeechToText_StreamingRecognizeClient
- type SpeechToText_StreamingRecognizeServer
- type StreamingRecognitionConfig
- func (*StreamingRecognitionConfig) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingRecognitionConfig) GetConfig() *RecognitionConfig
- func (x *StreamingRecognitionConfig) GetInterimResultsConfig() *InterimResultsConfig
- func (x *StreamingRecognitionConfig) GetSingleUtterance() bool
- func (*StreamingRecognitionConfig) ProtoMessage()
- func (x *StreamingRecognitionConfig) ProtoReflect() protoreflect.Message
- func (x *StreamingRecognitionConfig) Reset()
- func (x *StreamingRecognitionConfig) String() string
- type StreamingRecognitionResult
- func (*StreamingRecognitionResult) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingRecognitionResult) GetIsFinal() bool
- func (x *StreamingRecognitionResult) GetRecognitionResult() *SpeechRecognitionResult
- func (x *StreamingRecognitionResult) GetStability() float32
- func (*StreamingRecognitionResult) ProtoMessage()
- func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message
- func (x *StreamingRecognitionResult) Reset()
- func (x *StreamingRecognitionResult) String() string
- type StreamingRecognizeRequest
- func (*StreamingRecognizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingRecognizeRequest) GetAudioContent() []byte
- func (x *StreamingRecognizeRequest) GetStreamingConfig() *StreamingRecognitionConfig
- func (m *StreamingRecognizeRequest) GetStreamingRequest() isStreamingRecognizeRequest_StreamingRequest
- func (*StreamingRecognizeRequest) ProtoMessage()
- func (x *StreamingRecognizeRequest) ProtoReflect() protoreflect.Message
- func (x *StreamingRecognizeRequest) Reset()
- func (x *StreamingRecognizeRequest) String() string
- type StreamingRecognizeRequest_AudioContent
- type StreamingRecognizeRequest_StreamingConfig
- type StreamingRecognizeResponse
- func (*StreamingRecognizeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamingRecognizeResponse) GetResults() []*StreamingRecognitionResult
- func (*StreamingRecognizeResponse) ProtoMessage()
- func (x *StreamingRecognizeResponse) ProtoReflect() protoreflect.Message
- func (x *StreamingRecognizeResponse) Reset()
- func (x *StreamingRecognizeResponse) String() string
- type UnimplementedSpeechToTextServer
- type VoiceActivityDetectionConfig
- func (*VoiceActivityDetectionConfig) Descriptor() ([]byte, []int)deprecated
- func (x *VoiceActivityDetectionConfig) GetAggressiveness() float32
- func (x *VoiceActivityDetectionConfig) GetMaxSpeechDuration() float32
- func (x *VoiceActivityDetectionConfig) GetMinSpeechDuration() float32
- func (x *VoiceActivityDetectionConfig) GetSilenceDurationThreshold() float32
- func (x *VoiceActivityDetectionConfig) GetSilenceProbThreshold() float32
- func (*VoiceActivityDetectionConfig) ProtoMessage()
- func (x *VoiceActivityDetectionConfig) ProtoReflect() protoreflect.Message
- func (x *VoiceActivityDetectionConfig) Reset()
- func (x *VoiceActivityDetectionConfig) String() string
- type WordInfo
- func (*WordInfo) Descriptor() ([]byte, []int)deprecated
- func (x *WordInfo) GetConfidence() float32
- func (x *WordInfo) GetEndTime() *duration.Duration
- func (x *WordInfo) GetStartTime() *duration.Duration
- func (x *WordInfo) GetWord() string
- func (*WordInfo) ProtoMessage()
- func (x *WordInfo) ProtoReflect() protoreflect.Message
- func (x *WordInfo) Reset()
- func (x *WordInfo) String() string
Constants ¶
This section is empty.
Variables ¶
var ( AudioEncoding_name = map[int32]string{ 0: "ENCODING_UNSPECIFIED", 1: "LINEAR16", 3: "MULAW", 8: "ALAW", 11: "RAW_OPUS", 12: "MPEG_AUDIO", } AudioEncoding_value = map[string]int32{ "ENCODING_UNSPECIFIED": 0, "LINEAR16": 1, "MULAW": 3, "ALAW": 8, "RAW_OPUS": 11, "MPEG_AUDIO": 12, } )
Enum value maps for AudioEncoding.
var File_tinkoff_cloud_stt_v1_stt_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSpeechToTextServer ¶
func RegisterSpeechToTextServer(s *grpc.Server, srv SpeechToTextServer)
Types ¶
type AudioEncoding ¶
type AudioEncoding int32
const ( AudioEncoding_ENCODING_UNSPECIFIED AudioEncoding = 0 // <i>Unspecified - invalid value.</i> Used as default value to avoid accidental errors. AudioEncoding_LINEAR16 AudioEncoding = 1 // Raw PCM with signed integer 16-bit linear audio samples. AudioEncoding_MULAW AudioEncoding = 3 // Raw PCM with Mu-law mapped 8-bit audio samples. AudioEncoding_ALAW AudioEncoding = 8 // Raw PCM with A-law mapped 8-bit audio samples. AudioEncoding_RAW_OPUS AudioEncoding = 11 // Opus frames packed into Protobuf messages.<br/> NOTE: each Opus frame must be packed into "content" field of RecognitionAudio. Each Opus frame must be sent individually exactly as encoded since boundary information isn't included in Opus frame. I. e. you can't just concatenate multiple encoded Opus frames and put it as a single chunk inside "content". AudioEncoding_MPEG_AUDIO AudioEncoding = 12 // MPEG audio bitstream. )
func (AudioEncoding) Descriptor ¶
func (AudioEncoding) Descriptor() protoreflect.EnumDescriptor
func (AudioEncoding) Enum ¶
func (x AudioEncoding) Enum() *AudioEncoding
func (AudioEncoding) EnumDescriptor
deprecated
func (AudioEncoding) EnumDescriptor() ([]byte, []int)
Deprecated: Use AudioEncoding.Descriptor instead.
func (AudioEncoding) Number ¶
func (x AudioEncoding) Number() protoreflect.EnumNumber
func (AudioEncoding) String ¶
func (x AudioEncoding) String() string
func (AudioEncoding) Type ¶
func (AudioEncoding) Type() protoreflect.EnumType
type InterimResultsConfig ¶
type InterimResultsConfig struct { EnableInterimResults bool `protobuf:"varint,1,opt,name=enable_interim_results,json=enableInterimResults,proto3" json:"enable_interim_results,omitempty"` // Flag to enable sending interim results. Disabled by default. Interval float32 `protobuf:"fixed32,2,opt,name=interval,proto3" json:"interval,omitempty"` // Desired interval in seconds for sending interim results. Actual interval between interim results depends on service internals and is selected for optimal give out of relevant data. // contains filtered or unexported fields }
func (*InterimResultsConfig) Descriptor
deprecated
func (*InterimResultsConfig) Descriptor() ([]byte, []int)
Deprecated: Use InterimResultsConfig.ProtoReflect.Descriptor instead.
func (*InterimResultsConfig) GetEnableInterimResults ¶
func (x *InterimResultsConfig) GetEnableInterimResults() bool
func (*InterimResultsConfig) GetInterval ¶
func (x *InterimResultsConfig) GetInterval() float32
func (*InterimResultsConfig) ProtoMessage ¶
func (*InterimResultsConfig) ProtoMessage()
func (*InterimResultsConfig) ProtoReflect ¶
func (x *InterimResultsConfig) ProtoReflect() protoreflect.Message
func (*InterimResultsConfig) Reset ¶
func (x *InterimResultsConfig) Reset()
func (*InterimResultsConfig) String ¶
func (x *InterimResultsConfig) String() string
type RecognitionAudio ¶
type RecognitionAudio struct { // Types that are assignable to AudioSource: // *RecognitionAudio_Content // *RecognitionAudio_Uri AudioSource isRecognitionAudio_AudioSource `protobuf_oneof:"audio_source"` // contains filtered or unexported fields }
func (*RecognitionAudio) Descriptor
deprecated
func (*RecognitionAudio) Descriptor() ([]byte, []int)
Deprecated: Use RecognitionAudio.ProtoReflect.Descriptor instead.
func (*RecognitionAudio) GetAudioSource ¶
func (m *RecognitionAudio) GetAudioSource() isRecognitionAudio_AudioSource
func (*RecognitionAudio) GetContent ¶
func (x *RecognitionAudio) GetContent() []byte
func (*RecognitionAudio) GetUri ¶
func (x *RecognitionAudio) GetUri() string
func (*RecognitionAudio) ProtoMessage ¶
func (*RecognitionAudio) ProtoMessage()
func (*RecognitionAudio) ProtoReflect ¶
func (x *RecognitionAudio) ProtoReflect() protoreflect.Message
func (*RecognitionAudio) Reset ¶
func (x *RecognitionAudio) Reset()
func (*RecognitionAudio) String ¶
func (x *RecognitionAudio) String() string
type RecognitionAudio_Content ¶
type RecognitionAudio_Content struct {
Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof"` // Input audio data chunk.
}
type RecognitionAudio_Uri ¶
type RecognitionAudio_Uri struct {
Uri string `protobuf:"bytes,2,opt,name=uri,proto3,oneof"` // Currently only supported for LongRunningRecognizeRequest. Input audio URI.<br/>URI format is “`storage://s3.api.tinkoff.ai/inbound/<file_name>“`
}
type RecognitionConfig ¶
type RecognitionConfig struct { Encoding AudioEncoding `protobuf:"varint,1,opt,name=encoding,proto3,enum=tinkoff.cloud.stt.v1.AudioEncoding" json:"encoding,omitempty"` // Audio encoding. Specifies both container and codec. Must be specified explicitly. SampleRateHertz uint32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"` // Sample rate of input audio in Hertz. Must match actual bitstream sample rate for MPEG_AUDIO. Must be specified explicitly. LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` // <i>Currently ignored.</i> Language to recognize. MaxAlternatives uint32 `protobuf:"varint,4,opt,name=max_alternatives,json=maxAlternatives,proto3" json:"max_alternatives,omitempty"` // Maximal number of phrase alternatives to return at each moment both for final and interim recognition results. Default value: 1. ProfanityFilter bool `protobuf:"varint,5,opt,name=profanity_filter,json=profanityFilter,proto3" json:"profanity_filter,omitempty"` // Enables profanity filter for first (most probable) alternative of final result. Words filtered out will contain the first letter and asterisks for the remaining characters. SpeechContexts []*SpeechContext `protobuf:"bytes,6,rep,name=speech_contexts,json=speechContexts,proto3" json:"speech_contexts,omitempty"` // A set of phrases to be recognised with higher (or lower) probability. EnableAutomaticPunctuation bool `` // Enables automatic punctuation and capitalization for first (most probable) alternative of final result. /* 142-byte string literal not displayed */ Model string `protobuf:"bytes,10,opt,name=model,proto3" json:"model,omitempty"` // Recognition model. Default model is used if not specified. NumChannels uint32 `protobuf:"varint,12,opt,name=num_channels,json=numChannels,proto3" json:"num_channels,omitempty"` // Channel count for input audio. Must match actual bitstream channel count for MPEG_AUDIO. // Types that are assignable to Vad: // *RecognitionConfig_DoNotPerformVad // *RecognitionConfig_VadConfig Vad isRecognitionConfig_Vad `protobuf_oneof:"vad"` EnableDenormalization bool `` // Enables automatic conversion of numerals from text to numeric form. Applies only to the first (most likely) version of hypothesis. /* 126-byte string literal not displayed */ EnableSentimentAnalysis bool `` // Enables sentiment analysis. Emotions supported: negative and neutral. Applies to every final hypothesis. Currently in beta. Works only in Recognize. /* 134-byte string literal not displayed */ EnableGenderIdentification bool `` // Enables gender identification: male or female. Applies to every final hypothesis. Currently in beta. /* 143-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RecognitionConfig) Descriptor
deprecated
func (*RecognitionConfig) Descriptor() ([]byte, []int)
Deprecated: Use RecognitionConfig.ProtoReflect.Descriptor instead.
func (*RecognitionConfig) GetDoNotPerformVad ¶
func (x *RecognitionConfig) GetDoNotPerformVad() bool
func (*RecognitionConfig) GetEnableAutomaticPunctuation ¶
func (x *RecognitionConfig) GetEnableAutomaticPunctuation() bool
func (*RecognitionConfig) GetEnableDenormalization ¶
func (x *RecognitionConfig) GetEnableDenormalization() bool
func (*RecognitionConfig) GetEnableGenderIdentification ¶
func (x *RecognitionConfig) GetEnableGenderIdentification() bool
func (*RecognitionConfig) GetEnableSentimentAnalysis ¶
func (x *RecognitionConfig) GetEnableSentimentAnalysis() bool
func (*RecognitionConfig) GetEncoding ¶
func (x *RecognitionConfig) GetEncoding() AudioEncoding
func (*RecognitionConfig) GetLanguageCode ¶
func (x *RecognitionConfig) GetLanguageCode() string
func (*RecognitionConfig) GetMaxAlternatives ¶
func (x *RecognitionConfig) GetMaxAlternatives() uint32
func (*RecognitionConfig) GetModel ¶
func (x *RecognitionConfig) GetModel() string
func (*RecognitionConfig) GetNumChannels ¶
func (x *RecognitionConfig) GetNumChannels() uint32
func (*RecognitionConfig) GetProfanityFilter ¶
func (x *RecognitionConfig) GetProfanityFilter() bool
func (*RecognitionConfig) GetSampleRateHertz ¶
func (x *RecognitionConfig) GetSampleRateHertz() uint32
func (*RecognitionConfig) GetSpeechContexts ¶
func (x *RecognitionConfig) GetSpeechContexts() []*SpeechContext
func (*RecognitionConfig) GetVad ¶
func (m *RecognitionConfig) GetVad() isRecognitionConfig_Vad
func (*RecognitionConfig) GetVadConfig ¶
func (x *RecognitionConfig) GetVadConfig() *VoiceActivityDetectionConfig
func (*RecognitionConfig) ProtoMessage ¶
func (*RecognitionConfig) ProtoMessage()
func (*RecognitionConfig) ProtoReflect ¶
func (x *RecognitionConfig) ProtoReflect() protoreflect.Message
func (*RecognitionConfig) Reset ¶
func (x *RecognitionConfig) Reset()
func (*RecognitionConfig) String ¶
func (x *RecognitionConfig) String() string
type RecognitionConfig_DoNotPerformVad ¶
type RecognitionConfig_DoNotPerformVad struct {
DoNotPerformVad bool `protobuf:"varint,13,opt,name=do_not_perform_vad,json=doNotPerformVad,proto3,oneof"` // Flag to disable phrase range detection. All speech shall be recognized as single phrase with this flag set to true.
}
type RecognitionConfig_VadConfig ¶
type RecognitionConfig_VadConfig struct {
VadConfig *VoiceActivityDetectionConfig `protobuf:"bytes,14,opt,name=vad_config,json=vadConfig,proto3,oneof"` // Structure to customize VAD settings.
}
type RecognizeRequest ¶
type RecognizeRequest struct { Config *RecognitionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // Recognition configuration. Audio *RecognitionAudio `protobuf:"bytes,2,opt,name=audio,proto3" json:"audio,omitempty"` // Audio to recognize. // contains filtered or unexported fields }
func (*RecognizeRequest) Descriptor
deprecated
func (*RecognizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecognizeRequest.ProtoReflect.Descriptor instead.
func (*RecognizeRequest) GetAudio ¶
func (x *RecognizeRequest) GetAudio() *RecognitionAudio
func (*RecognizeRequest) GetConfig ¶
func (x *RecognizeRequest) GetConfig() *RecognitionConfig
func (*RecognizeRequest) ProtoMessage ¶
func (*RecognizeRequest) ProtoMessage()
func (*RecognizeRequest) ProtoReflect ¶
func (x *RecognizeRequest) ProtoReflect() protoreflect.Message
func (*RecognizeRequest) Reset ¶
func (x *RecognizeRequest) Reset()
func (*RecognizeRequest) String ¶
func (x *RecognizeRequest) String() string
type RecognizeResponse ¶
type RecognizeResponse struct { Results []*SpeechRecognitionResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // Recognized phrases. // contains filtered or unexported fields }
func (*RecognizeResponse) Descriptor
deprecated
func (*RecognizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use RecognizeResponse.ProtoReflect.Descriptor instead.
func (*RecognizeResponse) GetResults ¶
func (x *RecognizeResponse) GetResults() []*SpeechRecognitionResult
func (*RecognizeResponse) ProtoMessage ¶
func (*RecognizeResponse) ProtoMessage()
func (*RecognizeResponse) ProtoReflect ¶
func (x *RecognizeResponse) ProtoReflect() protoreflect.Message
func (*RecognizeResponse) Reset ¶
func (x *RecognizeResponse) Reset()
func (*RecognizeResponse) String ¶
func (x *RecognizeResponse) String() string
type SpeechContext ¶
type SpeechContext struct { Phrases []*SpeechContextPhrase `protobuf:"bytes,3,rep,name=phrases,proto3" json:"phrases,omitempty"` // Phrases to recognize with higher (or lower) probability. // contains filtered or unexported fields }
func (*SpeechContext) Descriptor
deprecated
func (*SpeechContext) Descriptor() ([]byte, []int)
Deprecated: Use SpeechContext.ProtoReflect.Descriptor instead.
func (*SpeechContext) GetPhrases ¶
func (x *SpeechContext) GetPhrases() []*SpeechContextPhrase
func (*SpeechContext) ProtoMessage ¶
func (*SpeechContext) ProtoMessage()
func (*SpeechContext) ProtoReflect ¶
func (x *SpeechContext) ProtoReflect() protoreflect.Message
func (*SpeechContext) Reset ¶
func (x *SpeechContext) Reset()
func (*SpeechContext) String ¶
func (x *SpeechContext) String() string
type SpeechContextPhrase ¶
type SpeechContextPhrase struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Phrase text. Specifying phrases shorter than 5 characters is discouraged. Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` // Phrase score. Recommended range of scores is `[1.0, 10.0]`, `1.0` is used if no value is provided. Specifying higher score for a phrase increases its chances to be recognised, but large values might degrade overall recognition quality. Specifying negative values in the range `[-10.0, -1.0]` reduces chances for a phrase to be recognised. In this case, smaller score corresponds to more significant reduction in recognition probability for the phrase. // contains filtered or unexported fields }
func (*SpeechContextPhrase) Descriptor
deprecated
func (*SpeechContextPhrase) Descriptor() ([]byte, []int)
Deprecated: Use SpeechContextPhrase.ProtoReflect.Descriptor instead.
func (*SpeechContextPhrase) GetScore ¶
func (x *SpeechContextPhrase) GetScore() float32
func (*SpeechContextPhrase) GetText ¶
func (x *SpeechContextPhrase) GetText() string
func (*SpeechContextPhrase) ProtoMessage ¶
func (*SpeechContextPhrase) ProtoMessage()
func (*SpeechContextPhrase) ProtoReflect ¶
func (x *SpeechContextPhrase) ProtoReflect() protoreflect.Message
func (*SpeechContextPhrase) Reset ¶
func (x *SpeechContextPhrase) Reset()
func (*SpeechContextPhrase) String ¶
func (x *SpeechContextPhrase) String() string
type SpeechGenderIdentificationResult ¶
type SpeechGenderIdentificationResult struct { MaleProba float32 `protobuf:"fixed32,1,opt,name=male_proba,json=maleProba,proto3" json:"male_proba,omitempty"` // Probability that speaker is male. FemaleProba float32 `protobuf:"fixed32,2,opt,name=female_proba,json=femaleProba,proto3" json:"female_proba,omitempty"` // Probability that speaker is female. The following is always true: male_proba + female_proba = 1. // contains filtered or unexported fields }
func (*SpeechGenderIdentificationResult) Descriptor
deprecated
func (*SpeechGenderIdentificationResult) Descriptor() ([]byte, []int)
Deprecated: Use SpeechGenderIdentificationResult.ProtoReflect.Descriptor instead.
func (*SpeechGenderIdentificationResult) GetFemaleProba ¶
func (x *SpeechGenderIdentificationResult) GetFemaleProba() float32
func (*SpeechGenderIdentificationResult) GetMaleProba ¶
func (x *SpeechGenderIdentificationResult) GetMaleProba() float32
func (*SpeechGenderIdentificationResult) ProtoMessage ¶
func (*SpeechGenderIdentificationResult) ProtoMessage()
func (*SpeechGenderIdentificationResult) ProtoReflect ¶
func (x *SpeechGenderIdentificationResult) ProtoReflect() protoreflect.Message
func (*SpeechGenderIdentificationResult) Reset ¶
func (x *SpeechGenderIdentificationResult) Reset()
func (*SpeechGenderIdentificationResult) String ¶
func (x *SpeechGenderIdentificationResult) String() string
type SpeechRecognitionAlternative ¶
type SpeechRecognitionAlternative struct { Transcript string `protobuf:"bytes,1,opt,name=transcript,proto3" json:"transcript,omitempty"` // Recognized text. Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"` // Relative confidence factor. Words []*WordInfo `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"` // Array of individual words inside phrase. // contains filtered or unexported fields }
func (*SpeechRecognitionAlternative) Descriptor
deprecated
func (*SpeechRecognitionAlternative) Descriptor() ([]byte, []int)
Deprecated: Use SpeechRecognitionAlternative.ProtoReflect.Descriptor instead.
func (*SpeechRecognitionAlternative) GetConfidence ¶
func (x *SpeechRecognitionAlternative) GetConfidence() float32
func (*SpeechRecognitionAlternative) GetTranscript ¶
func (x *SpeechRecognitionAlternative) GetTranscript() string
func (*SpeechRecognitionAlternative) GetWords ¶
func (x *SpeechRecognitionAlternative) GetWords() []*WordInfo
func (*SpeechRecognitionAlternative) ProtoMessage ¶
func (*SpeechRecognitionAlternative) ProtoMessage()
func (*SpeechRecognitionAlternative) ProtoReflect ¶
func (x *SpeechRecognitionAlternative) ProtoReflect() protoreflect.Message
func (*SpeechRecognitionAlternative) Reset ¶
func (x *SpeechRecognitionAlternative) Reset()
func (*SpeechRecognitionAlternative) String ¶
func (x *SpeechRecognitionAlternative) String() string
type SpeechRecognitionResult ¶
type SpeechRecognitionResult struct { Alternatives []*SpeechRecognitionAlternative `protobuf:"bytes,1,rep,name=alternatives,proto3" json:"alternatives,omitempty"` // Array of phrase alternatives sorted by confidence in descending order. Channel int32 `protobuf:"varint,2,opt,name=channel,proto3" json:"channel,omitempty"` // Channel where phrase alternative relates to (starting from 0). StartTime *duration.Duration `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Phrase start time inside input audiostream. EndTime *duration.Duration `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Phrase end time inside input audiostream. SentimentAnalysisResult *SpeechSentimentAnalysisResult `` // Sentiment analysis results. /* 132-byte string literal not displayed */ GenderIdentificationResult *SpeechGenderIdentificationResult `` // Gender identification results. /* 141-byte string literal not displayed */ // contains filtered or unexported fields }
func (*SpeechRecognitionResult) Descriptor
deprecated
func (*SpeechRecognitionResult) Descriptor() ([]byte, []int)
Deprecated: Use SpeechRecognitionResult.ProtoReflect.Descriptor instead.
func (*SpeechRecognitionResult) GetAlternatives ¶
func (x *SpeechRecognitionResult) GetAlternatives() []*SpeechRecognitionAlternative
func (*SpeechRecognitionResult) GetChannel ¶
func (x *SpeechRecognitionResult) GetChannel() int32
func (*SpeechRecognitionResult) GetEndTime ¶
func (x *SpeechRecognitionResult) GetEndTime() *duration.Duration
func (*SpeechRecognitionResult) GetGenderIdentificationResult ¶
func (x *SpeechRecognitionResult) GetGenderIdentificationResult() *SpeechGenderIdentificationResult
func (*SpeechRecognitionResult) GetSentimentAnalysisResult ¶
func (x *SpeechRecognitionResult) GetSentimentAnalysisResult() *SpeechSentimentAnalysisResult
func (*SpeechRecognitionResult) GetStartTime ¶
func (x *SpeechRecognitionResult) GetStartTime() *duration.Duration
func (*SpeechRecognitionResult) ProtoMessage ¶
func (*SpeechRecognitionResult) ProtoMessage()
func (*SpeechRecognitionResult) ProtoReflect ¶
func (x *SpeechRecognitionResult) ProtoReflect() protoreflect.Message
func (*SpeechRecognitionResult) Reset ¶
func (x *SpeechRecognitionResult) Reset()
func (*SpeechRecognitionResult) String ¶
func (x *SpeechRecognitionResult) String() string
type SpeechSentimentAnalysisResult ¶
type SpeechSentimentAnalysisResult struct { NegativeProbAudio float32 `protobuf:"fixed32,1,opt,name=negative_prob_audio,json=negativeProbAudio,proto3" json:"negative_prob_audio,omitempty"` // Probability of negative emotion derived from audio phrase. NegativeProbAudioText float32 `` // Probability of negative emotion derived from audio phrase and recognized text. /* 130-byte string literal not displayed */ // contains filtered or unexported fields }
func (*SpeechSentimentAnalysisResult) Descriptor
deprecated
func (*SpeechSentimentAnalysisResult) Descriptor() ([]byte, []int)
Deprecated: Use SpeechSentimentAnalysisResult.ProtoReflect.Descriptor instead.
func (*SpeechSentimentAnalysisResult) GetNegativeProbAudio ¶
func (x *SpeechSentimentAnalysisResult) GetNegativeProbAudio() float32
func (*SpeechSentimentAnalysisResult) GetNegativeProbAudioText ¶
func (x *SpeechSentimentAnalysisResult) GetNegativeProbAudioText() float32
func (*SpeechSentimentAnalysisResult) ProtoMessage ¶
func (*SpeechSentimentAnalysisResult) ProtoMessage()
func (*SpeechSentimentAnalysisResult) ProtoReflect ¶
func (x *SpeechSentimentAnalysisResult) ProtoReflect() protoreflect.Message
func (*SpeechSentimentAnalysisResult) Reset ¶
func (x *SpeechSentimentAnalysisResult) Reset()
func (*SpeechSentimentAnalysisResult) String ¶
func (x *SpeechSentimentAnalysisResult) String() string
type SpeechToTextClient ¶
type SpeechToTextClient interface { Recognize(ctx context.Context, in *RecognizeRequest, opts ...grpc.CallOption) (*RecognizeResponse, error) StreamingRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingRecognizeClient, error) }
SpeechToTextClient is the client API for SpeechToText service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSpeechToTextClient ¶
func NewSpeechToTextClient(cc grpc.ClientConnInterface) SpeechToTextClient
type SpeechToTextServer ¶
type SpeechToTextServer interface { Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error) StreamingRecognize(SpeechToText_StreamingRecognizeServer) error }
SpeechToTextServer is the server API for SpeechToText service.
type SpeechToText_StreamingRecognizeClient ¶
type SpeechToText_StreamingRecognizeClient interface { Send(*StreamingRecognizeRequest) error Recv() (*StreamingRecognizeResponse, error) grpc.ClientStream }
type SpeechToText_StreamingRecognizeServer ¶
type SpeechToText_StreamingRecognizeServer interface { Send(*StreamingRecognizeResponse) error Recv() (*StreamingRecognizeRequest, error) grpc.ServerStream }
type StreamingRecognitionConfig ¶
type StreamingRecognitionConfig struct { Config *RecognitionConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // Recognition configuration. SingleUtterance bool `protobuf:"varint,2,opt,name=single_utterance,json=singleUtterance,proto3" json:"single_utterance,omitempty"` // Flag to enable single utterance mode. Recognition is finished by service at first recognized phrase in this mode. InterimResultsConfig *InterimResultsConfig `protobuf:"bytes,3,opt,name=interim_results_config,json=interimResultsConfig,proto3" json:"interim_results_config,omitempty"` // Configuration of interim results. I. e., recognized text so far at a moment when only part of phrase audio was sent. // contains filtered or unexported fields }
func (*StreamingRecognitionConfig) Descriptor
deprecated
func (*StreamingRecognitionConfig) Descriptor() ([]byte, []int)
Deprecated: Use StreamingRecognitionConfig.ProtoReflect.Descriptor instead.
func (*StreamingRecognitionConfig) GetConfig ¶
func (x *StreamingRecognitionConfig) GetConfig() *RecognitionConfig
func (*StreamingRecognitionConfig) GetInterimResultsConfig ¶
func (x *StreamingRecognitionConfig) GetInterimResultsConfig() *InterimResultsConfig
func (*StreamingRecognitionConfig) GetSingleUtterance ¶
func (x *StreamingRecognitionConfig) GetSingleUtterance() bool
func (*StreamingRecognitionConfig) ProtoMessage ¶
func (*StreamingRecognitionConfig) ProtoMessage()
func (*StreamingRecognitionConfig) ProtoReflect ¶
func (x *StreamingRecognitionConfig) ProtoReflect() protoreflect.Message
func (*StreamingRecognitionConfig) Reset ¶
func (x *StreamingRecognitionConfig) Reset()
func (*StreamingRecognitionConfig) String ¶
func (x *StreamingRecognitionConfig) String() string
type StreamingRecognitionResult ¶
type StreamingRecognitionResult struct { RecognitionResult *SpeechRecognitionResult `protobuf:"bytes,1,opt,name=recognition_result,json=recognitionResult,proto3" json:"recognition_result,omitempty"` // Recognition result. IsFinal bool `protobuf:"varint,2,opt,name=is_final,json=isFinal,proto3" json:"is_final,omitempty"` // Set to true if final version of phrase is recognized. Value of false means interim result. Stability float32 `protobuf:"fixed32,3,opt,name=stability,proto3" json:"stability,omitempty"` // <i>Currently unused.</i> Stability factor. // contains filtered or unexported fields }
func (*StreamingRecognitionResult) Descriptor
deprecated
func (*StreamingRecognitionResult) Descriptor() ([]byte, []int)
Deprecated: Use StreamingRecognitionResult.ProtoReflect.Descriptor instead.
func (*StreamingRecognitionResult) GetIsFinal ¶
func (x *StreamingRecognitionResult) GetIsFinal() bool
func (*StreamingRecognitionResult) GetRecognitionResult ¶
func (x *StreamingRecognitionResult) GetRecognitionResult() *SpeechRecognitionResult
func (*StreamingRecognitionResult) GetStability ¶
func (x *StreamingRecognitionResult) GetStability() float32
func (*StreamingRecognitionResult) ProtoMessage ¶
func (*StreamingRecognitionResult) ProtoMessage()
func (*StreamingRecognitionResult) ProtoReflect ¶
func (x *StreamingRecognitionResult) ProtoReflect() protoreflect.Message
func (*StreamingRecognitionResult) Reset ¶
func (x *StreamingRecognitionResult) Reset()
func (*StreamingRecognitionResult) String ¶
func (x *StreamingRecognitionResult) String() string
type StreamingRecognizeRequest ¶
type StreamingRecognizeRequest struct { // Types that are assignable to StreamingRequest: // *StreamingRecognizeRequest_StreamingConfig // *StreamingRecognizeRequest_AudioContent StreamingRequest isStreamingRecognizeRequest_StreamingRequest `protobuf_oneof:"streaming_request"` // contains filtered or unexported fields }
func (*StreamingRecognizeRequest) Descriptor
deprecated
func (*StreamingRecognizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamingRecognizeRequest.ProtoReflect.Descriptor instead.
func (*StreamingRecognizeRequest) GetAudioContent ¶
func (x *StreamingRecognizeRequest) GetAudioContent() []byte
func (*StreamingRecognizeRequest) GetStreamingConfig ¶
func (x *StreamingRecognizeRequest) GetStreamingConfig() *StreamingRecognitionConfig
func (*StreamingRecognizeRequest) GetStreamingRequest ¶
func (m *StreamingRecognizeRequest) GetStreamingRequest() isStreamingRecognizeRequest_StreamingRequest
func (*StreamingRecognizeRequest) ProtoMessage ¶
func (*StreamingRecognizeRequest) ProtoMessage()
func (*StreamingRecognizeRequest) ProtoReflect ¶
func (x *StreamingRecognizeRequest) ProtoReflect() protoreflect.Message
func (*StreamingRecognizeRequest) Reset ¶
func (x *StreamingRecognizeRequest) Reset()
func (*StreamingRecognizeRequest) String ¶
func (x *StreamingRecognizeRequest) String() string
type StreamingRecognizeRequest_AudioContent ¶
type StreamingRecognizeRequest_AudioContent struct {
AudioContent []byte `protobuf:"bytes,2,opt,name=audio_content,json=audioContent,proto3,oneof"` // Input audio data chunk. Must come after recognition configuration message.
}
type StreamingRecognizeRequest_StreamingConfig ¶
type StreamingRecognizeRequest_StreamingConfig struct {
StreamingConfig *StreamingRecognitionConfig `protobuf:"bytes,1,opt,name=streaming_config,json=streamingConfig,proto3,oneof"` // Recognition configuration for streaming RPC. Must be sent as first message only.
}
type StreamingRecognizeResponse ¶
type StreamingRecognizeResponse struct { Results []*StreamingRecognitionResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // Recognition results for streaming request. // contains filtered or unexported fields }
func (*StreamingRecognizeResponse) Descriptor
deprecated
func (*StreamingRecognizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamingRecognizeResponse.ProtoReflect.Descriptor instead.
func (*StreamingRecognizeResponse) GetResults ¶
func (x *StreamingRecognizeResponse) GetResults() []*StreamingRecognitionResult
func (*StreamingRecognizeResponse) ProtoMessage ¶
func (*StreamingRecognizeResponse) ProtoMessage()
func (*StreamingRecognizeResponse) ProtoReflect ¶
func (x *StreamingRecognizeResponse) ProtoReflect() protoreflect.Message
func (*StreamingRecognizeResponse) Reset ¶
func (x *StreamingRecognizeResponse) Reset()
func (*StreamingRecognizeResponse) String ¶
func (x *StreamingRecognizeResponse) String() string
type UnimplementedSpeechToTextServer ¶
type UnimplementedSpeechToTextServer struct { }
UnimplementedSpeechToTextServer can be embedded to have forward compatible implementations.
func (*UnimplementedSpeechToTextServer) Recognize ¶
func (*UnimplementedSpeechToTextServer) Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error)
func (*UnimplementedSpeechToTextServer) StreamingRecognize ¶
func (*UnimplementedSpeechToTextServer) StreamingRecognize(SpeechToText_StreamingRecognizeServer) error
type VoiceActivityDetectionConfig ¶
type VoiceActivityDetectionConfig struct { MinSpeechDuration float32 `protobuf:"fixed32,1,opt,name=min_speech_duration,json=minSpeechDuration,proto3" json:"min_speech_duration,omitempty"` // <i>Currently ignored.</i> Minimal duration of phrase to detect by VAD in seconds. MaxSpeechDuration float32 `protobuf:"fixed32,2,opt,name=max_speech_duration,json=maxSpeechDuration,proto3" json:"max_speech_duration,omitempty"` // <i>Currently ignored.</i> Maximal duration of phrase to detect by VAD in seconds. SilenceDurationThreshold float32 `` // Duration of silence in seconds to consider phrase ended. Default value depends on service configuration. /* 137-byte string literal not displayed */ SilenceProbThreshold float32 `protobuf:"fixed32,4,opt,name=silence_prob_threshold,json=silenceProbThreshold,proto3" json:"silence_prob_threshold,omitempty"` // Threshold value for silence probability (in range from 0.0 to 1.0). If silence probability is below threshold and audio fragment is considered silence. Default value depends on service configuration. Aggressiveness float32 `protobuf:"fixed32,5,opt,name=aggressiveness,proto3" json:"aggressiveness,omitempty"` // Currently unused. // contains filtered or unexported fields }
func (*VoiceActivityDetectionConfig) Descriptor
deprecated
func (*VoiceActivityDetectionConfig) Descriptor() ([]byte, []int)
Deprecated: Use VoiceActivityDetectionConfig.ProtoReflect.Descriptor instead.
func (*VoiceActivityDetectionConfig) GetAggressiveness ¶
func (x *VoiceActivityDetectionConfig) GetAggressiveness() float32
func (*VoiceActivityDetectionConfig) GetMaxSpeechDuration ¶
func (x *VoiceActivityDetectionConfig) GetMaxSpeechDuration() float32
func (*VoiceActivityDetectionConfig) GetMinSpeechDuration ¶
func (x *VoiceActivityDetectionConfig) GetMinSpeechDuration() float32
func (*VoiceActivityDetectionConfig) GetSilenceDurationThreshold ¶
func (x *VoiceActivityDetectionConfig) GetSilenceDurationThreshold() float32
func (*VoiceActivityDetectionConfig) GetSilenceProbThreshold ¶
func (x *VoiceActivityDetectionConfig) GetSilenceProbThreshold() float32
func (*VoiceActivityDetectionConfig) ProtoMessage ¶
func (*VoiceActivityDetectionConfig) ProtoMessage()
func (*VoiceActivityDetectionConfig) ProtoReflect ¶
func (x *VoiceActivityDetectionConfig) ProtoReflect() protoreflect.Message
func (*VoiceActivityDetectionConfig) Reset ¶
func (x *VoiceActivityDetectionConfig) Reset()
func (*VoiceActivityDetectionConfig) String ¶
func (x *VoiceActivityDetectionConfig) String() string
type WordInfo ¶
type WordInfo struct { StartTime *duration.Duration `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Word start time inside input audiostream. EndTime *duration.Duration `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // Word end time inside input audiostream. Word string `protobuf:"bytes,3,opt,name=word,proto3" json:"word,omitempty"` // Word inside phrase. Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"` // Relative confidence factor (relative to other words of the phrase and to words of other alternatives for requests configuration with max_alternatives > 1). Value may be negative. // contains filtered or unexported fields }
func (*WordInfo) Descriptor
deprecated
func (*WordInfo) GetConfidence ¶
func (*WordInfo) GetEndTime ¶
func (*WordInfo) GetStartTime ¶
func (*WordInfo) ProtoMessage ¶
func (*WordInfo) ProtoMessage()
func (*WordInfo) ProtoReflect ¶
func (x *WordInfo) ProtoReflect() protoreflect.Message