@@ -2306,6 +2306,7 @@ def train_acoustic_model(self,
23062306 def upgrade_acoustic_model (self ,
23072307 customization_id ,
23082308 custom_language_model_id = None ,
2309+ force = None ,
23092310 ** kwargs ):
23102311 """
23112312 Upgrade a custom acoustic model.
@@ -2339,7 +2340,15 @@ def upgrade_acoustic_model(self,
23392340 :param str custom_language_model_id: If the custom acoustic model was trained with
23402341 a custom language model, the customization ID (GUID) of that custom language
23412342 model. The custom language model must be upgraded before the custom acoustic model
2342- can be upgraded.
2343+ can be upgraded. The credentials specified with the request must own both custom
2344+ models.
2345+ :param bool force: If `true`, forces the upgrade of a custom acoustic model for
2346+ which no input data has been modified since it was last trained. Use this
2347+ parameter only to force the upgrade of a custom acoustic model that is trained
2348+ with a custom language model, and only if you receive a 400 response code and the
2349+ message `No input data modified since last training`. See [Upgrading a custom
2350+ acoustic
2351+ model](https://cloud.ibm.com/docs/services/speech-to-text/custom-upgrade.html#upgradeAcoustic).
23432352 :param dict headers: A `dict` containing the request headers
23442353 :return: A `DetailedResponse` containing the result, headers and HTTP status code.
23452354 :rtype: DetailedResponse
@@ -2351,8 +2360,13 @@ def upgrade_acoustic_model(self,
23512360 headers = {}
23522361 if 'headers' in kwargs :
23532362 headers .update (kwargs .get ('headers' ))
2363+ headers [
2364+ 'X-IBMCloud-SDK-Analytics' ] = 'service_name=speech_to_text;service_version=V1;operation_id=upgrade_acoustic_model'
23542365
2355- params = {'custom_language_model_id' : custom_language_model_id }
2366+ params = {
2367+ 'custom_language_model_id' : custom_language_model_id ,
2368+ 'force' : force
2369+ }
23562370
23572371 url = '/v1/acoustic_customizations/{0}/upgrade_model' .format (
23582372 * self ._encode_path_vars (customization_id ))
0 commit comments