@@ -4968,7 +4968,8 @@ def __ne__(self, other):
4968
4968
class ProcessingMetrics (object ):
4969
4969
"""
4970
4970
If processing metrics are requested, information about the service's processing of the
4971
- input audio.
4971
+ input audio. Processing metrics are not available with the synchronous **Recognize
4972
+ audio** method.
4972
4973
4973
4974
:attr ProcessedAudio processed_audio: Detailed timing information about the service's
4974
4975
processing of the input audio.
@@ -5945,7 +5946,8 @@ class SpeechRecognitionResults(object):
5945
5946
methods that support them, it is possible for a `SpeechRecognitionResults` object to
5946
5947
include only the `speaker_labels` field.
5947
5948
:attr ProcessingMetrics processing_metrics: (optional) If processing metrics are
5948
- requested, information about the service's processing of the input audio.
5949
+ requested, information about the service's processing of the input audio. Processing
5950
+ metrics are not available with the synchronous **Recognize audio** method.
5949
5951
:attr AudioMetrics audio_metrics: (optional) If audio metrics are requested,
5950
5952
information about the signal characteristics of the input audio.
5951
5953
:attr list[str] warnings: (optional) An array of warning messages associated with the
@@ -5967,6 +5969,7 @@ def __init__(self,
5967
5969
results = None ,
5968
5970
result_index = None ,
5969
5971
speaker_labels = None ,
5972
+ processing_metrics = None ,
5970
5973
audio_metrics = None ,
5971
5974
warnings = None ):
5972
5975
"""
@@ -5990,6 +5993,8 @@ def __init__(self,
5990
5993
to include only the `speaker_labels` field.
5991
5994
:param ProcessingMetrics processing_metrics: (optional) If processing metrics are
5992
5995
requested, information about the service's processing of the input audio.
5996
+ Processing metrics are not available with the synchronous **Recognize audio**
5997
+ method.
5993
5998
:param AudioMetrics audio_metrics: (optional) If audio metrics are requested,
5994
5999
information about the signal characteristics of the input audio.
5995
6000
:param list[str] warnings: (optional) An array of warning messages associated with
@@ -6010,6 +6015,7 @@ def __init__(self,
6010
6015
self .results = results
6011
6016
self .result_index = result_index
6012
6017
self .speaker_labels = speaker_labels
6018
+ self .processing_metrics = processing_metrics
6013
6019
self .audio_metrics = audio_metrics
6014
6020
self .warnings = warnings
6015
6021
@@ -6038,6 +6044,9 @@ def _from_dict(cls, _dict):
6038
6044
SpeakerLabelsResult ._from_dict (x )
6039
6045
for x in (_dict .get ('speaker_labels' ))
6040
6046
]
6047
+ if 'processing_metrics' in _dict :
6048
+ args ['processing_metrics' ] = ProcessingMetrics ._from_dict (
6049
+ _dict .get ('processing_metrics' ))
6041
6050
if 'audio_metrics' in _dict :
6042
6051
args ['audio_metrics' ] = AudioMetrics ._from_dict (
6043
6052
_dict .get ('audio_metrics' ))
@@ -6056,6 +6065,10 @@ def _to_dict(self):
6056
6065
_dict ['speaker_labels' ] = [
6057
6066
x ._to_dict () for x in self .speaker_labels
6058
6067
]
6068
+ if hasattr (
6069
+ self ,
6070
+ 'processing_metrics' ) and self .processing_metrics is not None :
6071
+ _dict ['processing_metrics' ] = self .processing_metrics ._to_dict ()
6059
6072
if hasattr (self , 'audio_metrics' ) and self .audio_metrics is not None :
6060
6073
_dict ['audio_metrics' ] = self .audio_metrics ._to_dict ()
6061
6074
if hasattr (self , 'warnings' ) and self .warnings is not None :
@@ -6154,7 +6167,8 @@ class TrainingResponse(object):
6154
6167
6155
6168
:attr list[TrainingWarning] warnings: (optional) An array of `TrainingWarning` objects
6156
6169
that lists any invalid resources contained in the custom model. For custom language
6157
- models, invalid resources are grouped and identified by type of resource.
6170
+ models, invalid resources are grouped and identified by type of resource. The method
6171
+ can return warnings only if the `strict` parameter is set to `false`.
6158
6172
"""
6159
6173
6160
6174
def __init__ (self , warnings = None ):
@@ -6164,6 +6178,7 @@ def __init__(self, warnings=None):
6164
6178
:param list[TrainingWarning] warnings: (optional) An array of `TrainingWarning`
6165
6179
objects that lists any invalid resources contained in the custom model. For custom
6166
6180
language models, invalid resources are grouped and identified by type of resource.
6181
+ The method can return warnings only if the `strict` parameter is set to `false`.
6167
6182
"""
6168
6183
self .warnings = warnings
6169
6184
0 commit comments