Skip to content

Commit 235aef2

Browse files
committed
feat(TextToSpeechV1): add support for CustomModel and CustomModels
BREAKING CHANGE: Moved from VoiceModel and VoiceModels to CustomModel and CustomModels
1 parent 30eb7de commit 235aef2

File tree

10 files changed

+179
-201
lines changed

10 files changed

+179
-201
lines changed

Scripts/Services/TextToSpeech/V1/Model/VoiceModel.cs renamed to Scripts/Services/TextToSpeech/V1/Model/CustomModel.cs

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,54 +21,54 @@
2121
namespace IBM.Watson.TextToSpeech.V1.Model
2222
{
2323
/// <summary>
24-
/// Information about an existing custom voice model.
24+
/// Information about an existing custom model.
2525
/// </summary>
26-
public class VoiceModel
26+
public class CustomModel
2727
{
2828
/// <summary>
29-
/// The customization ID (GUID) of the custom voice model. The **Create a custom model** method returns only
30-
/// this field. It does not not return the other fields of this object.
29+
/// The customization ID (GUID) of the custom model. The **Create a custom model** method returns only this
30+
/// field. It does not not return the other fields of this object.
3131
/// </summary>
3232
[JsonProperty("customization_id", NullValueHandling = NullValueHandling.Ignore)]
3333
public string CustomizationId { get; set; }
3434
/// <summary>
35-
/// The name of the custom voice model.
35+
/// The name of the custom model.
3636
/// </summary>
3737
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
3838
public string Name { get; set; }
3939
/// <summary>
40-
/// The language identifier of the custom voice model (for example, `en-US`).
40+
/// The language identifier of the custom model (for example, `en-US`).
4141
/// </summary>
4242
[JsonProperty("language", NullValueHandling = NullValueHandling.Ignore)]
4343
public string Language { get; set; }
4444
/// <summary>
45-
/// The GUID of the credentials for the instance of the service that owns the custom voice model.
45+
/// The GUID of the credentials for the instance of the service that owns the custom model.
4646
/// </summary>
4747
[JsonProperty("owner", NullValueHandling = NullValueHandling.Ignore)]
4848
public string Owner { get; set; }
4949
/// <summary>
50-
/// The date and time in Coordinated Universal Time (UTC) at which the custom voice model was created. The value
51-
/// is provided in full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`).
50+
/// The date and time in Coordinated Universal Time (UTC) at which the custom model was created. The value is
51+
/// provided in full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`).
5252
/// </summary>
5353
[JsonProperty("created", NullValueHandling = NullValueHandling.Ignore)]
5454
public string Created { get; set; }
5555
/// <summary>
56-
/// The date and time in Coordinated Universal Time (UTC) at which the custom voice model was last modified. The
57-
/// `created` and `updated` fields are equal when a voice model is first added but has yet to be updated. The
58-
/// value is provided in full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`).
56+
/// The date and time in Coordinated Universal Time (UTC) at which the custom model was last modified. The
57+
/// `created` and `updated` fields are equal when a model is first added but has yet to be updated. The value is
58+
/// provided in full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`).
5959
/// </summary>
6060
[JsonProperty("last_modified", NullValueHandling = NullValueHandling.Ignore)]
6161
public string LastModified { get; set; }
6262
/// <summary>
63-
/// The description of the custom voice model.
63+
/// The description of the custom model.
6464
/// </summary>
6565
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
6666
public string Description { get; set; }
6767
/// <summary>
68-
/// An array of `Word` objects that lists the words and their translations from the custom voice model. The
69-
/// words are listed in alphabetical order, with uppercase letters listed before lowercase letters. The array is
70-
/// empty if the custom model contains no words. This field is returned only by the **Get a voice** method and
71-
/// only when you specify the customization ID of a custom voice model.
68+
/// An array of `Word` objects that lists the words and their translations from the custom model. The words are
69+
/// listed in alphabetical order, with uppercase letters listed before lowercase letters. The array is empty if
70+
/// the custom model contains no words. This field is returned only by the **Get a voice** method and only when
71+
/// you specify the customization ID of a custom model.
7272
/// </summary>
7373
[JsonProperty("words", NullValueHandling = NullValueHandling.Ignore)]
7474
public List<Word> Words { get; set; }

Scripts/Services/TextToSpeech/V1/Model/VoiceModel.cs.meta renamed to Scripts/Services/TextToSpeech/V1/Model/CustomModel.cs.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/TextToSpeech/V1/Model/VoiceModels.cs renamed to Scripts/Services/TextToSpeech/V1/Model/CustomModels.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,16 +21,16 @@
2121
namespace IBM.Watson.TextToSpeech.V1.Model
2222
{
2323
/// <summary>
24-
/// Information about existing custom voice models.
24+
/// Information about existing custom models.
2525
/// </summary>
26-
public class VoiceModels
26+
public class CustomModels
2727
{
2828
/// <summary>
29-
/// An array of `VoiceModel` objects that provides information about each available custom voice model. The
30-
/// array is empty if the requesting credentials own no custom voice models (if no language is specified) or own
31-
/// no custom voice models for the specified language.
29+
/// An array of `CustomModel` objects that provides information about each available custom model. The array is
30+
/// empty if the requesting credentials own no custom models (if no language is specified) or own no custom
31+
/// models for the specified language.
3232
/// </summary>
3333
[JsonProperty("customizations", NullValueHandling = NullValueHandling.Ignore)]
34-
public List<VoiceModel> Customizations { get; set; }
34+
public List<CustomModel> Customizations { get; set; }
3535
}
3636
}

Scripts/Services/TextToSpeech/V1/Model/VoiceModels.cs.meta renamed to Scripts/Services/TextToSpeech/V1/Model/CustomModels.cs.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/Services/TextToSpeech/V1/Model/Pronunciation.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,8 +25,8 @@ namespace IBM.Watson.TextToSpeech.V1.Model
2525
public class Pronunciation
2626
{
2727
/// <summary>
28-
/// The pronunciation of the specified text in the requested voice and format. If a custom voice model is
29-
/// specified, the pronunciation also reflects that custom voice.
28+
/// The pronunciation of the specified text in the requested voice and format. If a custom model is specified,
29+
/// the pronunciation also reflects that custom model.
3030
/// </summary>
3131
[JsonProperty("pronunciation", NullValueHandling = NullValueHandling.Ignore)]
3232
public string _Pronunciation { get; set; }

Scripts/Services/TextToSpeech/V1/Model/Voice.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020
namespace IBM.Watson.TextToSpeech.V1.Model
2121
{
2222
/// <summary>
23-
/// Information about an available voice model.
23+
/// Information about an available voice.
2424
/// </summary>
2525
public class Voice
2626
{
@@ -61,10 +61,10 @@ public class Voice
6161
[JsonProperty("supported_features", NullValueHandling = NullValueHandling.Ignore)]
6262
public SupportedFeatures SupportedFeatures { get; set; }
6363
/// <summary>
64-
/// Returns information about a specified custom voice model. This field is returned only by the **Get a voice**
65-
/// method and only when you specify the customization ID of a custom voice model.
64+
/// Returns information about a specified custom model. This field is returned only by the **Get a voice**
65+
/// method and only when you specify the customization ID of a custom model.
6666
/// </summary>
6767
[JsonProperty("customization", NullValueHandling = NullValueHandling.Ignore)]
68-
public VoiceModel Customization { get; set; }
68+
public CustomModel Customization { get; set; }
6969
}
7070
}

Scripts/Services/TextToSpeech/V1/Model/Voices.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
2121
namespace IBM.Watson.TextToSpeech.V1.Model
2222
{
2323
/// <summary>
24-
/// Information about all available voice models.
24+
/// Information about all available voices.
2525
/// </summary>
2626
public class Voices
2727
{

Scripts/Services/TextToSpeech/V1/Model/Word.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2018, 2020.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020
namespace IBM.Watson.TextToSpeech.V1.Model
2121
{
2222
/// <summary>
23-
/// Information about a word for the custom voice model.
23+
/// Information about a word for the custom model.
2424
/// </summary>
2525
public class Word
2626
{
@@ -115,7 +115,7 @@ public class PartOfSpeechValue
115115
[JsonProperty("part_of_speech", NullValueHandling = NullValueHandling.Ignore)]
116116
public string PartOfSpeech { get; set; }
117117
/// <summary>
118-
/// The word for the custom voice model. The maximum length of a word is 49 characters.
118+
/// The word for the custom model. The maximum length of a word is 49 characters.
119119
/// </summary>
120120
[JsonProperty("word", NullValueHandling = NullValueHandling.Ignore)]
121121
public string _Word { get; set; }

Scripts/Services/TextToSpeech/V1/Model/Words.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,20 +21,20 @@
2121
namespace IBM.Watson.TextToSpeech.V1.Model
2222
{
2323
/// <summary>
24-
/// For the **Add custom words** method, one or more words that are to be added or updated for the custom voice
25-
/// model and the translation for each specified word.
24+
/// For the **Add custom words** method, one or more words that are to be added or updated for the custom model and
25+
/// the translation for each specified word.
2626
///
27-
/// For the **List custom words** method, the words and their translations from the custom voice model.
27+
/// For the **List custom words** method, the words and their translations from the custom model.
2828
/// </summary>
2929
public class Words
3030
{
3131
/// <summary>
3232
/// The **Add custom words** method accepts an array of `Word` objects. Each object provides a word that is to
33-
/// be added or updated for the custom voice model and the word's translation.
33+
/// be added or updated for the custom model and the word's translation.
3434
///
3535
/// The **List custom words** method returns an array of `Word` objects. Each object shows a word and its
36-
/// translation from the custom voice model. The words are listed in alphabetical order, with uppercase letters
37-
/// listed before lowercase letters. The array is empty if the custom model contains no words.
36+
/// translation from the custom model. The words are listed in alphabetical order, with uppercase letters listed
37+
/// before lowercase letters. The array is empty if the custom model contains no words.
3838
/// </summary>
3939
[JsonProperty("words", NullValueHandling = NullValueHandling.Ignore)]
4040
public List<Word> _Words { get; set; }

0 commit comments

Comments
 (0)