v1

package
v0.0.0-...-7648494 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AudioEncoding_name = map[int32]string{
		0:  "ENCODING_UNSPECIFIED",
		1:  "LINEAR16",
		3:  "MULAW",
		8:  "ALAW",
		11: "RAW_OPUS",
		12: "MPEG_AUDIO",
		13: "ADTS_AAC",
		14: "RAW_AAC_LC",
		15: "RAW_ER_AAC_LD",
	}
	AudioEncoding_value = map[string]int32{
		"ENCODING_UNSPECIFIED": 0,
		"LINEAR16":             1,
		"MULAW":                3,
		"ALAW":                 8,
		"RAW_OPUS":             11,
		"MPEG_AUDIO":           12,
		"ADTS_AAC":             13,
		"RAW_AAC_LC":           14,
		"RAW_ER_AAC_LD":        15,
	}
)

Enum value maps for AudioEncoding.

View Source
var File_tinkoff_cloud_stt_v1_stt_proto protoreflect.FileDescriptor
View Source
var SpeechToText_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tinkoff.cloud.stt.v1.SpeechToText",
	HandlerType: (*SpeechToTextServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Recognize",
			Handler:    _SpeechToText_Recognize_Handler,
		},
		{
			MethodName: "LongRunningRecognize",
			Handler:    _SpeechToText_LongRunningRecognize_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamingRecognize",
			Handler:       _SpeechToText_StreamingRecognize_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "StreamingUnaryRecognize",
			Handler:       _SpeechToText_StreamingUnaryRecognize_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "tinkoff/cloud/stt/v1/stt.proto",
}

SpeechToText_ServiceDesc is the grpc.ServiceDesc for SpeechToText service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSpeechToTextServer

func RegisterSpeechToTextServer(s grpc.ServiceRegistrar, 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.
	AudioEncoding_ADTS_AAC             AudioEncoding = 13 // AAC audio in ADTS stream
	AudioEncoding_RAW_AAC_LC           AudioEncoding = 14 // Raw AAC LC (Low Complexity) frames packed into Protobuf messages. Supported only in steam methods.<br/> NOTE: Like in RAW_OPUS encoding, each frame must be sent individually in stream
	AudioEncoding_RAW_ER_AAC_LD        AudioEncoding = 15 // Raw ER AAC LD frames packed into Protobuf messages. Supported only in steam methods.<br/> NOTE: Like in RAW_OPUS encoding, each frame must be sent individually in stream
)

func (AudioEncoding) Descriptor

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 (AudioEncoding) String

func (x AudioEncoding) String() string

func (AudioEncoding) Type

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 LongRunningRecognizeRequest

type LongRunningRecognizeRequest 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.
	Group  string             `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`   // Group to assign to created operation.
	// contains filtered or unexported fields
}

func (*LongRunningRecognizeRequest) Descriptor deprecated

func (*LongRunningRecognizeRequest) Descriptor() ([]byte, []int)

Deprecated: Use LongRunningRecognizeRequest.ProtoReflect.Descriptor instead.

func (*LongRunningRecognizeRequest) GetAudio

func (*LongRunningRecognizeRequest) GetConfig

func (*LongRunningRecognizeRequest) GetGroup

func (x *LongRunningRecognizeRequest) GetGroup() string

func (*LongRunningRecognizeRequest) ProtoMessage

func (*LongRunningRecognizeRequest) ProtoMessage()

func (*LongRunningRecognizeRequest) ProtoReflect

func (*LongRunningRecognizeRequest) Reset

func (x *LongRunningRecognizeRequest) Reset()

func (*LongRunningRecognizeRequest) String

func (x *LongRunningRecognizeRequest) 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 (*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 (*SpeechGenderIdentificationResult) Reset

func (*SpeechGenderIdentificationResult) 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 (*SpeechRecognitionAlternative) Reset

func (x *SpeechRecognitionAlternative) Reset()

func (*SpeechRecognitionAlternative) 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               *durationpb.Duration            `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Phrase start time inside input audiostream.
	EndTime                 *durationpb.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() *durationpb.Duration

func (*SpeechRecognitionResult) GetGenderIdentificationResult

func (x *SpeechRecognitionResult) GetGenderIdentificationResult() *SpeechGenderIdentificationResult

func (*SpeechRecognitionResult) GetSentimentAnalysisResult

func (x *SpeechRecognitionResult) GetSentimentAnalysisResult() *SpeechSentimentAnalysisResult

func (*SpeechRecognitionResult) GetStartTime

func (x *SpeechRecognitionResult) GetStartTime() *durationpb.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 (*SpeechSentimentAnalysisResult) Reset

func (x *SpeechSentimentAnalysisResult) Reset()

func (*SpeechSentimentAnalysisResult) 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)
	LongRunningRecognize(ctx context.Context, in *LongRunningRecognizeRequest, opts ...grpc.CallOption) (*v1.Operation, error)
	StreamingUnaryRecognize(ctx context.Context, opts ...grpc.CallOption) (SpeechToText_StreamingUnaryRecognizeClient, error)
}

SpeechToTextClient is the client API for SpeechToText 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.

type SpeechToTextServer

type SpeechToTextServer interface {
	Recognize(context.Context, *RecognizeRequest) (*RecognizeResponse, error)
	StreamingRecognize(SpeechToText_StreamingRecognizeServer) error
	LongRunningRecognize(context.Context, *LongRunningRecognizeRequest) (*v1.Operation, error)
	StreamingUnaryRecognize(SpeechToText_StreamingUnaryRecognizeServer) error
	// contains filtered or unexported methods
}

SpeechToTextServer is the server API for SpeechToText service. All implementations must embed UnimplementedSpeechToTextServer for forward compatibility

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 SpeechToText_StreamingUnaryRecognizeClient

type SpeechToText_StreamingUnaryRecognizeClient interface {
	Send(*StreamingUnaryRecognizeRequest) error
	CloseAndRecv() (*RecognizeResponse, error)
	grpc.ClientStream
}

type SpeechToText_StreamingUnaryRecognizeServer

type SpeechToText_StreamingUnaryRecognizeServer interface {
	SendAndClose(*RecognizeResponse) error
	Recv() (*StreamingUnaryRecognizeRequest, 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 (*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 (*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 (*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 (*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 (*StreamingRecognizeResponse) ProtoMessage

func (*StreamingRecognizeResponse) ProtoMessage()

func (*StreamingRecognizeResponse) ProtoReflect

func (*StreamingRecognizeResponse) Reset

func (x *StreamingRecognizeResponse) Reset()

func (*StreamingRecognizeResponse) String

func (x *StreamingRecognizeResponse) String() string

type StreamingUnaryRecognizeRequest

type StreamingUnaryRecognizeRequest struct {

	// Types that are assignable to StreamingUnaryRequest:
	//	*StreamingUnaryRecognizeRequest_Config
	//	*StreamingUnaryRecognizeRequest_AudioContent
	StreamingUnaryRequest isStreamingUnaryRecognizeRequest_StreamingUnaryRequest `protobuf_oneof:"streaming_unary_request"`
	// contains filtered or unexported fields
}

func (*StreamingUnaryRecognizeRequest) Descriptor deprecated

func (*StreamingUnaryRecognizeRequest) Descriptor() ([]byte, []int)

Deprecated: Use StreamingUnaryRecognizeRequest.ProtoReflect.Descriptor instead.

func (*StreamingUnaryRecognizeRequest) GetAudioContent

func (x *StreamingUnaryRecognizeRequest) GetAudioContent() []byte

func (*StreamingUnaryRecognizeRequest) GetConfig

func (*StreamingUnaryRecognizeRequest) GetStreamingUnaryRequest

func (m *StreamingUnaryRecognizeRequest) GetStreamingUnaryRequest() isStreamingUnaryRecognizeRequest_StreamingUnaryRequest

func (*StreamingUnaryRecognizeRequest) ProtoMessage

func (*StreamingUnaryRecognizeRequest) ProtoMessage()

func (*StreamingUnaryRecognizeRequest) ProtoReflect

func (*StreamingUnaryRecognizeRequest) Reset

func (x *StreamingUnaryRecognizeRequest) Reset()

func (*StreamingUnaryRecognizeRequest) String

type StreamingUnaryRecognizeRequest_AudioContent

type StreamingUnaryRecognizeRequest_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 StreamingUnaryRecognizeRequest_Config

type StreamingUnaryRecognizeRequest_Config struct {
	Config *RecognitionConfig `protobuf:"bytes,1,opt,name=config,proto3,oneof"` // Recognition configuration. Must be sent as first message only.
}

type UnimplementedSpeechToTextServer

type UnimplementedSpeechToTextServer struct {
}

UnimplementedSpeechToTextServer must be embedded to have forward compatible implementations.

func (UnimplementedSpeechToTextServer) LongRunningRecognize

func (UnimplementedSpeechToTextServer) Recognize

func (UnimplementedSpeechToTextServer) StreamingRecognize

func (UnimplementedSpeechToTextServer) StreamingUnaryRecognize

type UnsafeSpeechToTextServer

type UnsafeSpeechToTextServer interface {
	// contains filtered or unexported methods
}

UnsafeSpeechToTextServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SpeechToTextServer will result in compilation errors.

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 (*VoiceActivityDetectionConfig) Reset

func (x *VoiceActivityDetectionConfig) Reset()

func (*VoiceActivityDetectionConfig) String

type WordInfo

type WordInfo struct {
	StartTime  *durationpb.Duration `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Word start time inside input audiostream.
	EndTime    *durationpb.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) Descriptor() ([]byte, []int)

Deprecated: Use WordInfo.ProtoReflect.Descriptor instead.

func (*WordInfo) GetConfidence

func (x *WordInfo) GetConfidence() float32

func (*WordInfo) GetEndTime

func (x *WordInfo) GetEndTime() *durationpb.Duration

func (*WordInfo) GetStartTime

func (x *WordInfo) GetStartTime() *durationpb.Duration

func (*WordInfo) GetWord

func (x *WordInfo) GetWord() string

func (*WordInfo) ProtoMessage

func (*WordInfo) ProtoMessage()

func (*WordInfo) ProtoReflect

func (x *WordInfo) ProtoReflect() protoreflect.Message

func (*WordInfo) Reset

func (x *WordInfo) Reset()

func (*WordInfo) String

func (x *WordInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL