Session outcomes and timing
Learner-visible error categories
| Category | Typical trigger | Outcome |
|---|---|---|
| Missing parameters | No non-empty rolePlayId in the launch URL | Error before role-play loading |
| No authentication token | Parent sends an empty initial token payload | Authentication error |
| Expired access token | Token refresh fails, returns empty, or exceeds ten seconds | Authentication error |
| Connection issues | Browser offline or role-play API/network failure | General connection error |
| Bot connection problems | Invalid SCAI data, credential/signalling timeout, or exhausted recovery | Voice-session error |
| Microphone permission denied | Browser or iframe cannot provide audio input | Microphone error |
| Feedback analysis error | Empty transcript, rejected evaluation request, dependency failure, or invalid AI response | No partial feedback is shown |
The error page offers a restart that reloads the application. An embedded host must be ready to complete the launch and token handshake again.
Attempt outcomes
| End condition | Evaluation | Frontend analytics terminal event |
|---|---|---|
| Learner confirms Finish | Yes | scl.session_finished_by_user |
| Learner confirms Cancel | No | scl.session_cancelled_by_user |
| Strict limit reached | Available after confirmation | scl.session_ended_by_time |
| Flexible overtime exhausted | Available after confirmation | scl.session_ended_by_time |
| Active connection fails | No automatic evaluation | scl.session_ended_by_error |
| Page hidden/unloaded mid-attempt | No automatic evaluation | Backend receives scl.session_unloaded when delivery succeeds |
Analytics events are emitted only when analytics is configured and a server-issued session ID exists.
Strict timing
The timer starts after the SCAI call is accepted. During the configured warning window, the UI marks the approaching deadline. At the planned duration, SCL:
- Stops recording.
- Locks practice controls.
- Sets elapsed time to the exact configured duration.
- Shows the time-limit dialog.
- Lets the learner continue to evaluation.
Flexible timing
At the planned duration, the UI enters overtime and shows the remaining allowance. At planned duration plus overtime, SCL locks the practice and lets the learner continue to evaluation.
If the backend does not provide an overtime limit, the current browser fallback is 300 seconds. Content owners should set an explicit value so the intended rule does not depend on a client default.
Warning calculation
The warning window cannot begin before the session starts. If the configured warning exceeds the planned duration, SCL effectively warns from the beginning of active practice.
Evaluation duration
The frontend sends active elapsed seconds with the transcript. A role-play may include duration as one evaluation indicator, but only if its criteria define the target, deviation formula, score bands, and weight. Timing mode alone does not determine an evaluation score.
Voice and identity recovery
- Media failure triggers an ICE restart attempt.
- Unexpected WebSocket closure after call acceptance can be retried up to three times.
- Token refresh waits up to ten seconds for the parent response.
NO_INPUTre-prompts do not become normal transcript turns.- Empty recognition can appear as a warning.
- Only allow-listed conversational metadata becomes transcript content.
Time spent obtaining credentials, waiting for microphone permission, or negotiating the call is not included in active practice time.