Skip to content

Commit f5321f9

Browse files
authored
[VideoTranslation] Initial add TypedSpec and swagger (Azure#29572)
1 parent 3519c80 commit f5321f9

22 files changed

+2393
-0
lines changed

cSpell.json

+8
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,14 @@
852852
"bicho"
853853
]
854854
},
855+
{
856+
"filename": "**/specification/cognitiveservices/data-plane/Speech/VideoTranslation/preview/2024-05-20-preview/VideoTranslation.json",
857+
"words": [
858+
"videotranslation",
859+
"webvtt",
860+
"Webvtt"
861+
]
862+
},
855863
{
856864
"filename": "**/specification/network/resource-manager/Microsoft.Network/stable/**/webapplicationfirewall.json",
857865
"words": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import "@azure-tools/typespec-client-generator-core";
2+
import "@typespec/rest";
3+
import "@typespec/http";
4+
import "@typespec/versioning";
5+
import "./main.tsp";
6+
7+
using Azure.ClientGenerator.Core;
8+
9+
@TypeSpec.Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2)
10+
@TypeSpec.Versioning.useDependency(
11+
Microsoft.Speech.VideoTranslation.ApiVersions.v2024_05_20_preview
12+
)
13+
namespace Microsoft.Speech.VideoTranslationClient;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"title": "Create Iteration",
3+
"operationId": "IterationOperations_CreateOrReplaceIteration",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"iterationId": "TranslateMyZhCNVideo-ContentEditing-2",
9+
"Ocp-Apim-Subscription-Key": "{API Key}",
10+
"Operation-Id": "Create-TranslateMyZhCNVideo-ContentEditing-2",
11+
"resource": {
12+
"description": "Fix segment duration issue and update subtitle max char.",
13+
"input": {
14+
"speakerCount": 3,
15+
"subtitleMaxCharCountPerSegment": 60,
16+
"webvttFile": {
17+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
18+
"kind": "MetadataJson"
19+
}
20+
}
21+
},
22+
"Content-Type": "application/json"
23+
},
24+
"responses": {
25+
"200": {
26+
"headers": {
27+
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo-ContentEditing-2?api-version=2024-02-01-preview",
28+
"Operation-Id": "TranslateMyZhCNVideo-ContentEditing-1"
29+
},
30+
"body": {
31+
"id": "TranslateMyZhCNVideo-ContentEditing-2",
32+
"description": "Fix segment duration issue and update subtitle max char.",
33+
"status": "NotStarted",
34+
"createdDateTime": "2023-04-10T05:30:00.000Z",
35+
"lastActionDateTime": "2023-04-10T05:15:30.000Z",
36+
"input": {
37+
"speakerCount": 3,
38+
"subtitleMaxCharCountPerSegment": 80,
39+
"webvttFile": {
40+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
41+
"kind": "MetadataJson"
42+
}
43+
}
44+
}
45+
},
46+
"201": {
47+
"headers": {
48+
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo-ContentEditing-2?api-version=2024-02-01-preview",
49+
"Operation-Id": "TranslateMyZhCNVideo-ContentEditing-1"
50+
},
51+
"body": {
52+
"id": "TranslateMyZhCNVideo-ContentEditing-2",
53+
"description": "Fix segment duration issue and update subtitle max char.",
54+
"status": "NotStarted",
55+
"createdDateTime": "2023-04-10T05:30:00.000Z",
56+
"lastActionDateTime": "2023-04-10T05:15:30.000Z",
57+
"input": {
58+
"speakerCount": 3,
59+
"subtitleMaxCharCountPerSegment": 80,
60+
"webvttFile": {
61+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
62+
"kind": "MetadataJson"
63+
}
64+
}
65+
}
66+
}
67+
}
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"title": "Get Iteration",
3+
"operationId": "IterationOperations_GetIteration",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"Ocp-Apim-Subscription-Key": "{API Key}",
9+
"iterationId": "TranslateMyZhCNVideo-Iteration-1"
10+
},
11+
"responses": {
12+
"200": {
13+
"headers": {},
14+
"body": {
15+
"id": "TranslateMyZhCNVideo-Iteration-1",
16+
"description": "Translate video from en-US to zh-CN, fix segment issue.",
17+
"status": "Succeeded",
18+
"createdDateTime": "2023-04-10T05:30:00.000Z",
19+
"lastActionDateTime": "2023-04-10T05:15:30.000Z",
20+
"input": {
21+
"speakerCount": 3,
22+
"subtitleMaxCharCountPerSegment": 80,
23+
"webvttFile": {
24+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
25+
"kind": "MetadataJson"
26+
}
27+
},
28+
"result": {
29+
"translatedVideoFileUrl": "https://xxx.blob.core.windows.net/container1/video.mp4?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
30+
"sourceLocaleSubtitleWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/sourceLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
31+
"targetLocaleSubtitleWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/targetLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
32+
"metadataJsonWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/metadataJsonLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
33+
}
34+
}
35+
}
36+
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"title": "List Iteration",
3+
"operationId": "IterationOperations_ListIteration",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"Ocp-Apim-Subscription-Key": "{API Key}"
9+
},
10+
"responses": {
11+
"200": {
12+
"headers": {},
13+
"body": {
14+
"value": [
15+
{
16+
"id": "Initial",
17+
"description": "Translate video from en-US to zh-CN, fix segment issue.",
18+
"input": {
19+
"speakerCount": 3,
20+
"subtitleMaxCharCountPerSegment": 80,
21+
"webvttFile": {
22+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
23+
"kind": "MetadataJson"
24+
}
25+
},
26+
"status": "Succeeded",
27+
"createdDateTime": "2023-04-10T05:30:00.000Z",
28+
"lastActionDateTime": "2023-04-10T05:15:30.000Z"
29+
},
30+
{
31+
"id": "TranslateMyZhCNVideo-Iteration-1",
32+
"description": "Translate video from en-US to zh-CN.",
33+
"input": {
34+
"speakerCount": 3,
35+
"subtitleMaxCharCountPerSegment": 80,
36+
"webvttFile": {
37+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
38+
"kind": "MetadataJson"
39+
}
40+
},
41+
"status": "Failed",
42+
"createdDateTime": "2023-04-01T05:30:00.000Z",
43+
"lastActionDateTime": "2023-04-10T05:15:30.000Z"
44+
},
45+
{
46+
"id": "TranslateMyZhCNVideo-Iteration-2",
47+
"description": "Translate video from en-US to zh-CN.",
48+
"input": {
49+
"speakerCount": 3,
50+
"subtitleMaxCharCountPerSegment": 80,
51+
"webvttFile": {
52+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
53+
"kind": "MetadataJson"
54+
}
55+
},
56+
"status": "Running",
57+
"createdDateTime": "2023-04-01T05:30:00.000Z",
58+
"lastActionDateTime": "2023-04-10T05:15:30.000Z"
59+
}
60+
],
61+
"nextLink": "https://eastus.api.cognitive.microsoft.com/video-translation/translations/TranslateMyZhCNVideo/iterations?skip=2&maxpagesize=2&api-version=2024-05-20-preview"
62+
}
63+
}
64+
}
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"title": "Get Operation",
3+
"operationId": "OperationOperations_GetOperation",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"operationId": "TranslateMyZhCNVideo-DeleteTranslate",
8+
"Ocp-Apim-Subscription-Key": "{API Key}"
9+
},
10+
"responses": {
11+
"200": {
12+
"headers": {},
13+
"body": {
14+
"id": "TranslateMyZhCNVideo-DeleteTranslate",
15+
"status": "Running"
16+
}
17+
}
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"title": "Create Translation",
3+
"operationId": "TranslationOperations_CreateOrReplaceTranslation",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"Ocp-Apim-Subscription-Key": "{API Key}",
9+
"Operation-Id": "Create-TranslateMyZhCNVideo",
10+
"resource": {
11+
"displayName": "hello.mp4",
12+
"description": "Translate video from en-US to zh-CN.",
13+
"input": {
14+
"sourceLocale": "en-US",
15+
"targetLocale": "zh-CN",
16+
"voiceKind": "PlatformVoice",
17+
"videoFileUrl": "https://mystorage.blob.core.windows.net/container1/video.mp4?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
18+
}
19+
},
20+
"Content-Type": "application/json"
21+
},
22+
"responses": {
23+
"200": {
24+
"headers": {
25+
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo?api-version=2024-02-01-preview",
26+
"Operation-Id": "Create-TranslateMyZhCNVideo"
27+
},
28+
"body": {
29+
"id": "TranslateMyZhCNVideo",
30+
"displayName": "hello.mp4",
31+
"description": "Translate video from en-US to zh-CN.",
32+
"input": {
33+
"sourceLocale": "en-US",
34+
"targetLocale": "zh-CN",
35+
"voiceKind": "PlatformVoice",
36+
"videoFileUrl": "https://mystorage.blob.core.windows.net/container1/video.mp4?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
37+
},
38+
"createdDateTime": "2023-04-01T05:30:00.000Z",
39+
"latestIteration": {
40+
"id": "Initial",
41+
"status": "NotStarted",
42+
"input": {
43+
"speakerCount": 3,
44+
"subtitleMaxCharCountPerSegment": 80,
45+
"webvttFile": {
46+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
47+
"kind": "MetadataJson"
48+
}
49+
}
50+
}
51+
}
52+
},
53+
"201": {
54+
"headers": {
55+
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo?api-version=2024-02-01-preview",
56+
"Operation-Id": "Create-TranslateMyZhCNVideo"
57+
},
58+
"body": {
59+
"id": "TranslateMyZhCNVideo",
60+
"description": "Translate video from en-US to zh-CN.",
61+
"input": {
62+
"sourceLocale": "en-US",
63+
"targetLocale": "zh-CN",
64+
"voiceKind": "PlatformVoice",
65+
"videoFileUrl": "https://mystorage.blob.core.windows.net/container1/video.mp4?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
66+
},
67+
"createdDateTime": "2023-04-01T05:30:00.000Z",
68+
"latestIteration": {
69+
"id": "Initial",
70+
"status": "NotStarted",
71+
"input": {
72+
"speakerCount": 3,
73+
"subtitleMaxCharCountPerSegment": 80,
74+
"webvttFile": {
75+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
76+
"kind": "MetadataJson"
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}
83+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"title": "Delete Translation",
3+
"operationId": "TranslationOperations_DeleteTranslation",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"Ocp-Apim-Subscription-Key": "{API Key}"
9+
},
10+
"responses": {
11+
"204": {
12+
"headers": {}
13+
}
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"title": "Get Translation",
3+
"operationId": "TranslationOperations_GetTranslation",
4+
"parameters": {
5+
"Endpoint": "https://eastus.api.cognitive.microsoft.com/",
6+
"api-version": "2024-05-20-preview",
7+
"translationId": "TranslateMyZhCNVideo",
8+
"Ocp-Apim-Subscription-Key": "{API Key}"
9+
},
10+
"responses": {
11+
"200": {
12+
"headers": {},
13+
"body": {
14+
"id": "TranslateMyZhCNVideo",
15+
"displayName": "hello.mp4",
16+
"description": "Translate video from en-US to zh-CN.",
17+
"input": {
18+
"sourceLocale": "en-US",
19+
"targetLocale": "zh-CN",
20+
"voiceKind": "PlatformVoice",
21+
"videoFileUrl": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
22+
},
23+
"createdDateTime": "2023-04-01T05:30:00.000Z",
24+
"latestIteration": {
25+
"id": "xxx",
26+
"description": "Iteration1",
27+
"status": "Running",
28+
"input": {
29+
"speakerCount": 3,
30+
"subtitleMaxCharCountPerSegment": 80,
31+
"webvttFile": {
32+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
33+
"kind": "MetadataJson"
34+
}
35+
}
36+
},
37+
"latestSucceededIteration": {
38+
"id": "xxx",
39+
"description": "Iteration1",
40+
"input": {
41+
"webvttFile": {
42+
"url": "https://xxx.blob.core.windows.net/container1/myvtt.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
43+
"kind": "MetadataJson"
44+
}
45+
},
46+
"result": {
47+
"translatedVideoFileUrl": "https://xxx.blob.core.windows.net/container1/video.mp4?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
48+
"sourceLocaleSubtitleWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/sourceLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
49+
"targetLocaleSubtitleWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/targetLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
50+
"metadataJsonWebvttFileUrl": "https://xxx.blob.core.windows.net/container1/metadataJsonLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx",
51+
"reportFileUrl": "https://xxx.blob.core.windows.net/container1/metadataJsonLocale.vtt?sv=2023-01-03&st=2024-05-20T08%3A27%3A15Z&se=2024-05-21T08%3A27%3A15Z&sr=b&sp=r&sig=xxx"
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}

0 commit comments

Comments
 (0)