Product FAQ
This topic answers common questions about project configuration, authentication, service connections, concurrency, SDKs, and billing in Intelligent Speech Interaction.
Features and projects
How do I use speech recognition with Real-Time Communication (RTC)?
You can obtain audio data from RTC and send it to Intelligent Speech Interaction for recognition. For information about obtaining audio data on iOS and Mac, see Audio data processing.
Is there a limit on the number of projects I can create?
There is currently no limit.
Can I configure multiple base models for a project?
No. Each Appkey corresponds to one base model.
Is wake-word detection available for HTML5 applications?
It is not currently supported on the device side, but is supported in the cloud. A typical device integration combines device-side and cloud-based processing: a model on the device detects the wake word, and a cloud-based model performs a second check to reduce false activations.
Accounts and authentication
How do I obtain an AccessKey ID and AccessKey secret?
For instructions, see the AccessKey creation steps in Quick start.
How do I find my UID?
Log on to the Alibaba Cloud console and move the pointer over your profile picture in the upper-right corner. The Account ID in the panel is your UID.
What should I check if SDK initialization fails?
Check that the correct AccessKey ID and AccessKey secret were used to generate the NLS Token, and that the Appkey and Token are configured correctly. If the SDK requires Workspace, also check Workspace and other required parameters.
Service connections
Which ports do speech recognition and speech synthesis use?
The default port is 80 for HTTP and ws, and 443 for HTTPS and wss. If the connection URL explicitly specifies a port, use that port.
How do I find the IP addresses of service domains?
nls-meta.cn-shanghai.aliyuncs.com is used to obtain Tokens, and nls-gateway-cn-shanghai.aliyuncs.com is used to call speech services. Run dig nls-meta.cn-shanghai.aliyuncs.com or dig nls-gateway-cn-shanghai.aliyuncs.com to query the corresponding IP addresses.
These IP addresses may change. If your network configuration depends on the resolved addresses, monitor the DNS results and update the configuration as needed.
Do I need to add my server's public IP address to an allowlist?
You do not need to register your client server's public IP address with Intelligent Speech Interaction to call its public endpoints. The client must still be able to access the service endpoint and provide the authentication information required by the API, such as an Appkey and Token.
Must I send audio continuously for real-time speech recognition?
Yes. If the server receives no audio data for more than 10 seconds, it times out, closes the connection, and returns 40000004. To continue recognition, the client must initiate a new request.
Why do recognition results arrive after audio transmission stops?
The server may still be processing previously received audio and return results for that audio. Receiving results does not mean that audio after the interruption was recognized. If the connection is closed because of a timeout, initiate a new request.
How do I resolve "Invalid binary message while server state is 'ROUTING'" in real-time speech recognition?
The client sent audio before the server finished starting the task. After sending StartTranscription, wait for the TranscriptionStarted event before sending binary audio data.
Concurrency and usage
How is concurrency calculated?
Concurrency is the number of requests being processed simultaneously for the same Alibaba Cloud account (UID). For example, while one real-time speech recognition request is sending audio, concurrency is 1. If the same account starts another request and both requests are being processed, concurrency is 2.
Can real-time speech recognition use the same Token and Appkey for multiple WebSocket connections?
Yes. The same valid Token and Appkey can be used for concurrent connections. A separate Token is not required for each connection. Use a unique task_id for each connection, and send StartTranscription and StopTranscription independently according to the protocol. The account's concurrency quota still applies.
What happens when the concurrency limit is exceeded?
Speech recognition or speech synthesis requests that exceed the concurrency limit may return 40000005, indicating too many requests. High concurrency may also cause connections to close.
When does the console update after I activate the commercial edition or increase concurrency?
Available concurrency is updated in real time. The previous day's concurrency and metering data are updated on a T+1 basis, on the following day.
How do I view speech recognition usage for my account?
You can view call duration, request counts, and concurrency in the console to understand service usage. For more information, see Service usage.
SDK usage
Is SDK source code available?
Source code is available for the C++, Java, and Python SDKs. You can view the protocol implementations on GitHub. We recommend integrating with the SDKs provided by Intelligent Speech Interaction. For instructions, see Quick start. Technical support for custom protocol implementations is limited.
Can the Android SDK initialize multiple instances in different processes?
This is not currently supported.
Does the speech synthesis SDK provide playback and playback completion events?
The SDK provides speech synthesis events, but does not provide audio playback or playback completion events. The client must handle audio playback.
What should I check if recognition fails to start?
When using an SDK that follows the singleton pattern, make sure the previous recognition task has ended before starting a new task.
What should I check if no results are returned after recognition starts?
Check that the SDK initialized successfully, the start recognition call succeeded, and recording started correctly with audio status callbacks. If the SDK includes a vad_mode parameter, also check that it is used correctly.
If these checks pass but no results are returned, check the SDK's error events. For an SDK that returns EVENT_ASR_ERROR, use the error code in the event to identify the issue.
How do I record the mapping between a recording file recognition TaskId and its file URL?
We recommend saving the FileUrl used in the request together with the TaskId returned by the API in your application. This mapping lets you locate the submitted audio file by TaskId.
Where can I find a getting-started tutorial?
For integration instructions, see Quick start.
Billing
What are the trial edition limits?
Short sentence recognition and real-time speech recognition: up to 2 concurrent recognition requests.
Recording file recognition: new users receive 2 hours of free recognition every 24 hours during the 3-month trial period. After the free quota is exhausted, the trial can be used again after the 24-hour interval.
How many concurrent real-time speech recognition requests are supported?
The trial edition provides 2 free concurrent requests for 3 months. The commercial edition provides 200 concurrent requests by default. You can purchase a concurrency resource plan separately to increase the quota.
Does English recognition require a language extension package or concurrency capacity?
English recognition requires both a language extension package and concurrency capacity.