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

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.

1 Like

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.access_token = 'your_access_token'

or use get_client_credentials_token(...), get_saml2bearer_token(...) or get_code_authorization_token(...)

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)
division_id = ['division_id_example'] # list[str] | Filter by queue division ID(s) (optional)
peer_id = ['peer_id_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.
api_response = api_instance.get_routing_queues(page_number=page_number, page_size=page_size, sort_order=sort_order, name=name, id=id, division_id=division_id, peer_id=peer_id, has_peer=has_peer)
pprint(api_response)
except ApiException as e:
print("Exception when calling GetRoutingQueuesRequest->get_routing_queues: %s\n" % e)

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

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

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

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