Skip to content

Commit cda03b4

Browse files
authored
remove tts voice test create function (#185)
1 parent b55edf0 commit cda03b4

File tree

5 files changed

+2
-68
lines changed

5 files changed

+2
-68
lines changed

CustomVoice-API-Samples/CSharp/CustomVoice-API/API/API_V3.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public class API_V3
3232
private static string VoiceTests_Base => TextToSpeechBasePath_V3_beta1 + "tests";
3333
public static string VoiceTests_GetByModelId => VoiceTests_Base + "/model/{0}";
3434
public static string VoiceTests_GetByProjectId => VoiceTests_Base + "/project/{0}";
35-
public static string VoiceTests_Create => VoiceTests_Base;
3635
public static string VoiceTests_DeleteById => VoiceTests_Base + "/{0}";
3736

3837
//Voice Endpoints

CustomVoice-API-Samples/CSharp/CustomVoice-API/API/VoiceTest.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,5 @@ public static bool DeleteById(string subscriptionKey, string hostURI, string voi
3232

3333
return true;
3434
}
35-
36-
public static bool Create(string subscriptionKey, string hostURI, Guid projectId, Guid modelId, string script, bool isSSML)
37-
{
38-
string TextKind = "Text";
39-
if (isSSML)
40-
{
41-
TextKind = "SSML";
42-
}
43-
44-
var voiceTestDefinition = VoiceTestDefinition.Create(
45-
new Identity(modelId),
46-
script,
47-
TextKind,
48-
new Identity(projectId));
49-
50-
var response = APIHelper.Submit<VoiceTestDefinition>(subscriptionKey, hostURI + API_V3.VoiceTests_Create, voiceTestDefinition);
51-
52-
if (response.StatusCode != HttpStatusCode.Accepted)
53-
{
54-
APIHelper.PrintErrorMessage(response);
55-
return false;
56-
}
57-
return true;
58-
}
5935
}
6036
}

CustomVoice-API-Samples/CSharp/CustomVoice-API/APIArguments.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ public static Dictionary<string, List<string>> GetParameters(APIKind apiKind, Ac
196196
OptionalParameters = new List<string>() { ProjectId, Description };
197197
break;
198198
}
199-
case nameof(APIKind.voicetest) + "-" + nameof(Action.create):
200-
{
201-
RequiredParameters = new List<string>() { SubscriptionKey, HostUri, ProjectId, ModelId, "script" };
202-
OptionalParameters = new List<string>() { "isSSML" };
203-
break;
204-
}
205199
case nameof(APIKind.voicetest) + "-" + nameof(Action.get):
206200
{
207201
RequiredParameters = new List<string>() { SubscriptionKey, HostUri, ModelId };

CustomVoice-API-Samples/CSharp/CustomVoice-API/APIHandler.cs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,7 @@ private static void ExecuteVoiceTestApi(Action action, Dictionary<string, string
128128
break;
129129
case Action.delete:
130130
VoiceTestDeleteById(arguments);
131-
break;
132-
case Action.create:
133-
VoiceTestCreate(arguments);
134-
break;
131+
break;
135132
default:
136133
break;
137134
}
@@ -531,30 +528,6 @@ private static void VoiceTestDeleteById(Dictionary<string, string> arguments)
531528
}
532529
}
533530

534-
private static void VoiceTestCreate(Dictionary<string, string> arguments)
535-
{
536-
string subscriptionKey = arguments["subscriptionkey"];
537-
string hostURI = arguments["hosturi"];
538-
string projectId = arguments["projectid"];
539-
string modelId = arguments["modelid"];
540-
string script = arguments["script"];
541-
bool isSSML = false;
542-
543-
if (arguments.Keys.ToList().Contains("isssml"))
544-
{
545-
isSSML = Convert.ToBoolean(arguments["isssml"]);
546-
}
547-
548-
if (VoiceTest.Create(subscriptionKey, hostURI, new Guid(projectId), new Guid(modelId), script, isSSML))
549-
{
550-
Console.WriteLine("Create voice test successfully");
551-
}
552-
else
553-
{
554-
Console.WriteLine("Create voice test failed");
555-
}
556-
}
557-
558531
private static void EndpointGet(Dictionary<string, string> arguments)
559532
{
560533
string subscriptionKey = arguments["subscriptionkey"];

CustomVoice-API-Samples/CSharp/CustomVoice-API/ArgumentsDescription.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ public static void PrintAPIKindUsage(APIKind apiKind)
109109
Console.WriteLine(" Get");
110110
Console.WriteLine(" Gets details of the specified model's voice test.");
111111
Console.WriteLine(" GetByProjectId");
112-
Console.WriteLine(" Get the list of voice tests for specified project.");
113-
Console.WriteLine(" Create");
114-
Console.WriteLine(" Creates a new voice test.");
112+
Console.WriteLine(" Get the list of voice tests for specified project.");
115113
Console.WriteLine(" Delete");
116114
Console.WriteLine(" Deletes the specified voice test.");
117115
Console.WriteLine("");
@@ -334,12 +332,6 @@ public static void PrintVoiceTestActionUsage(Action action, Dictionary<string, L
334332
sampleCommand = $"CustomVoice-API voicetest getbyprojectid subscriptionKey [YourSubscriptionKey] hostURI {hostUri} projectId [ProjectId]";
335333
PrintActionUsageBase(actionString, description, sampleCommand, parameters);
336334
break;
337-
case Action.create:
338-
actionString = "voicetest create";
339-
description = "Creates a new voice test.";
340-
sampleCommand = $"CustomVoice-API voicetest create subscriptionKey [YourSubscriptionKey] hostURI {hostUri} projectId [ProjectId] modelId [ModelId] script 12345 isSSML false";
341-
PrintActionUsageBase(actionString, description, sampleCommand, parameters);
342-
break;
343335
case Action.delete:
344336
actionString = "voicetest delete";
345337
description = "Deletes the specified voice test.";

0 commit comments

Comments
 (0)