Skip to content

Commit a331df0

Browse files
committed
refactor(stt): Add customization_id back to recognize_using_websocket
1 parent 3d68f5c commit a331df0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

MIGRATION-V4.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ The SDK no longer supports Pyhton versions 2.7 and <=3.4.
203203
#### Speech to Text V1
204204
* `final_results` was renamed to `final` in the SpeakerLabelsResult model
205205
* `final_results` was renamed to `final` in the SpeechRecognitionResult model
206-
* `customization_id` no longer a param in `recognize_using_websocket()` method
207206

208207
#### Visual Recognition V3
209208
* `detect_faces()` method was removed

ibm_watson/speech_to_text_v1_adapter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def recognize_using_websocket(self,
4343
speaker_labels=None,
4444
http_proxy_host=None,
4545
http_proxy_port=None,
46+
customization_id=None,
4647
grammar_name=None,
4748
redaction=None,
4849
processing_metrics=None,
@@ -144,6 +145,10 @@ def recognize_using_websocket(self,
144145
labels](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-output#speaker_labels).
145146
:param str http_proxy_host: http proxy host name.
146147
:param str http_proxy_port: http proxy port. If not set, set to 80.
148+
:param str customization_id: **Deprecated.** Use the `language_customization_id`
149+
parameter to specify the customization ID (GUID) of a custom language model that
150+
is to be used with the recognition request. Do not specify both parameters with a
151+
request.
147152
:param str grammar_name: The name of a grammar that is to be used with the
148153
recognition request. If you specify a grammar, you must also use the
149154
`language_customization_id` parameter to specify the name of the custom language
@@ -214,6 +219,7 @@ def recognize_using_websocket(self,
214219

215220
params = {
216221
'model': model,
222+
'customization_id': customization_id,
217223
'acoustic_customization_id': acoustic_customization_id,
218224
'base_model_version': base_model_version,
219225
'language_customization_id': language_customization_id

0 commit comments

Comments
 (0)