public class SpeechRecognitionResults
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Field and Description |
---|---|
protected AudioMetrics |
audioMetrics |
protected ProcessingMetrics |
processingMetrics |
protected java.lang.Long |
resultIndex |
protected java.util.List<SpeechRecognitionResult> |
results |
protected java.util.List<SpeakerLabelsResult> |
speakerLabels |
protected java.util.List<java.lang.String> |
warnings |
Constructor and Description |
---|
SpeechRecognitionResults() |
Modifier and Type | Method and Description |
---|---|
AudioMetrics |
getAudioMetrics()
Gets the audioMetrics.
|
ProcessingMetrics |
getProcessingMetrics()
Gets the processingMetrics.
|
java.lang.Long |
getResultIndex()
Gets the resultIndex.
|
java.util.List<SpeechRecognitionResult> |
getResults()
Gets the results.
|
java.util.List<SpeakerLabelsResult> |
getSpeakerLabels()
Gets the speakerLabels.
|
java.util.List<java.lang.String> |
getWarnings()
Gets the warnings.
|
protected java.util.List<SpeechRecognitionResult> results
@SerializedName(value="result_index") protected java.lang.Long resultIndex
@SerializedName(value="speaker_labels") protected java.util.List<SpeakerLabelsResult> speakerLabels
@SerializedName(value="processing_metrics") protected ProcessingMetrics processingMetrics
@SerializedName(value="audio_metrics") protected AudioMetrics audioMetrics
protected java.util.List<java.lang.String> warnings
public java.util.List<SpeechRecognitionResult> getResults()
An array of `SpeechRecognitionResult` objects that can include interim and final results (interim results are returned only if supported by the method). Final results are guaranteed not to change; interim results might be replaced by further interim results and final results. The service periodically sends updates to the results list; the `result_index` is set to the lowest index in the array that has changed; it is incremented for new results.
public java.lang.Long getResultIndex()
An index that indicates a change point in the `results` array. The service increments the index only for additional results that it sends for new audio for the same request.
public java.util.List<SpeakerLabelsResult> getSpeakerLabels()
An array of `SpeakerLabelsResult` objects that identifies which words were spoken by which speakers in a multi-person exchange. The array is returned only if the `speaker_labels` parameter is `true`. When interim results are also requested for methods that support them, it is possible for a `SpeechRecognitionResults` object to include only the `speaker_labels` field.
public ProcessingMetrics getProcessingMetrics()
If processing metrics are requested, information about the service's processing of the input audio. Processing metrics are not available with the synchronous **Recognize audio** method.
public AudioMetrics getAudioMetrics()
If audio metrics are requested, information about the signal characteristics of the input audio.
public java.util.List<java.lang.String> getWarnings()
An array of warning messages associated with the request: * Warnings for invalid parameters or fields can include a descriptive message and a list of invalid argument strings, for example, `"Unknown arguments:"` or `"Unknown url query arguments:"` followed by a list of the form `"{invalid_arg_1}, {invalid_arg_2}."` * The following warning is returned if the request passes a custom model that is based on an older version of a base model for which an updated version is available: `"Using previous version of base model, because your custom model has been built with it. Please note that this version will be supported only for a limited time. Consider updating your custom model to the new base model. If you do not do that you will be automatically switched to base model when you used the non-updated custom model."`
In both cases, the request succeeds despite the warnings.