@@ -48,6 +48,7 @@ def recognize_using_websocket(self,
4848 speaker_labels = None ,
4949 http_proxy_host = None ,
5050 http_proxy_port = None ,
51+ language_customization_id = None ,
5152 ** kwargs ):
5253 """
5354 Sends audio for speech recognition using web sockets.
@@ -61,12 +62,10 @@ def recognize_using_websocket(self,
6162 :param RecognizeCallback recognize_callback: The callback method for the websocket.
6263 :param str model: The identifier of the model that is to be used for the
6364 recognition request or, for the **Create a session** method, with the new session.
64- :param str customization_id: The customization ID (GUID) of a custom language
65- model that is to be used with the recognition request or, for the **Create a
66- session** method, with the new session. The base model of the specified custom
67- language model must match the model specified with the `model` parameter. You must
68- make the request with service credentials created for the instance of the service
69- that owns the custom model. By default, no custom language model is used.
65+ :param str customization_id: **Deprecated.** Use the `language_customization_id`
66+ parameter to specify the customization ID (GUID) of a custom language model that
67+ is to be used with the recognition request. Do not specify both parameters with a
68+ request.
7069 :param str acoustic_customization_id: The customization ID (GUID) of a custom
7170 acoustic model that is to be used with the recognition request or, for the
7271 **Create a session** method, with the new session. The base model of the specified
@@ -141,6 +140,15 @@ def recognize_using_websocket(self,
141140 labels](https://console.bluemix.net/docs/services/speech-to-text/output.html#speaker_labels).
142141 :param str http_proxy_host: http proxy host name.
143142 :param str http_proxy_port: http proxy port. If not set, set to 80.
143+ :param str language_customization_id: The customization ID (GUID) of a custom
144+ language model that is to be used with the recognition request. The base model of
145+ the specified custom language model must match the model specified with the
146+ `model` parameter. You must make the request with service credentials created for
147+ the instance of the service that owns the custom model. By default, no custom
148+ language model is used. See [Custom
149+ models](https://console.bluemix.net/docs/services/speech-to-text/input.html#custom).
150+ **Note:** Use this parameter instead of the deprecated `customization_id`
151+ parameter.
144152 :param dict headers: A `dict` containing the request headers
145153 :return: A `dict` containing the `SpeechRecognitionResults` response.
146154 :rtype: dict
@@ -178,7 +186,8 @@ def recognize_using_websocket(self,
178186 'customization_id' : customization_id ,
179187 'acoustic_customization_id' : acoustic_customization_id ,
180188 'customization_weight' : customization_weight ,
181- 'base_model_version' : base_model_version
189+ 'base_model_version' : base_model_version ,
190+ 'language_customization_id' : language_customization_id ,
182191 }
183192 params = _remove_null_values (params )
184193 url += '/v1/recognize?{0}' .format (urlencode (params ))
0 commit comments