bug: add customization_weight parameter to recognize() for stt
@@ -35,7 +35,8 @@ class SpeechToTextV1(WatsonService):
word_confidence=None, timestamps=None, interim_results=None,
profanity_filter=None,
smart_formatting=None,
- speaker_labels=None):
+ speaker_labels=None,
+ customization_weight=None):
"""
Returns the recognized text from the audio input
"""
@@ -55,6 +56,10 @@ class SpeechToTextV1(WatsonService):
'smart_formatting': smart_formatting,
'speaker_labels': speaker_labels}
+ if (params['customization_id'] is not None and
+ customization_weight is not None):
+ params['customization_weight'] = customization_weight
+
return self.request(method='POST', url='/v1/recognize',
headers=headers,
data=audio, params=params,
