Legacy Dev Forum Posts

 View Only

Sign Up

Voice Transcript Content by Topic

  • 1.  Voice Transcript Content by Topic

    Posted 06-05-2025 18:08

    ndayGT | 2021-07-30 18:25:29 UTC | #1

    Hello,

    I would like to query voice transcripts using /api/v2/speechandtextanalytics/conversations/ and filter to only include conversations categorized with a specific topic.

    by topic I mean the AI / ML ran against the transcript, in addition to sentiment.

    is there an API endpoint that returns the topics for a conversation?

    Thank you!


    Jerome.Saint-Marc | 2021-08-03 13:47:41 UTC | #2

    Hello,

    As far as I know (I haven't practiced transcript search often I must say), you would have 2 different API endpoints to search voice transcripts (or transcripts in general). There is one API endpoint that you can use to filter per topic, and a second API endpoint that you can use to filter per sentimentScore value/range. At this time, there is no API endpoint which allows to include both filters using the same API endpoint (I mean using topicId and sentimentScore in the same endpoint filters).

    1 - Per Topic ID

    If you are trying to retrieve conversations which were categorized with a specific topic, you can use POST /api/v2/analytics/transcripts/aggregates/query. It is similar to what I described in this other post. You could just add the conversationId in groupBy (to retrieve the conversationId of the conversations with this topic). Ex:

    { "interval": "2021-07-07T22:00:00.000Z/2021-07-08T22:00:00.000Z", "groupBy": ["mediaType","conversationId"], "metrics": ["nTopicCommunications"], "flattenMultivaluedDimensions": false, "filter": { "type": "and", "predicates": [ { "dimension": "resultsBy", "value": "communication" }, { "dimension": "topicId", "value": "THETOPICIDYOUARESEARCHING_FOR" } ] } }

    With Python SDK, this would correspond to postanalyticstranscriptsaggregatesquery

    2 - Per SentimentScore

    If you are trying to retrieve conversations with a specific sentimentScore (or range), you could use POST /api/v2/speechandtextanalytics/transcripts/search. There is an example of search with sentimentScore range on this page.

    With Python SDK, this would correspond to postspeechandtextanalyticstranscripts_search

    3 - Retrieving SentimentScore and Topics

    Once you have the conversationIds (as results of one of the search above):

    You will get access to the sentimentScore (and some metrics) using GET /api/v2/speechandtextanalytics/conversations/{conversationId}. See here for more info.

    If you need to access the list of topics for a conversation, you have to use GET /api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturl and download the transcript itself via the obtained downloadUrl. See here for more info. The communicationId corresponds to the id of the call/chat/... of the first participant (customer) that appears in the conversation context (obtained via GET /api/v2/conversations/{conversationId}). See this other post for more details.

    Regards,


    ndayGT | 2021-08-03 13:48:11 UTC | #3

    No joke, this is the best reply I've ever received to a question on a forum.

    Thank you!


    Jerome.Saint-Marc | 2021-08-03 14:21:47 UTC | #4

    Thank you. Appreciated :-)


    system | 2021-09-03 14:21:47 UTC | #5

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 11633