@@ -17,6 +17,7 @@ syntax = "proto3";
1717package google.cloud.speech.v1p1beta1 ;
1818
1919import "google/api/resource.proto" ;
20+ import "google/protobuf/timestamp.proto" ;
2021import "google/api/annotations.proto" ;
2122
2223option cc_enable_arenas = true ;
@@ -132,3 +133,27 @@ message SpeechAdaptation {
132133 // `custom_class_id`.
133134 repeated CustomClass custom_classes = 3 ;
134135}
136+
137+ // Transcription normalization configuration. Use transcription normalization
138+ // to automatically replace parts of the transcript with phrases of your
139+ // choosing. For StreamingRecognize, this normalization only applies to stable
140+ // partial transcripts (stability > 0.8) and final transcripts.
141+ message TranscriptNormalization {
142+ // A single replacement configuration.
143+ message Entry {
144+ // What to replace. Max length is 100 characters.
145+ string search = 1 ;
146+
147+ // What to replace with. Max length is 100 characters.
148+ string replace = 2 ;
149+
150+ // Whether the search is case sensitive.
151+ bool case_sensitive = 3 ;
152+ }
153+
154+ // A list of replacement entries. We will perform replacement with one entry
155+ // at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
156+ // => "mountain dog"] will never be applied because we will always process the
157+ // first entry before it. At most 100 entries.
158+ repeated Entry entries = 1 ;
159+ }
0 commit comments