forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VideoTranslation] Initial add TypedSpec and swagger (Azure#29572)
- Loading branch information
1 parent
3519c80
commit f5321f9
Showing
22 changed files
with
2,393 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
specification/cognitiveservices/Speech.VideoTranslation/client.tsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import "@azure-tools/typespec-client-generator-core"; | ||
import "@typespec/rest"; | ||
import "@typespec/http"; | ||
import "@typespec/versioning"; | ||
import "./main.tsp"; | ||
|
||
using Azure.ClientGenerator.Core; | ||
|
||
@TypeSpec.Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2) | ||
@TypeSpec.Versioning.useDependency( | ||
Microsoft.Speech.VideoTranslation.ApiVersions.v2024_05_20_preview | ||
) | ||
namespace Microsoft.Speech.VideoTranslationClient; |
68 changes: 68 additions & 0 deletions
68
...Translation/examples/2024-05-20-preview/IterationOperations_CreateOrReplaceIteration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"title": "Create Iteration", | ||
"operationId": "IterationOperations_CreateOrReplaceIteration", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"iterationId": "TranslateMyZhCNVideo-ContentEditing-2", | ||
"Ocp-Apim-Subscription-Key": "{API Key}", | ||
"Operation-Id": "Create-TranslateMyZhCNVideo-ContentEditing-2", | ||
"resource": { | ||
"description": "Fix segment duration issue and update subtitle max char.", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 60, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
}, | ||
"Content-Type": "application/json" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo-ContentEditing-2?api-version=2024-02-01-preview", | ||
"Operation-Id": "TranslateMyZhCNVideo-ContentEditing-1" | ||
}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo-ContentEditing-2", | ||
"description": "Fix segment duration issue and update subtitle max char.", | ||
"status": "NotStarted", | ||
"createdDateTime": "2023-04-10T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": { | ||
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo-ContentEditing-2?api-version=2024-02-01-preview", | ||
"Operation-Id": "TranslateMyZhCNVideo-ContentEditing-1" | ||
}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo-ContentEditing-2", | ||
"description": "Fix segment duration issue and update subtitle max char.", | ||
"status": "NotStarted", | ||
"createdDateTime": "2023-04-10T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...Speech.VideoTranslation/examples/2024-05-20-preview/IterationOperations_GetIteration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"title": "Get Iteration", | ||
"operationId": "IterationOperations_GetIteration", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"Ocp-Apim-Subscription-Key": "{API Key}", | ||
"iterationId": "TranslateMyZhCNVideo-Iteration-1" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo-Iteration-1", | ||
"description": "Translate video from en-US to zh-CN, fix segment issue.", | ||
"status": "Succeeded", | ||
"createdDateTime": "2023-04-10T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
}, | ||
"result": { | ||
"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", | ||
"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", | ||
"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", | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
...peech.VideoTranslation/examples/2024-05-20-preview/IterationOperations_ListIteration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"title": "List Iteration", | ||
"operationId": "IterationOperations_ListIteration", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"Ocp-Apim-Subscription-Key": "{API Key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "Initial", | ||
"description": "Translate video from en-US to zh-CN, fix segment issue.", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
}, | ||
"status": "Succeeded", | ||
"createdDateTime": "2023-04-10T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z" | ||
}, | ||
{ | ||
"id": "TranslateMyZhCNVideo-Iteration-1", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
}, | ||
"status": "Failed", | ||
"createdDateTime": "2023-04-01T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z" | ||
}, | ||
{ | ||
"id": "TranslateMyZhCNVideo-Iteration-2", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
}, | ||
"status": "Running", | ||
"createdDateTime": "2023-04-01T05:30:00.000Z", | ||
"lastActionDateTime": "2023-04-10T05:15:30.000Z" | ||
} | ||
], | ||
"nextLink": "https://eastus.api.cognitive.microsoft.com/video-translation/translations/TranslateMyZhCNVideo/iterations?skip=2&maxpagesize=2&api-version=2024-05-20-preview" | ||
} | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...Speech.VideoTranslation/examples/2024-05-20-preview/OperationOperations_GetOperation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"title": "Get Operation", | ||
"operationId": "OperationOperations_GetOperation", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"operationId": "TranslateMyZhCNVideo-DeleteTranslate", | ||
"Ocp-Apim-Subscription-Key": "{API Key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo-DeleteTranslate", | ||
"status": "Running" | ||
} | ||
} | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
...slation/examples/2024-05-20-preview/TranslationOperations_CreateOrReplaceTranslation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"title": "Create Translation", | ||
"operationId": "TranslationOperations_CreateOrReplaceTranslation", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"Ocp-Apim-Subscription-Key": "{API Key}", | ||
"Operation-Id": "Create-TranslateMyZhCNVideo", | ||
"resource": { | ||
"displayName": "hello.mp4", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"sourceLocale": "en-US", | ||
"targetLocale": "zh-CN", | ||
"voiceKind": "PlatformVoice", | ||
"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" | ||
} | ||
}, | ||
"Content-Type": "application/json" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { | ||
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo?api-version=2024-02-01-preview", | ||
"Operation-Id": "Create-TranslateMyZhCNVideo" | ||
}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo", | ||
"displayName": "hello.mp4", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"sourceLocale": "en-US", | ||
"targetLocale": "zh-CN", | ||
"voiceKind": "PlatformVoice", | ||
"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" | ||
}, | ||
"createdDateTime": "2023-04-01T05:30:00.000Z", | ||
"latestIteration": { | ||
"id": "Initial", | ||
"status": "NotStarted", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": { | ||
"Operation-Location": "https://eastus.api.cognitive.microsoft.com/videotranslation/operations/Create-TranslateMyZhCNVideo?api-version=2024-02-01-preview", | ||
"Operation-Id": "Create-TranslateMyZhCNVideo" | ||
}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"sourceLocale": "en-US", | ||
"targetLocale": "zh-CN", | ||
"voiceKind": "PlatformVoice", | ||
"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" | ||
}, | ||
"createdDateTime": "2023-04-01T05:30:00.000Z", | ||
"latestIteration": { | ||
"id": "Initial", | ||
"status": "NotStarted", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...VideoTranslation/examples/2024-05-20-preview/TranslationOperations_DeleteTranslation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Delete Translation", | ||
"operationId": "TranslationOperations_DeleteTranslation", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"Ocp-Apim-Subscription-Key": "{API Key}" | ||
}, | ||
"responses": { | ||
"204": { | ||
"headers": {} | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...ch.VideoTranslation/examples/2024-05-20-preview/TranslationOperations_GetTranslation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"title": "Get Translation", | ||
"operationId": "TranslationOperations_GetTranslation", | ||
"parameters": { | ||
"Endpoint": "https://eastus.api.cognitive.microsoft.com/", | ||
"api-version": "2024-05-20-preview", | ||
"translationId": "TranslateMyZhCNVideo", | ||
"Ocp-Apim-Subscription-Key": "{API Key}" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "TranslateMyZhCNVideo", | ||
"displayName": "hello.mp4", | ||
"description": "Translate video from en-US to zh-CN.", | ||
"input": { | ||
"sourceLocale": "en-US", | ||
"targetLocale": "zh-CN", | ||
"voiceKind": "PlatformVoice", | ||
"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" | ||
}, | ||
"createdDateTime": "2023-04-01T05:30:00.000Z", | ||
"latestIteration": { | ||
"id": "xxx", | ||
"description": "Iteration1", | ||
"status": "Running", | ||
"input": { | ||
"speakerCount": 3, | ||
"subtitleMaxCharCountPerSegment": 80, | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
} | ||
}, | ||
"latestSucceededIteration": { | ||
"id": "xxx", | ||
"description": "Iteration1", | ||
"input": { | ||
"webvttFile": { | ||
"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", | ||
"kind": "MetadataJson" | ||
} | ||
}, | ||
"result": { | ||
"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", | ||
"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", | ||
"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", | ||
"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", | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.