Issue Description:
Users were experiencing issues with Agora's real-time speech-to-text service where transcription slices were not being delivered to their AWS S3 bucket despite successful initiation of sessions and active status reports from agent queries.
Platform/SDK:
Agora's Real-Time Speech-to-Text service integrated with AWS S3 for storage, using Agora's RTC channels.
Step by Step Solution:
1. Identify the tokens:
Identify the tokens used for both the subscriber and publisher bot UIDs within the Agora STT integration.
2. Ensure Distinct Tokens:
Ensure that distinct tokens are generated for each bot UID (subscriber and publisher).
3. Modify Backend System:
Modify the backend system to generate and use unique tokens for each bot UID for every session.
4. Redeploy Backend:
Redeploy the updated backend with the new token generation logic.
5. Verify Functionality:
Verify functionality by initiating the /join request and ensuring successful HTTP 200 response, followed by a check that the STT worker joins the RTC channel.
6. Perform `/leave` Request:
Perform a /leave request to ensure it returns HTTP 200.
7. Confirm Transcription in S3:
Confirm that transcription files are appearing in the designated S3 bucket.
Root Cause:
The root cause was the reuse of a single token for both the subscriber and publisher bots, leading the publisher bot to join with the wrong token, resulting in connection errors and subsequent lack of file uploads.
Prevention/Best Practice:
Always generate and utilize unique tokens for each bot UID in RTC scenarios to ensure proper authentication and channel participation.
Corresponding Document/Link (optional):
For further reference, consult Agora's documentation on token creation and RTC integration here.
By following these steps, users can ensure that their STT service functions correctly and avoids misconfiguration issues related to token handling.