Select an Intelligent Speech Interaction endpoint based on the service, region, and network environment, and configure the credentials required by that endpoint.
Select an endpoint
A domain name identifies a service endpoint. A complete request URL also includes a protocol and an API path. Use the complete URL for the service; changing only the domain name does not account for differences in API paths and authentication.
Use the Singapore endpoint to call services. The client must be able to reach the endpoint and use the corresponding Appkey and token.
Public network access: Use public endpoints from on-premises servers, servers on other clouds, or ECS instances with outbound internet connectivity. Calling NLS does not require a dedicated public inbound address. The runtime environment must still provide outbound connectivity and allow the required protocols and ports.
Service endpoints
Short sentence recognition, real-time speech recognition, and short-text speech synthesis
WebSocket APIs use the /ws/v1 path. Message namespaces and parameters differ by service. Even when services share a URL, their message protocols are not interchangeable.
|
Network |
Region |
WebSocket URL |
|
Public |
Singapore |
|
Short sentence recognition and short-text speech synthesis also support RESTful APIs. The following tables list the complete URLs. Real-time speech recognition does not use these two RESTful paths.
|
Service |
Region |
RESTful URL |
|
Short sentence recognition |
Singapore |
|
|
Short-text speech synthesis |
|
Authentication and region configuration
The token service and speech gateway use different endpoints. Obtain a token before calling a speech API that uses token-based authentication. For instructions, see Obtain a token with an SDK.
Obtain a token from nlsmeta.ap-southeast-1.aliyuncs.com and call speech services through nls-gateway-ap-southeast-1.aliyuncs.com. Set the region for token requests to ap-southeast-1.
The ExpireTime value returned by the token API specifies when the token expires. Correct region and domain settings do not activate services. Check that the required service is activated before making a call.