Skip to content

Commit

Permalink
[Cognitive - Custom Speech] Review request for Speech/SpeechToText to…
Browse files Browse the repository at this point in the history
… add version stable/v3.1 (Azure#21165)

* Adds base for updating Speech/SpeechToText from version preview/v3.1-preview.1 to version v3.1

* Updates readme

* Updates API version in new specs and examples

* Modifications for 3.1 GA version

* Trying to fix autorest config

* Change tag

* Model BlockKind as string

* Revert doc change

* Prettier fix

* Trying to fix formatting of docs

* Check output

* Address Swagger lint issues and update some docs

* Run prettier

* Fix Swagger

* Make same changes also to existing versions

* Revert "Make same changes also to existing versions"

This reverts commit be557bd.

* Add minLength for required strings

* Lower-case endpoint parameter

* Add suppressions
  • Loading branch information
andreasjl authored and kayousef committed Dec 21, 2022
1 parent 20004ea commit d882f98
Show file tree
Hide file tree
Showing 91 changed files with 10,246 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
Configuration for generating SpeechToText SDK.

The current release for the SpeechToText is `release_3_0`.
The current release for the SpeechToText is `release_3_1`.

``` yaml
tag: release_3_0
tag: release_3_1
add-credentials: true
openapi-type: data-plane
```
Expand Down Expand Up @@ -66,4 +66,29 @@ AutoRest-Linter Suppressions
directive:
- suppress: LongRunningOperationsWithLongRunningExtension
reason: Does not apply in those two places. The method is a DELETE which lazily deletes blobs, so it's Accepted, not NoContent.
```
```

---

## SpeechToText 3.1

These settings apply only when `--tag=release_3_1` is specified on the command line.

```yaml $(tag) == 'release_3_1'
input-file:
- stable/v3.1/speechtotext.json
```

AutoRest-Linter Suppressions

``` yaml
# Ignore autorest-linter issues that cannot be resolve without updates to the API implementation
directive:
- suppress: LongRunningOperationsWithLongRunningExtension
reason: Does not apply in those two places. The method is a DELETE which lazily deletes blobs, so it's Accepted, not NoContent.
- suppress: OperationIdNounVerb
where: $..paths[($..operationId["Models_*"])]
reason: There is a sub-route called /models/base/ that refers to the base models. Therefore, the correct operation ID seems to be "Models_GetBaseModel", for example.
- suppress: HostParametersValidation
reason: Existing API, change would potentially be breaking.
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"id": "9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1",
"blockList": [
{
"kind": "Uncommitted",
"id": "AAA="
},
{
"kind": "Uncommitted",
"id": "AAE="
},
{
"kind": "Uncommitted",
"id": "AAI="
}
]
},
"responses": {
"200": {
"headers": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"id": "827712a5-f942-4997-91c3-7c6cde35600b",
"modelCopy": {
"targetSubscriptionKey": "KeyForTheSubscriptionTheModelIsSupposedToBeCopiedTo"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b",
"baseModel": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/8a043172-65b7-4cf3-a8b5-4449efa5a0f1"
},
"datasets": [
{
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/cdc91c24-3972-496d-a12f-209c35f4cc6c"
}
],
"links": {
"manifest": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/manifest/827712a5-f942-4997-91c3-7c6cde35600b",
"copyTo": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b:copyto",
"files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b/files"
},
"properties": {
"deprecationDates": {
"transcriptionDateTime": "2023-05-04T00:00:00Z"
},
"customModelWeightPercent": 30,
"features": {
"supportsTranscriptions": true,
"supportsEndpoints": true,
"supportsTranscriptionsOnSpeechContainers": false
}
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "Running",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Language model",
"description": "This is a language model"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"transcription": {
"contentContainerUrl": "https://customspeech-usw.blob.core.windows.net/artifacts/audiofiles/",
"properties": {
"diarizationEnabled": false,
"wordLevelTimestampsEnabled": false,
"punctuationMode": "DictatedAndAutomatic",
"profanityFilterMode": "Masked"
},
"locale": "en-US",
"displayName": "Transcription of storage container using default model for en-US"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683"
},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683",
"model": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
},
"links": {
"files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683/files"
},
"properties": {
"diarizationEnabled": false,
"wordLevelTimestampsEnabled": false,
"displayFormWordLevelTimestampsEnabled": false,
"channels": [
0,
1
],
"punctuationMode": "DictatedAndAutomatic",
"profanityFilterMode": "Masked",
"duration": "PT42S"
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "Succeeded",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Transcription using adapted model en-US",
"customProperties": {
"key": "value"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"dataset": {
"kind": "Acoustic",
"locale": "en-US",
"displayName": "My speech dataset name",
"description": "My speech dataset description"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1",
"kind": "Acoustic",
"links": {
"files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1/files",
"commitBlocks": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1/blocks:commit",
"listBlocks": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1/blocks",
"uploadBlocks": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1/blocks"
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "NotStarted",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Acoustic dataset"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"dataset": {
"kind": "Acoustic",
"contentUrl": "https://contoso.com/location",
"locale": "en-US",
"displayName": "My speech dataset name",
"description": "My speech dataset description"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1"
},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1",
"kind": "Acoustic",
"contentUrl": "https://www.contoso.com/acousticdata/sourcelocation",
"links": {
"files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1/files"
},
"properties": {
"acceptedLineCount": 11,
"rejectedLineCount": 2,
"duration": "PT4M12S"
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "Succeeded",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Acoustic dataset"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"endpoint": {
"model": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
},
"properties": {
"loggingEnabled": true
},
"locale": "en-US",
"displayName": "Speech endpoint definition",
"description": "This is a speech endpoint"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6"
},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6",
"model": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
},
"links": {
"logs": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/endpoints/afa0669c-a01e-4693-ae3a-93baf40f26d6/files/logs",
"restInteractive": "https://westus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6",
"restConversation": "https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6",
"restDictation": "https://westus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6",
"webSocketInteractive": "wss://westus.stt.speech.microsoft.com/speech/recognition/interactive/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6",
"webSocketConversation": "wss://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6",
"webSocketDictation": "wss://westus.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1?cid=afa0669c-a01e-4693-ae3a-93baf40f26d6"
},
"properties": {
"timeToLive": "PT30M",
"loggingEnabled": true
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "Succeeded",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Speech endpoint",
"description": "Example for speech endpoint"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"evaluation": {
"model1": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/8a043172-65b7-4cf3-a8b5-4449efa5a0f1"
},
"model2": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
},
"dataset": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1"
},
"locale": "en-US",
"displayName": "My new evaluation",
"description": "The description of the evaluation"
},
"Content-Type": "application/json"
},
"responses": {
"201": {
"headers": {
"Location": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/evaluations/1c50ce42-6ab7-454f-8c39-54a752d1a5b6"
},
"body": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/evaluations/1c50ce42-6ab7-454f-8c39-54a752d1a5b6",
"model1": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/base/8a043172-65b7-4cf3-a8b5-4449efa5a0f1"
},
"model2": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
},
"dataset": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/datasets/9d5f4100-5f8e-4dd6-bd83-9bbbf50d57f1"
},
"transcription2": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ad86d0c9-af6d-4d14-a621-c60d7d65b74f"
},
"transcription1": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683"
},
"links": {
"files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/evaluations/00000000-0000-0000-0000-000000000000/files"
},
"properties": {
"wordErrorRate2": 0.065,
"wordErrorRate1": 0.065,
"sentenceErrorRate2": 0.375,
"sentenceCount2": 8,
"wordCount2": 46,
"correctWordCount2": 43,
"wordSubstitutionCount2": 3,
"wordDeletionCount2": 0,
"wordInsertionCount2": 0,
"sentenceErrorRate1": 0.375,
"sentenceCount1": 8,
"wordCount1": 46,
"correctWordCount1": 43,
"wordSubstitutionCount1": 3,
"wordDeletionCount1": 0,
"wordInsertionCount1": 0
},
"lastActionDateTime": "2019-01-07T11:36:07Z",
"status": "Succeeded",
"createdDateTime": "2019-01-07T11:34:12Z",
"locale": "en-US",
"displayName": "Evalution of one model against another model"
}
}
}
}
Loading

0 comments on commit d882f98

Please sign in to comment.