All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
copy_model_to_subscription | POST /models/{id}/copyto | Copies a model from one subscription to another. |
create_model | POST /models | Creates a new model. |
delete_model | DELETE /models/{id} | Deletes the model identified by the given ID. |
get_base_model | GET /models/base/{id} | Gets the base model identified by the given ID. |
get_base_model_manifest | GET /models/base/{id}/manifest | Returns an manifest for this base model which can be used in an on-premise container. |
get_base_models | GET /models/base | Gets the list of base models for the authenticated subscription. |
get_model | GET /models/{id} | Gets the model identified by the given ID. |
get_model_manifest | GET /models/{id}/manifest | Returns an manifest for this model which can be used in an on-premise container. |
get_models | GET /models | Gets the list of custom models for the authenticated subscription. |
get_supported_locales_for_models | GET /models/locales | Gets a list of supported locales for model adaptation. |
update_model | PATCH /models/{id} | Updates the metadata of the model identified by the given ID. |
Model copy_model_to_subscription(id, model_copy)
Copies a model from one subscription to another.
This method can be used to copy a model from one location to another. If the target subscription key belongs to a subscription created for another location, the model will be copied to that location. Only adapted models are allowed to copy to another subscription.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The identifier of the model that will be copied.
model_copy = swagger_client.ModelCopy() # ModelCopy | The body contains the subscription key of the target subscription.
try:
# Copies a model from one subscription to another.
api_response = api_instance.copy_model_to_subscription(id, model_copy)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->copy_model_to_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the model that will be copied. | |
model_copy | ModelCopy | The body contains the subscription key of the target subscription. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Model create_model(model)
Creates a new model.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
model = swagger_client.Model() # Model | The details of the new model.
try:
# Creates a new model.
api_response = api_instance.create_model(model)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->create_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
model | Model | The details of the new model. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_model(id)
Deletes the model identified by the given ID.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The identifier of the model.
try:
# Deletes the model identified by the given ID.
api_instance.delete_model(id)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->delete_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the model. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Model get_base_model(id)
Gets the base model identified by the given ID.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The identifier of the base model.
try:
# Gets the base model identified by the given ID.
api_response = api_instance.get_base_model(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_base_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the base model. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelManifest get_base_model_manifest(id, sas_validity_in_seconds=sas_validity_in_seconds)
Returns an manifest for this base model which can be used in an on-premise container.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The ID of the model to generate a manifest for.
sas_validity_in_seconds = 56 # int | The duration in seconds that an SAS url should be valid. The default duration is 12 hours. When using BYOS (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-encryption-of-data-at-rest#bring-your-own-storage-byos-for-customization-and-logging): A value of 0 means that a plain blob URI without SAS token will be generated. (optional)
try:
# Returns an manifest for this base model which can be used in an on-premise container.
api_response = api_instance.get_base_model_manifest(id, sas_validity_in_seconds=sas_validity_in_seconds)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_base_model_manifest: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The ID of the model to generate a manifest for. | |
sas_validity_in_seconds | int | The duration in seconds that an SAS url should be valid. The default duration is 12 hours. When using BYOS (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-encryption-of-data-at-rest#bring-your-own-storage-byos-for-customization-and-logging): A value of 0 means that a plain blob URI without SAS token will be generated. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedModels get_base_models(skip=skip, top=top)
Gets the list of base models for the authenticated subscription.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
skip = 56 # int | Number of datasets that will be skipped. (optional)
top = 56 # int | Number of datasets that will be included after skipping. (optional)
try:
# Gets the list of base models for the authenticated subscription.
api_response = api_instance.get_base_models(skip=skip, top=top)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_base_models: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
skip | int | Number of datasets that will be skipped. | [optional] |
top | int | Number of datasets that will be included after skipping. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Model get_model(id)
Gets the model identified by the given ID.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The identifier of the model.
try:
# Gets the model identified by the given ID.
api_response = api_instance.get_model(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the model. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelManifest get_model_manifest(id, sas_validity_in_seconds=sas_validity_in_seconds)
Returns an manifest for this model which can be used in an on-premise container.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The ID of the model to generate a manifest for.
sas_validity_in_seconds = 56 # int | The duration in seconds that an SAS url should be valid. The default duration is 12 hours. When using BYOS (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-encryption-of-data-at-rest#bring-your-own-storage-byos-for-customization-and-logging): A value of 0 means that a plain blob URI without SAS token will be generated. (optional)
try:
# Returns an manifest for this model which can be used in an on-premise container.
api_response = api_instance.get_model_manifest(id, sas_validity_in_seconds=sas_validity_in_seconds)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_model_manifest: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The ID of the model to generate a manifest for. | |
sas_validity_in_seconds | int | The duration in seconds that an SAS url should be valid. The default duration is 12 hours. When using BYOS (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-encryption-of-data-at-rest#bring-your-own-storage-byos-for-customization-and-logging): A value of 0 means that a plain blob URI without SAS token will be generated. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedModels get_models(skip=skip, top=top)
Gets the list of custom models for the authenticated subscription.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
skip = 56 # int | Number of datasets that will be skipped. (optional)
top = 56 # int | Number of datasets that will be included after skipping. (optional)
try:
# Gets the list of custom models for the authenticated subscription.
api_response = api_instance.get_models(skip=skip, top=top)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_models: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
skip | int | Number of datasets that will be skipped. | [optional] |
top | int | Number of datasets that will be included after skipping. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[str] get_supported_locales_for_models()
Gets a list of supported locales for model adaptation.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
try:
# Gets a list of supported locales for model adaptation.
api_response = api_instance.get_supported_locales_for_models()
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->get_supported_locales_for_models: %s\n" % e)
This endpoint does not need any parameter.
list[str]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Model update_model(id, model_update)
Updates the metadata of the model identified by the given ID.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = swagger_client.Configuration()
configuration.api_key['Ocp-Apim-Subscription-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Ocp-Apim-Subscription-Key'] = 'Bearer'
# Configure API key authorization: token
configuration = swagger_client.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.CustomSpeechModelsApi(swagger_client.ApiClient(configuration))
id = 'id_example' # str | The identifier of the model.
model_update = swagger_client.ModelUpdate() # ModelUpdate | The updated values for the model.
try:
# Updates the metadata of the model identified by the given ID.
api_response = api_instance.update_model(id, model_update)
pprint(api_response)
except ApiException as e:
print("Exception when calling CustomSpeechModelsApi->update_model: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The identifier of the model. | |
model_update | ModelUpdate | The updated values for the model. |
- Content-Type: application/json, application/merge-patch+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]