Assets/Watson/Scripts/Services/TextToSpeech/TextToSpeech.cs
/// <summary>
/// Adds one or more words and their translations to the custom voice model with the specified `customization_id`. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add words to 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="words">Words object to add to custom voice model.</param>
/// <param name="customData">Optional custom data.</param>
/// <returns></returns>
Adds one or more words and their translations to the custom voice model with the specified `customization_id`. A custom model can contain no more than 20,000 entries. Only the owner of a custom voice model can use this method to add words to the model.
Note: This method is currently a beta release that supports US English only.
Adds one or more words and their translations to the custom voice model with the specified ` customization_id ` . A custom model can contain no more than 20 000 entries . Only the owner of a custom voice model can use this method to add words to the model . Note : This method is currently a beta release that supports US English only .
public bool AddCustomizationWords(AddCustomizationWordsCallback callback, string customizationID, Words words, string customData = default(string))
		{
			if (callback == null)
				throw new ArgumentNullException("callback");
			if (string.IsNullOrEmpty(customizationID))
				throw new ArgumentNullException("customizationID");
			if (!words.HasData())
				throw new ArgumentNullException("Words data is required to add words to a custom voice model.");
			fsData data;
			sm_Serializer.TrySerialize(words.GetType(), words, out data).AssertSuccessWithoutWarnings();
			string customizationJson = fsJsonPrinter.CompressedJson(data);
			AddCustomizationWordsRequest req = new AddCustomizationWordsRequest();
			req.Callback = callback;
			req.Words = words;
			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 = OnAddCustomizationWordsResp;
			string service = "/v1/customizations/{0}/words";
			RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(service, customizationID));
			if (connector == null)
				return false;
			return connector.Send(req);
		}
public bool AddCustomizationWords ( AddCustomizationWordsCallback callback , string customizationID , Words words , string customData = default ( string ) ) { if ( callback == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( customizationID ) ) throw new ArgumentNullException ( " " ) ; if ( ! words . HasData ( ) ) throw new ArgumentNullException ( " " ) ; fsData data ; sm_Serializer . TrySerialize ( words . GetType ( ) , words , out data ) . AssertSuccessWithoutWarnings ( ) ; string customizationJson = fsJsonPrinter . CompressedJson ( data ) ; AddCustomizationWordsRequest req = new AddCustomizationWordsRequest ( ) ; req . Callback = callback ; req . Words = words ; req . CustomizationID = customizationID ; req . Data = customData ; req . Headers [ " " ] = " " ; req . Headers [ " " ] = " " ; req . Send = Encoding . UTF8 . GetBytes ( customizationJson ) ; req . OnResponse = OnAddCustomizationWordsResp ; string service = " " ; RESTConnector connector = RESTConnector . GetConnector ( SERVICE_ID , string . Format ( service , customizationID ) ) ; if ( connector == null ) return false ; return connector . Send ( req ) ; }
Adds one or more words and their translations to the custom voice model with the specified `customization_id`.
Adds one or more words and their translations to the custom voice model with the specified ` customization_id ` .
None
callback
AddCustomizationWordsCallback
None
customizationID
string
The identifier of the custom voice model to be updated.
The identifier of the custom voice model to be updated .
words
Words
Words object to add to custom voice model.
Words object to add to custom voice model .
customData
string
Optional custom data.
Optional custom data .