You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can refer to the code samples on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/batch-avatar).
36
36
@@ -40,9 +40,9 @@ Some properties in JSON format are required when you create a new batch synthesi
40
40
41
41
To submit a batch synthesis request, construct the HTTP POST request body following these instructions:
42
42
43
-
- Set the required `textType` property.
44
-
- If the `textType` property is set to `PlainText`, you must also set the `voice` property in the `synthesisConfig`. In the example below, the `textType` is set to `SSML`, so the `speechSynthesis` isn't set.
45
-
- Set the required `displayName` property. Choose a name for reference, and it doesn't have to be unique.
43
+
- Set the required `inputKind` property.
44
+
- If the `inputKind` property is set to `PlainText`, you must also set the `voice` property in the `synthesisConfig`. In the example below, the `inputKind` is set to `SSML`, so the `speechSynthesis` isn't set.
45
+
- Set the required `SynthesisId` property. Choose a unique `SynthesisId`for the same speech resource. The `SynthesisId` can be a string of 3 to 64 characters, including letters, numbers, '-', or '_', with the condition that it must start and end with a letter or number.
46
46
- Set the required `talkingAvatarCharacter` and `talkingAvatarStyle` properties. You can find supported avatar characters and styles [here](./avatar-gestures-with-ssml.md#supported-pre-built-avatar-characters-styles-and-gestures).
47
47
- Optionally, you can set the `videoFormat`, `backgroundColor`, and other properties. For more information, see [batch synthesis properties](batch-synthesis-avatar-properties.md).
48
48
@@ -53,47 +53,46 @@ To submit a batch synthesis request, construct the HTTP POST request body follow
53
53
>
54
54
> The maximum length for the output video is currently 20 minutes, with potential increases in the future.
55
55
56
-
To make an HTTP POST request, use the URI format shown in the following example. Replace `YourSpeechKey` with your Speech resource key, `YourSpeechRegion` with your Speech resource region, and set the request body properties as described above.
56
+
To make an HTTP PUT request, use the URI format shown in the following example. Replace `YourSpeechKey` with your Speech resource key, `YourSpeechRegion` with your Speech resource region, and set the request body properties as described above.
@@ -107,40 +106,45 @@ To retrieve the status of a batch synthesis job, make an HTTP GET request using
107
106
Replace `YourSynthesisId` with your batch synthesis ID, `YourSpeechKey` with your Speech resource key, and `YourSpeechRegion` with your Speech resource region.
108
107
109
108
```azurecli-interactive
110
-
curl -v -X GET "https://YourSpeechRegion.customvoice.api.speech.microsoft.com/api/texttospeech/3.1-preview1/batchsynthesis/talkingavatar/YourSynthesisId" -H "Ocp-Apim-Subscription-Key: YourSpeechKey"
109
+
curl -v -X GET "https://YourSpeechRegion.api.cognitive.microsoft.com/avatar/batchsyntheses/YourSynthesisId?api-version=2024-04-01-preview" -H "Ocp-Apim-Subscription-Key: YourSpeechKey"
111
110
```
112
111
113
112
You should receive a response body in the following format:
@@ -151,86 +155,93 @@ From the `outputs.result` field, you can download a video file containing the av
151
155
152
156
To list all batch synthesis jobs for your Speech resource, make an HTTP GET request using the URI as shown in the following example.
153
157
154
-
Replace `YourSpeechKey` with your Speech resource key and `YourSpeechRegion` with your Speech resource region. Optionally, you can set the `skip` and `top` (page size) query parameters in the URL. The default value for `skip` is 0, and the default value for `top` is 100.
158
+
Replace `YourSpeechKey` with your Speech resource key and `YourSpeechRegion` with your Speech resource region. Optionally, you can set the `skip` and `top` (page size) query parameters in the URL. The default value for `skip` is 0, and the default value for `maxpagesize` is 100.
155
159
156
160
```azurecli-interactive
157
-
curl -v -X GET "https://YourSpeechRegion.customvoice.api.speech.microsoft.com/api/texttospeech/3.1-preview1/batchsynthesis/talkingavatar?skip=0&top=2" -H "Ocp-Apim-Subscription-Key: YourSpeechKey"
161
+
curl -v -X GET "https://YourSpeechRegion.api.cognitive.microsoft.com/avatar/batchsyntheses?skip=0&maxpagesize=2&api-version=2024-04-01-preview" -H "Ocp-Apim-Subscription-Key: YourSpeechKey"
158
162
```
159
163
160
164
You receive a response body in the following format:
From `outputs.result`, you can download a video file containing the avatar video. From `outputs.summary`, you can access the summary and debug details. For more information, see [batch synthesis results](#get-batch-synthesis-results-file).
232
243
233
-
The `values` property in the JSON response lists your synthesis requests. The list is paginated, with a maximum page size of 100. The `@nextLink` property is provided as needed to get the next page of the paginated list.
244
+
The `value` property in the JSON response lists your synthesis requests. The list is paginated, with a maximum page size of 100. The `nextLink` property is provided as needed to get the next page of the paginated list.
234
245
235
246
## Get batch synthesis results file
236
247
@@ -252,34 +263,34 @@ The summary file contains the synthesis results for each text input. Here's an e
252
263
253
264
```json
254
265
{
255
-
"jobID": "c48b4cf5-957f-4a0f-96af-a4e3e71bd6b6",
256
-
"status": "Succeeded",
257
-
"results": [
266
+
"jobID": "5a25b929-1358-4e81-a036-33000e788c46",
267
+
"status": "Succeeded",
268
+
"results": [
258
269
{
259
-
"texts": [
260
-
"<speak version='1.0' xml:lang='en-US'>\n\t\t\t\t<voice name='en-US-JennyNeural'>\n\t\t\t\t\tThe rainbow has seven colors.\n\t\t\t\t</voice>\n\t\t\t</speak>"
270
+
"texts": [
271
+
"<speak version='1.0' xml:lang='en-US'><voice name='en-US-JennyNeural'>The rainbow has seven colors.</voice></speak>"
After you have retrieved the audio output results and no longer need the batch synthesis job history, you can delete it. The Speech service retains each synthesis history for up to 31 days or the duration specified by the request's `timeToLive` property, whichever comes sooner. The date and time of automatic deletion, for synthesis jobs with a status of "Succeeded" or "Failed" is calculated as the sum of the `lastActionDateTime` and `timeToLive` properties.
288
+
After you have retrieved the audio output results and no longer need the batch synthesis job history, you can delete it. The Speech service retains each synthesis history for up to 31 days or the duration specified by the request's `timeToLiveInHours` property, whichever comes sooner. The date and time of automatic deletion, for synthesis jobs with a status of "Succeeded" or "Failed" is calculated as the sum of the `lastActionDateTime` and `timeToLive` properties.
278
289
279
290
To delete a batch synthesis job, make an HTTP DELETE request using the following URI format. Replace `YourSynthesisId` with your batch synthesis ID, `YourSpeechKey` with your Speech resource key, and `YourSpeechRegion` with your Speech resource region.
0 commit comments