Skip to content

Commit

Permalink
Add custom speech apis (#13013)
Browse files Browse the repository at this point in the history
* Add custom speech apis

* make prettier

* Fix spelling issues and add custom words

* Provide readme.md

* added go and js sdk

* adding typescript

* make tag more verbose

* fix duplicate schema names

* do not use anonymous type

* name dictionaries

* Extract inline schemas

* prettify again

* do not leak internal enum values

* suppress v2 incorrectly cased property names

* add suppressions for linter and clean up v2 schema

* fix go tags

* more go readme cleanups

* remove sdk generation

* do not use allof for schema references.

* adding examples

* prettify

* remove spaces in example file names

* use correct examples extension name

* Added updated examples

* Fix file name

* Fix 204 response body

* more fixes and prettier

* Fix response example

* moar fixes

* fix json issue

* remove secret

* add health status example

* fixed encoding

* fix upload examples
  • Loading branch information
bexxx authored Mar 9, 2021
1 parent 8c6d9ca commit e95bfe1
Show file tree
Hide file tree
Showing 107 changed files with 21,723 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ accesskey
accesspoint
accountid
accountname
accuracytests
ACLs
aclspec
acquisitionid
Expand Down Expand Up @@ -135,6 +136,7 @@ asyncinfo
asyncoperation
atascada
attestationcollateral
audiodata
Auditd
australiaeast
australiasoutheast
Expand Down Expand Up @@ -380,6 +382,7 @@ contoso
contosodataset
contosomedia
cooldown
copyto
Corda
coreml
Corent
Expand Down Expand Up @@ -765,6 +768,7 @@ hdinsight
Headnode
healthbot
healthcareapis
healthstatus
Heatbeat
heatmap
HHMM
Expand Down Expand Up @@ -935,6 +939,7 @@ labelset
labservices
LACNIC
Lajolla
languagedata
largefacelists
largepersongroups
lastfile
Expand Down Expand Up @@ -1668,6 +1673,8 @@ sparkr
sparql
SPDX
specversion
speechtotext
speechservicesmanagement
SQLAG
sqldatabase
SQLDB
Expand Down Expand Up @@ -1723,6 +1730,7 @@ streamingjobs
streamingservice
subcause
subcomponent
subcomponents
subdir
subdomain
subexpressions
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Cognitive Services SpeechToText SDKs

> see https://aka.ms/autorest
Configuration for generating SpeechToText SDK.

The current release for the SpeechToText is `release_3_0`.

``` yaml
tag: release_3_0
add-credentials: true
openapi-type: data-plane
```
# Releases
## SpeechToText 2.0
These settings apply only when `--tag=release_2_0` is specified on the command line.

``` yaml $(tag) == 'release_2_0'
input-file: stable/v2.0/speechtotext.json
```

AutoRest-Linter Suppressions

``` yaml
# Ignore autorest-linter issues that cannot be resolve without updates to the API implementation
directive:
- suppress: DefinitionsPropertiesNamesCamelCase
reason: Changing casing will break existing clients/consumers
- suppress: GuidUsage
reason: Changing casing will break existing clients/consumers
```

---

## SpeechToText 3.0
These settings apply only when `--tag=release_3_0` is specified on the command line.

``` yaml $(tag) == 'release_3_0'
input-file: stable/v3.0/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.
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"testDefinition": {
"models": [
{
"id": "685b5e3a-e5c0-45ae-8c8a-86b50cabd3ea"
},
{
"id": "15fde948-c8b7-4484-a610-07d4ddc69fad"
}
],
"dataset": {
"id": "5d2b9da6-e687-47b3-bb71-140a4d1ca3d5"
},
"name": "Accuracy test",
"description": "This is an accuracy test"
},
"Content-Type": "application/json"
},
"responses": {
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"endpointDefinition": {
"models": [
{
"id": "d7295e5c-089f-44ab-99b0-73c17ffc3ae0"
}
],
"concurrentRecognitions": 1,
"contentLoggingEnabled": false,
"locale": "en-US",
"name": "Speech endpoint definition",
"description": "This is a speech endpoint"
},
"Content-Type": "application/json"
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"Endpoint": "https://westus.api.cognitive.microsoft.com/",
"Ocp-Apim-Subscription-Key": "{API Key}",
"endpointId": "afa0669c-a01e-4693-ae3a-93baf40f26d6",
"endpointDataDefinition": {
"startDate": "2018-12-08T00:00:00Z",
"endDate": "2019-01-07T00:00:00Z"
},
"Content-Type": "application/json"
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"404": {
"headers": {},
"body": {
"code": "NotFound",
"message": "The specified entity cannot be found."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
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}",
"modelDefinition": {
"modelKind": "Language",
"baseModel": {
"id": "f2842de0-fc16-4858-8391-e3fd1efb6980"
},
"datasets": [
{
"id": "a712c3ba-0e49-4059-a17f-0465426514c7"
}
],
"locale": "en-US",
"name": "Language model",
"description": "This is a language model definition"
},
"Content-Type": "application/json"
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
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": {
"recordingsUrl": "https://contoso.com/mystoragelocation",
"models": [],
"locale": "en-US",
"name": "Transcription using locale en-US",
"description": "An optional description of the transcription.",
"properties": {
"AddWordLevelTimestamps": "True",
"AddDiarization": "True",
"AddSentiment": "True",
"ProfanityFilterMode": "Masked",
"PunctuationMode": "DictatedAndAutomatic"
}
},
"Content-Type": "application/json"
},
"responses": {
"202": {
"headers": {}
},
"400": {
"headers": {},
"body": {
"code": "BadRequest",
"message": "The request has been incorrect."
}
},
"401": {
"headers": {},
"body": {
"code": "Unauthorized",
"message": "Authentication is required to access the resource."
}
},
"403": {
"headers": {},
"body": {
"code": "Forbidden",
"message": "No permission to access this resource."
}
},
"429": {
"headers": {},
"body": {
"code": "TooManyRequests",
"message": "The rate limit has been reached. The timeout in seconds can be found in the Retry-After header."
}
}
}
}
Loading

0 comments on commit e95bfe1

Please sign in to comment.