Legacy Dev Forum Posts

 View Only

Sign Up

Need sample code on getting voice transcript data for a given time interval

  • 1.  Need sample code on getting voice transcript data for a given time interval

    Posted 06-05-2025 18:08

    Chaitanya_GC | 2023-03-17 11:59:08 UTC | #1

    I am trying to get all voice transcript data for particular time interval. Can you share some sample code (Python).

    Can you please provide step by step approach on how to get all the transcript data for the given time interval. We referred to the genesys API documentation, but it is not clear.


    Basutkar_Avinash | 2023-03-20 09:36:01 UTC | #2

    I have the same request as well. I'm able to get queue details with the below code obtained from API Explorer. But I'm unable to figure out how to get voice interactions transcripts from one of those queues.

    import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint

    Configure OAuth2 access token for authorization: PureCloud OAuth

    PureCloudPlatformClientV2.configuration.accesstoken = 'youraccess_token'

    or use getclientcredentialstoken(...), getsaml2bearertoken(...) or getcodeauthorizationtoken(...)

    create an instance of the API class

    api_instance = PureCloudPlatformClientV2.RoutingApi()

    page_number = 1 # int

    Page number (optional) (default to 1)

    page_size = 25 # int

    Page size (optional) (default to 25)

    sort_order = ''asc'' # str

    Note: results are sorted by name. (optional) (default to 'asc')

    name = 'name_example' # str

    Filter by queue name (optional)

    id = ['id_example'] # list[str]

    Filter by queue ID(s) (optional)

    divisionid = ['divisionid_example'] # list[str]

    Filter by queue division ID(s) (optional)

    peerid = ['peerid_example'] # list[str]

    Filter by queue peer ID(s) (optional)

    has_peer = True # bool

    Filter by queues associated with peer (optional)

    try:

    Get list of queues.

    apiresponse = apiinstance.getroutingqueues(pagenumber=pagenumber, pagesize=pagesize, sortorder=sortorder, name=name, id=id, divisionid=divisionid, peerid=peerid, haspeer=haspeer) pprint(apiresponse) except ApiException as e: print("Exception when calling GetRoutingQueuesRequest->getrouting_queues: %s\n" % e)


    Declan_ginty | 2023-03-20 10:14:47 UTC | #3

    Hi Guys,

    Could you please provide some more info on what you're having difficulty with? We also have a page on voice transcriptions which may be of help https://developer.genesys.cloud/analyticsdatamanagement/speechtextanalytics/voice-transcript-guide.

    Regards, Declan


    Basutkar_Avinash | 2023-03-20 10:17:50 UTC | #4

    Thank you for your response. By any chance, is there a Python version of this guide?


    Declan_ginty | 2023-03-20 10:28:54 UTC | #5

    Hi Basutkar,

    No unfortunately the guide is only in javascript but if your having trouble converting the guide to Python the API explorer or the Python SDK docs can provide Python example for the different Classes and methods used in the guide.

    Regards, Declan


    system | 2023-04-20 10:29:27 UTC | #6

    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: 18972