RecognitionConfig class
Provides information to the recognizer that specifies how to process the request.
Constructors
-
RecognitionConfig({SpeechAdaptation? adaptation, List<
String> ? alternativeLanguageCodes, int? audioChannelCount, SpeakerDiarizationConfig? diarizationConfig, bool? enableAutomaticPunctuation, bool? enableSeparateRecognitionPerChannel, bool? enableSpokenEmojis, bool? enableSpokenPunctuation, bool? enableWordConfidence, bool? enableWordTimeOffsets, String? encoding, String? languageCode, int? maxAlternatives, RecognitionMetadata? metadata, String? model, bool? profanityFilter, int? sampleRateHertz, List<SpeechContext> ? speechContexts, TranscriptNormalization? transcriptNormalization, bool? useEnhanced}) - RecognitionConfig.fromJson(Map json_)
Properties
- adaptation ↔ SpeechAdaptation?
-
Speech adaptation configuration improves the accuracy of speech
recognition.
getter/setter pair
-
alternativeLanguageCodes
↔ List<
String> ? -
A list of up to 3 additional
[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
listing possible alternative languages of the supplied audio.
getter/setter pair
- audioChannelCount ↔ int?
-
The number of channels in the input audio data.
getter/setter pair
- diarizationConfig ↔ SpeakerDiarizationConfig?
-
Config to enable speaker diarization and set additional parameters to make
diarization better suited for your application.
getter/setter pair
- enableAutomaticPunctuation ↔ bool?
-
If 'true', adds punctuation to recognition result hypotheses.
getter/setter pair
- enableSeparateRecognitionPerChannel ↔ bool?
-
This needs to be set to
true
explicitly andaudio_channel_count
> 1 to get each channel recognized separately.getter/setter pair - enableSpokenEmojis ↔ bool?
-
The spoken emoji behavior for the call If not set, uses default behavior
based on model of choice If 'true', adds spoken emoji formatting for the
request.
getter/setter pair
- enableSpokenPunctuation ↔ bool?
-
The spoken punctuation behavior for the call If not set, uses default
behavior based on model of choice e.g. command_and_search will enable
spoken punctuation by default If 'true', replaces spoken punctuation with
the corresponding symbols in the request.
getter/setter pair
- enableWordConfidence ↔ bool?
-
If
true
, the top result includes a list of words and the confidence for those words.getter/setter pair - enableWordTimeOffsets ↔ bool?
-
If
true
, the top result includes a list of words and the start and end time offsets (timestamps) for those words.getter/setter pair - encoding ↔ String?
-
Encoding of audio data sent in all
RecognitionAudio
messages.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- languageCode ↔ String?
-
The language of the supplied audio as a
[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
getter/setter pair
- maxAlternatives ↔ int?
-
Maximum number of recognition hypotheses to be returned.
getter/setter pair
- metadata ↔ RecognitionMetadata?
-
Metadata regarding this request.
getter/setter pair
- model ↔ String?
-
Which model to select for the given request.
getter/setter pair
- profanityFilter ↔ bool?
-
If set to
true
, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. "f***".getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRateHertz ↔ int?
-
Sample rate in Hertz of the audio data sent in all
RecognitionAudio
messages.getter/setter pair -
speechContexts
↔ List<
SpeechContext> ? -
Array of SpeechContext.
getter/setter pair
- transcriptNormalization ↔ TranscriptNormalization?
-
Use transcription normalization to automatically replace parts of the
transcript with phrases of your choosing.
getter/setter pair
- useEnhanced ↔ bool?
-
Set to true to use an enhanced model for speech recognition.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited