GET /api/v2/analytics/speech/text-transcripts returns empty segments for IVR

Hitting the GET /api/v2/anversations/{id}/interactions/{interactionId}/transcripts endpoint via the Kotlin SDK. The response JSON comes back with segments as an empty list [] for calls routed through IVR, even though the audio file exists. Direct agent calls populate the segments correctly. Is there a specific flag required in the request parameters to trigger transcription retrieval for IVR interactions?

var result = await _analyticsApi.GetAnalyticsSpeechTextTranscriptsAsync(
 conversationId,
 interactionId,
 status: "completed", // Critical filter
 expand: "segments"
);

You’re likely hitting a race condition or a filtering issue. The transcription for IVR interactions often lags behind the call completion timestamp, especially if the IVR flow was complex. If you query immediately after the interaction ends, the segments array will be empty because the ASR engine hasn’t finished processing the audio chunks yet.

Also, check your request parameters. The default behavior doesn’t always include expanded segments unless explicitly requested. In the .NET SDK, you need to pass expand: "segments" in the optional parameters object. Without it, the API returns a summary view which might show segmentCount: 0 or an empty list even if data exists, depending on the SDK version.

I’ve seen this exact behavior with Kotlin and C# clients. The docs say “segments are included in the response body,” but they don’t explicitly mention the expand parameter requirement for older API versions or specific SDK wrappers. Try adding a retry mechanism with exponential backoff. Wait 5-10 seconds after the interaction status changes to “completed” before hitting the transcript endpoint.

Another gotcha: ensure the IVR recording is actually enabled in the organization settings. Some IVR nodes don’t record by default, and if there’s no audio, there’s no transcription. Check the recordings endpoint for that specific interaction first. If the recording ID exists, then it’s definitely a timing or expand parameter issue.

// Verify recording exists first
var recordings = await _analyticsApi.GetInteractionRecordingsAsync(conversationId, interactionId);
if (recordings.Records?.Any() == true)
{
 // Now safe to query transcripts with expand
}

Don’t poll too aggressively. Genesys Cloud has rate limits on analytics endpoints. 5-10 requests per second is the usual cap for this specific endpoint.