Skip to content

Commit 3aa6a0e

Browse files
committed
Extract engine params;
1 parent 3c94812 commit 3aa6a0e

File tree

10 files changed

+603
-278
lines changed

10 files changed

+603
-278
lines changed

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ docs/SayStandard.md
153153
docs/SayStandardContentType.md
154154
docs/SayStandardCulture.md
155155
docs/SayStandardEngine.md
156+
docs/SayStandardEngineParameters.md
156157
docs/SayStandardVoice.md
157158
docs/SendDigits.md
158159
docs/SetDTMFPassThrough.md
@@ -343,6 +344,7 @@ src/main/java/com/github/freeclimbapi/SayStandard.java
343344
src/main/java/com/github/freeclimbapi/SayStandardContentType.java
344345
src/main/java/com/github/freeclimbapi/SayStandardCulture.java
345346
src/main/java/com/github/freeclimbapi/SayStandardEngine.java
347+
src/main/java/com/github/freeclimbapi/SayStandardEngineParameters.java
346348
src/main/java/com/github/freeclimbapi/SayStandardVoice.java
347349
src/main/java/com/github/freeclimbapi/SendDigits.java
348350
src/main/java/com/github/freeclimbapi/ServerConfiguration.java
@@ -517,6 +519,7 @@ src/test/java/com/github/freeclimbapi/SayNeuralTest.java
517519
src/test/java/com/github/freeclimbapi/SayNeuralTextTypeTest.java
518520
src/test/java/com/github/freeclimbapi/SayStandardContentTypeTest.java
519521
src/test/java/com/github/freeclimbapi/SayStandardCultureTest.java
522+
src/test/java/com/github/freeclimbapi/SayStandardEngineParametersTest.java
520523
src/test/java/com/github/freeclimbapi/SayStandardEngineTest.java
521524
src/test/java/com/github/freeclimbapi/SayStandardTest.java
522525
src/test/java/com/github/freeclimbapi/SayStandardVoiceTest.java

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ Class | Method | HTTP request | Description
362362
- [SayStandardContentType](docs/SayStandardContentType.md)
363363
- [SayStandardCulture](docs/SayStandardCulture.md)
364364
- [SayStandardEngine](docs/SayStandardEngine.md)
365+
- [SayStandardEngineParameters](docs/SayStandardEngineParameters.md)
365366
- [SayStandardVoice](docs/SayStandardVoice.md)
366367
- [SendDigits](docs/SendDigits.md)
367368
- [SetDTMFPassThrough](docs/SetDTMFPassThrough.md)

docs/SayStandardEngine.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Language and (by implication) the locale to use. This implies the accent and pro
99
Name | Type | Description | Notes
1010
------------ | ------------- | ------------- | -------------
1111
**name** | **String** | The name of the TTS engine to use. Set to `freeclimb.standard` for to use the standard freeclimb TTS engine. | [optional]
12-
**voice** | **SayStandardVoice** | | [optional]
13-
**culture** | **SayStandardCulture** | | [optional]
14-
**contentType** | **SayStandardContentType** | | [optional]
12+
**parameters** | [**SayStandardEngineParameters**](SayStandardEngineParameters.md) | | [optional]
1513

1614

1715

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
# SayStandardEngineParameters
4+
5+
The parameters to use for the TTS. The complete list of valid values for the parameters attribute is shown below.
6+
7+
## Properties
8+
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**voice** | **SayStandardVoice** | | [optional]
12+
**culture** | **SayStandardCulture** | | [optional]
13+
**contentType** | **SayStandardContentType** | | [optional]
14+
15+
16+

openapi.json

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2555,6 +2555,25 @@
25552555
"enum": ["text", "ssml"],
25562556
"description": "The type of text to use for the TTS. The complete list of valid values for the text type attribute is shown below."
25572557
},
2558+
"SayNeuralEngineParameters": {
2559+
"description": "The parameters to use for the TTS. The complete list of valid values for the parameters attribute is shown below.",
2560+
"type": "object",
2561+
"properties": {
2562+
"voice": {
2563+
"description": "The voice to use for the TTS. The complete list of valid values for the voice attribute is shown below.",
2564+
"type": "string",
2565+
"default": "Eve"
2566+
},
2567+
"textType": {
2568+
"$ref": "#/components/schemas/SayNeuralTextType"
2569+
},
2570+
"language": {
2571+
"description": "The language to use for the TTS. The complete list of valid values for the language attribute is shown below.",
2572+
"type": "string",
2573+
"default": "en-US"
2574+
}
2575+
}
2576+
},
25582577
"SayNeural": {
25592578
"description": "The `SayNeural` command provides Text-To-Speech (TTS) support using the freeclimb.neural TTS engine. It converts text to speech and then renders it in a female voice back to the caller. `SayNeural` is useful in cases where it's difficult to pre-record a prompt for any reason. `SayNeural` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested.",
25602579
"required": ["text", "engine"],
@@ -2584,23 +2603,7 @@
25842603
"default": "freeclimb.neural"
25852604
},
25862605
"parameters": {
2587-
"description": "The parameters to use for the TTS. The complete list of valid values for the parameters attribute is shown below.",
2588-
"type": "object",
2589-
"properties": {
2590-
"voice": {
2591-
"description": "The voice to use for the TTS. The complete list of valid values for the voice attribute is shown below.",
2592-
"type": "string",
2593-
"default": "Eve"
2594-
},
2595-
"textType": {
2596-
"$ref": "#/components/schemas/SayNeuralTextType"
2597-
},
2598-
"language": {
2599-
"description": "The language to use for the TTS. The complete list of valid values for the language attribute is shown below.",
2600-
"type": "string",
2601-
"default": "en-US"
2602-
}
2603-
}
2606+
"$ref": "#/components/schemas/SayNeuralEngineParameters"
26042607
}
26052608
}
26062609
}
@@ -2675,6 +2678,21 @@
26752678
"type": "string",
26762679
"enum": ["text/plain", "application/ssml+xml"]
26772680
},
2681+
"SayStandardEngineParameters": {
2682+
"description": "The parameters to use for the TTS. The complete list of valid values for the parameters attribute is shown below.",
2683+
"type": "object",
2684+
"properties": {
2685+
"Voice": {
2686+
"$ref": "#/components/schemas/SayStandardVoice"
2687+
},
2688+
"Culture": {
2689+
"$ref": "#/components/schemas/SayStandardCulture"
2690+
},
2691+
"Content-Type": {
2692+
"$ref": "#/components/schemas/SayStandardContentType"
2693+
}
2694+
}
2695+
},
26782696
"SayStandard": {
26792697
"description": "The `Say` command provides Text-To-Speech (TTS) support using the freeclimb.standard TTS engine. It converts text to speech and then renders it in a female voice back to the caller. `SayStandard` is useful in cases where it's difficult to pre-record a prompt for any reason. `SayStandard` does not allow barge-in unless nested within a `GetSpeech` command. The file will always be played to completion unless nested.",
26802698
"required": ["text", "engine"],
@@ -2703,14 +2721,8 @@
27032721
"type": "string",
27042722
"default": "freeclimb.standard"
27052723
},
2706-
"Voice": {
2707-
"$ref": "#/components/schemas/SayStandardVoice"
2708-
},
2709-
"Culture": {
2710-
"$ref": "#/components/schemas/SayStandardCulture"
2711-
},
2712-
"Content-Type": {
2713-
"$ref": "#/components/schemas/SayStandardContentType"
2724+
"parameters": {
2725+
"$ref": "#/components/schemas/SayStandardEngineParameters"
27142726
}
27152727
}
27162728
}

src/main/java/com/github/freeclimbapi/models/SayStandardEngine.java

Lines changed: 14 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,10 @@ public static String getDiscriminatorValue() {
3939
@SerializedName(SERIALIZED_NAME_NAME)
4040
private String name = "freeclimb.standard";
4141

42-
public static final String SERIALIZED_NAME_VOICE = "Voice";
42+
public static final String SERIALIZED_NAME_PARAMETERS = "parameters";
4343

44-
@SerializedName(SERIALIZED_NAME_VOICE)
45-
private SayStandardVoice voice;
46-
47-
public static final String SERIALIZED_NAME_CULTURE = "Culture";
48-
49-
@SerializedName(SERIALIZED_NAME_CULTURE)
50-
private SayStandardCulture culture;
51-
52-
public static final String SERIALIZED_NAME_CONTENT_TYPE = "Content-Type";
53-
54-
@SerializedName(SERIALIZED_NAME_CONTENT_TYPE)
55-
private SayStandardContentType contentType;
44+
@SerializedName(SERIALIZED_NAME_PARAMETERS)
45+
private SayStandardEngineParameters parameters;
5646

5747
public SayStandardEngine() {}
5848

@@ -81,67 +71,25 @@ public void setName(String name) {
8171
this.name = name;
8272
}
8373

84-
public SayStandardEngine voice(SayStandardVoice voice) {
85-
86-
this.voice = voice;
87-
return this;
88-
}
89-
90-
/**
91-
* Get voice
92-
*
93-
* @return voice
94-
*/
95-
@javax.annotation.Nullable
96-
@ApiModelProperty(value = "")
97-
public SayStandardVoice getVoice() {
98-
return voice;
99-
}
100-
101-
public void setVoice(SayStandardVoice voice) {
102-
this.voice = voice;
103-
}
104-
105-
public SayStandardEngine culture(SayStandardCulture culture) {
106-
107-
this.culture = culture;
108-
return this;
109-
}
110-
111-
/**
112-
* Get culture
113-
*
114-
* @return culture
115-
*/
116-
@javax.annotation.Nullable
117-
@ApiModelProperty(value = "")
118-
public SayStandardCulture getCulture() {
119-
return culture;
120-
}
121-
122-
public void setCulture(SayStandardCulture culture) {
123-
this.culture = culture;
124-
}
125-
126-
public SayStandardEngine contentType(SayStandardContentType contentType) {
74+
public SayStandardEngine parameters(SayStandardEngineParameters parameters) {
12775

128-
this.contentType = contentType;
76+
this.parameters = parameters;
12977
return this;
13078
}
13179

13280
/**
133-
* Get contentType
81+
* Get parameters
13482
*
135-
* @return contentType
83+
* @return parameters
13684
*/
13785
@javax.annotation.Nullable
13886
@ApiModelProperty(value = "")
139-
public SayStandardContentType getContentType() {
140-
return contentType;
87+
public SayStandardEngineParameters getParameters() {
88+
return parameters;
14189
}
14290

143-
public void setContentType(SayStandardContentType contentType) {
144-
this.contentType = contentType;
91+
public void setParameters(SayStandardEngineParameters parameters) {
92+
this.parameters = parameters;
14593
}
14694

14795
@Override
@@ -154,24 +102,20 @@ public boolean equals(Object o) {
154102
}
155103
SayStandardEngine sayStandardEngine = (SayStandardEngine) o;
156104
return Objects.equals(this.name, sayStandardEngine.name)
157-
&& Objects.equals(this.voice, sayStandardEngine.voice)
158-
&& Objects.equals(this.culture, sayStandardEngine.culture)
159-
&& Objects.equals(this.contentType, sayStandardEngine.contentType);
105+
&& Objects.equals(this.parameters, sayStandardEngine.parameters);
160106
}
161107

162108
@Override
163109
public int hashCode() {
164-
return Objects.hash(name, voice, culture, contentType);
110+
return Objects.hash(name, parameters);
165111
}
166112

167113
@Override
168114
public String toString() {
169115
StringBuilder sb = new StringBuilder();
170116
sb.append("class SayStandardEngine {\n");
171117
sb.append(" name: ").append(toIndentedString(name)).append("\n");
172-
sb.append(" voice: ").append(toIndentedString(voice)).append("\n");
173-
sb.append(" culture: ").append(toIndentedString(culture)).append("\n");
174-
sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n");
118+
sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n");
175119
sb.append("}");
176120
return sb.toString();
177121
}

0 commit comments

Comments
 (0)