Assets/Watson/Scripts/Services/TextToSpeech/TextToSpeech.cs
/// <summary>
/// Updates information for the custom voice model with the specified `customization_id`. You can update the metadata such as the name and description of the voice model. You can also update the words in the model and their translations. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to update the model.
/// Note: This method is currently a beta release that supports US English only.
/// </summary>
/// <param name="callback">The callback.</param>
/// <param name="customizationID">The identifier of the custom voice model to be updated.</param>
/// <param name="customVoiceUpdate">Custom voice model update data.</param>
/// <param name="customData">Optional custom data.</param>
/// <returns></returns>
Updates information for the custom voice model with the specified `customization_id`. You can update the metadata such as the name and description of the voice model. You can also update the words in the model and their translations. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to update the model.
Note: This method is currently a beta release that supports US English only.
Updates information for the custom voice model with the specified ` customization_id ` . You can update the metadata such as the name and description of the voice model . You can also update the words in the model and their translations . A custom model can contain no more than 20 000 entries . Only the owner of a custom voice model can use this method to update the model . Note : This method is currently a beta release that supports US English only .
public bool UpdateCustomization(UpdateCustomizationCallback callback, string customizationID, CustomVoiceUpdate customVoiceUpdate, string customData = default(string))
		{
			if (callback == null)
				throw new ArgumentNullException("callback");
			if (string.IsNullOrEmpty(customizationID))
				throw new ArgumentNullException("customizationID");
			if (!customVoiceUpdate.HasData())
				throw new ArgumentNullException("Custom voice update data is required to update a custom voice model.");
			fsData data;
			sm_Serializer.TrySerialize(customVoiceUpdate.GetType(), customVoiceUpdate, out data).AssertSuccessWithoutWarnings();
			string customizationJson = fsJsonPrinter.CompressedJson(data);
			UpdateCustomizationRequest req = new UpdateCustomizationRequest();
			req.Callback = callback;
			req.CustomVoiceUpdate = customVoiceUpdate;
			req.CustomizationID = customizationID;
			req.Data = customData;
			req.Headers["Content-Type"] = "application/json";
			req.Headers["Accept"] = "application/json";
			req.Send = Encoding.UTF8.GetBytes(customizationJson);
			req.OnResponse = OnUpdateCustomizationResp;
			string service = "/v1/customizations/{0}";
			RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(service, customizationID));
			if (connector == null)
				return false;
			return connector.Send(req);
		}
public bool UpdateCustomization ( UpdateCustomizationCallback callback , string customizationID , CustomVoiceUpdate customVoiceUpdate , string customData = default ( string ) ) { if ( callback == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( customizationID ) ) throw new ArgumentNullException ( " " ) ; if ( ! customVoiceUpdate . HasData ( ) ) throw new ArgumentNullException ( " " ) ; fsData data ; sm_Serializer . TrySerialize ( customVoiceUpdate . GetType ( ) , customVoiceUpdate , out data ) . AssertSuccessWithoutWarnings ( ) ; string customizationJson = fsJsonPrinter . CompressedJson ( data ) ; UpdateCustomizationRequest req = new UpdateCustomizationRequest ( ) ; req . Callback = callback ; req . CustomVoiceUpdate = customVoiceUpdate ; req . CustomizationID = customizationID ; req . Data = customData ; req . Headers [ " " ] = " " ; req . Headers [ " " ] = " " ; req . Send = Encoding . UTF8 . GetBytes ( customizationJson ) ; req . OnResponse = OnUpdateCustomizationResp ; string service = " " ; RESTConnector connector = RESTConnector . GetConnector ( SERVICE_ID , string . Format ( service , customizationID ) ) ; if ( connector == null ) return false ; return connector . Send ( req ) ; }
Updates information for the custom voice model with the specified `customization_id`.
Updates information for the custom voice model with the specified ` customization_id ` .
None
callback
UpdateCustomizationCallback
None
customizationID
string
The identifier of the custom voice model to be updated.
The identifier of the custom voice model to be updated .
customVoiceUpdate
CustomVoiceUpdate
Custom voice model update data.
Custom voice model update data .
customData
string
Optional custom data.
Optional custom data .