Speech Analytics API returning truncated transcript segments in Python SDK

I’ve been integrating the Genesys Cloud Speech and Text Analytics API into our custom agent desktop app using the Python SDK. The goal is to fetch the full conversation transcript for quality assurance reviews.

The initial query for the conversation analysis works fine. I’m using analytics_api.get_analytics_conversations_details with the correct date range and entity ID. The response comes back with a 200 OK and lists the segments.

Here’s the snippet I’m using to iterate through the segments:

from genesyscloud import analytics_api

api_instance = analytics_api.AnalyticsApi(api_client)

# ... auth setup omitted ...

result = api_instance.get_analytics_conversations_details(
 body=analytics_api.AnalyticsConversationQueryRequest(
 entity_id='conversation_12345',
 date_from='2023-10-01T00:00:00Z',
 date_to='2023-10-31T23:59:59Z'
 )
)

for segment in result.segments:
 print(f"Transcript: {segment.transcript}")

The problem is the segment.transcript field. It’s not giving me the full text. It seems to be cutting off after about 500 characters per segment, even though the audio is much longer. I’ve checked the raw JSON response and the transcript string is literally truncated with ellipses in some cases, or just stops mid-sentence.

I tried setting include_transcript=true in the query request, but that parameter doesn’t seem to exist in the Python SDK model for AnalyticsConversationQueryRequest. The docs mention a separate endpoint for retrieving transcripts, but I can’t find a specific method like get_conversation_transcript in the analytics_api module.

Is there a different endpoint I should be calling? Or am I missing a flag in the SDK initialization? The conversation ID is definitely correct since the metadata like duration and participant IDs are accurate. Just the text is incomplete.

You’re hitting the default segment limit in the SDK call. Pass maxSegments=1000 to get_analytics_conversations_details or check the hasMore flag in the response to paginate through the rest of the transcript.