In this article, you learn how to deploy an endpoint for a custom speech model. Except for batch transcription, you must deploy a custom endpoint to use a custom speech model.
Select Custom speech > Your project name > Deploy models.
If this is your first endpoint, you notice that there are no endpoints listed in the table. After you create an endpoint, you use this page to track each deployed endpoint.
Select Deploy model to start the new endpoint wizard.
On the New endpoint page, enter a name and description for your custom endpoint.
Select the custom model that you want to associate with the endpoint.
Optionally, you can check the box to enable audio and diagnostic logging of the endpoint's traffic.
Select Add to save and deploy the endpoint.
On the main Deploy models page, details about the new endpoint are displayed in a table, such as name, description, status, and expiration date. It can take up to 30 minutes to instantiate a new endpoint that uses your custom models. When the status of the deployment changes to Succeeded, the endpoint is ready to use.
Important
Take note of the model expiration date. This is the last date that you can use your custom model for speech recognition. For more information, see Model and endpoint lifecycle.
Select the endpoint link to view information specific to it, such as the endpoint key, endpoint URL, and sample code.
To create an endpoint and deploy a model, use the spx csr endpoint create command. Construct the request parameters according to the following instructions:
Set the project property to the ID of an existing project. This property is recommended so that you can also view and manage the endpoint in the Azure AI Foundry portal. You can run the spx csr project list command to get available projects.
Set the required model property to the ID of the model that you want deployed to the endpoint.
Set the required language property. The endpoint locale must match the locale of the model. The locale can't be changed later. The Speech CLI language property corresponds to the locale property in the JSON request and response.
Set the required name property. This is the name that is displayed in the Azure AI Foundry portal. The Speech CLI name property corresponds to the displayName property in the JSON request and response.
Optionally, you can set the logging property. Set this to enabled to enable audio and diagnostic logging of the endpoint's traffic. The default is false.
Here's an example Speech CLI command to create an endpoint and deploy a model:
spx csr endpoint create --api-version v3.2 --project YourProjectId --model YourModelId --name "My Endpoint" --description "My Endpoint Description" --language "en-US"
You should receive a response body in the following format:
The top-level self property in the response body is the endpoint's URI. Use this URI to get details about the endpoint's project, model, and logs. You also use this URI to update the endpoint.
For Speech CLI help with endpoints, run the following command:
spx help csr endpoint
To create an endpoint and deploy a model, use the Endpoints_Create operation of the Speech to text REST API. Construct the request body according to the following instructions:
Set the project property to the URI of an existing project. This property is recommended so that you can also view and manage the endpoint in the Azure AI Foundry portal. You can make a Projects_List request to get available projects.
Set the required model property to the URI of the model that you want deployed to the endpoint.
Set the required locale property. The endpoint locale must match the locale of the model. The locale can't be changed later.
Set the required displayName property. This is the name that is displayed in the Azure AI Foundry portal.
Optionally, you can set the loggingEnabled property within properties. Set this to true to enable audio and diagnostic logging of the endpoint's traffic. The default is false.
Make an HTTP POST request using the URI as shown in the following Endpoints_Create example. Replace YourSubscriptionKey with your Speech resource key, replace YourServiceRegion with your Speech resource region, and set the request body properties as previously described.
The top-level self property in the response body is the endpoint's URI. Use this URI to get details about the endpoint's project, model, and logs. You also use this URI to update or delete the endpoint.
Change model and redeploy endpoint
An endpoint can be updated to use another model that was created by the same Speech resource. As previously mentioned, you must update the endpoint's model before the model expires.
To use a new model and redeploy the custom endpoint:
Select Custom speech > Your project name > Deploy models.
Select the link to an endpoint by name, and then select Change model.
Select the new model that you want the endpoint to use.
Select Done to save and redeploy the endpoint.
To redeploy the custom endpoint with a new model, use the spx csr model update command. Construct the request parameters according to the following instructions:
Set the required endpoint property to the ID of the endpoint that you want deployed.
Set the required model property to the ID of the model that you want deployed to the endpoint.
Here's an example Speech CLI command that redeploys the custom endpoint with a new model:
For Speech CLI help with endpoints, run the following command:
spx help csr endpoint
To redeploy the custom endpoint with a new model, use the Endpoints_Update operation of the Speech to text REST API. Construct the request body according to the following instructions:
Set the model property to the URI of the model that you want deployed to the endpoint.
Make an HTTP PATCH request using the URI as shown in the following example. Replace YourSubscriptionKey with your Speech resource key, replace YourServiceRegion with your Speech resource region, replace YourEndpointId with your endpoint ID, and set the request body properties as previously described.
Make an HTTP GET request using the URI as shown in the following example. Replace YourEndpointId with your endpoint ID, replace YourSubscriptionKey with your Speech resource key, and replace YourServiceRegion with your Speech resource region.
curl -v -X GET "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.2/endpoints/YourEndpointId" -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey"
You should receive a response body in the following format:
Make an HTTP GET request using the "logs" URI from the previous response body. Replace YourEndpointId with your endpoint ID, replace YourSubscriptionKey with your Speech resource key, and replace YourServiceRegion with your Speech resource region.
curl -v -X GET "https://YourServiceRegion.api.cognitive.microsoft.com/speechtotext/v3.2/endpoints/YourEndpointId/files/logs" -H "Ocp-Apim-Subscription-Key: YourSubscriptionKey"
The locations of each log file with more details are returned in the response body.
Logging data is available on Microsoft-owned storage for 30 days, and then it's removed. If your own storage account is linked to the Azure AI services subscription, the logging data isn't automatically deleted.
Plan and execute an endpoint deployment strategy, using essential elements of modern management, co-management approaches, and Microsoft Intune integration.
Learn how to train custom speech models. Training a speech to text model can improve recognition accuracy for the Microsoft base model or a custom model.
Custom speech lets you qualitatively inspect the recognition quality of a model. You can play back uploaded audio and determine if the provided recognition result is correct.