Jump to: navigation, search

Recovering Metadata for SpeechMiner

The Recording Processor Script (RPS) installation package provides an additional script to manually post recordings to SpeechMiner by querying metadata from Interaction Recording Web Services (RWS).

Starting with GIR release 8.5.216.01, GIR implements automated recovery of failed recordings by using the Lost Voice Recording (LVR) Recovery Script. See Automated Recovery of Recordings for details.

Prerequisites

Before you start, you must have the following prerequisites:

  • Recording Processor Script installed
  • Python 2.7 or higher installed
  • Admin username and password with read and write permissions on the folder where the script resides

Re-posting the Recordings to SpeechMiner

After you have installed the RPS, you can find the repost_to_sm_from_htcc.py reposting script in the <Installation Directory>/scripts/ directory.

From the command line on the machine where the RPS is installed and running, execute the following command:

C:\<Installation Directory>\scripts>python repost_to_sm_from_htcc.py -startTime 1437057696000 
-endTime 1437058696000 -htccUri http://<Web Services URI> -ccid 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc 
-region us-west-1

To return the details of the parameters used, run the following command: C:\GCTI\gir_rps\scripts>python repost_to_sm_from_htcc.py -h

This command will return the following results:

usage: repost_to_sm_from_htcc.py [-h] -startTime STARTTIME -endTime ENDTIME
                                 -region REGION -ccid CCID -htccUri HTCCURI
                                 [-sleepMs SLEEPMS] [-pageLimit PAGELIMIT]
                                 [-rp.speechminer.uri SPEECHMINERURI]
                                 [-disableFailedFolder]
Recover RP failed folder
optional arguments:
  -h, --help            show this help message and exit
  -startTime STARTTIME  lower bound of range to recover
  -endTime ENDTIME      upper bound of range to recover
  -region REGION        range to recover, * for all
  -ccid CCID            contact center ID to recover
  -htccUri HTCCURI      htcc prefix. for example http://gws-elb.genesyscloud.com
  -sleepMs SLEEPMS      miliseconds sleep after each recording is processed. default to 0
  -pageLimit PAGELIMIT  page limit of script query from HTCC on each attmpt. default to 10
  -rp.speechminer.uri SPEECHMINERURI
                        speechMiner IR Uri, if provided, it will override
                        values in metadata
  -disableFailedFolder

You can find the parameter descriptions of the parameters below.

Examples

If only one region is recovered, the following command will re-post the recordings to SpeechMiner:

C:\<Installation Directory>\scripts>python repost_to_sm_from_htcc.py -startTime 1437057696000 -endTime 1437058696000 
-htccUri http://<Web Services URI> -ccid 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc -region us-west-1
Please enter htcc ops username: ops
Please enter htcc ops password: ops
...


If there is more than one region recovered, the following command will re-post the recordings to SpeechMiner: Recover range of recording from all regions

C:\<Installation Directory>\scripts>python repost_to_sm_from_htcc.py -startTime 1437057696000 -endTime 1437058696000 
-htccUri http://<Web Services URI> -ccid 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc -region *
Please enter htcc ops username: ops
Please enter htcc ops password: ops
...

If the failed recording is caused by an invalid SpeechMiner Interaction Receiver, the metadata will contain the wrong rp.speechminer.uri or rp.speechminer.auth. The following command will re-post the recording to SpeechMiner with the correct SpeechMiner URI:

C:\<Installation Directory>\scripts>python repost_to_sm_from_htcc.py -startTime 1437057696000 -endTime 1437058696000 
-htccUri http://<Web Services URI> -ccid 57c0b771-b57c-4ea8-8655-7ef6d3c58ccc -region us-west-1 -rp.speechminer.uri http://<SpeechMiner IP Address>/interationreceiver
Please enter htcc ops username: ops
Please enter htcc ops password: ops
Please enter rp.speechminer.auth (for example rp_user:123455): rpUser:123456
...

Command Line Parameters

The following table describes the command line parameters:

Parameter Name Mandatory Accept Prompt Input Description Example
startTime Y No The time, in UTC format, of the earliest recording to be processed. 1437057696000
endTime Y No The time, in UTC format, of the latest recording to be processed. 1437057696000
htccUri N No The host and port of the Interaction Recording Web Services node (or Web Services node if you're using version 8.5.210.02 or earlier). If this parameter is not defined, the recordings are not rePOSTed to Interaction Recording Web Services (Web Services). http://<Interaction Recording Web Services Server>:<Interaction Recording Web Services Port>
region N No The location of the recording.
ccid N No The Contact Center ID.
rp.speechminer.uri N Yes The URI that points to the SpeechMiner Interaction Receiver responsible for accepting metadata from the Recording Processor script. If this parameter is not provided, or if it is an invalid URI, the script will prompt to override the value. http://<SpeechMiner Host>/interactionreceiver
rp.speechminer.auth N Yes The credentials required to connect to the SpeechMiner Interaction Receiver used by the Recording Processor Script. The format is username:password, where the username and password are the Interaction Receiver credentials. <SpeechMiner Username>:<SpeechMiner Password>
sleepsMs N No The time, in milliseconds, to wait after processing each recording. If this parameter is not provided, the value defaults to 0. 30
pageLimit N No The number of pages to query on each process attempt. 10
disableFailedFolder N No Determines whether to disable the folder for failed recordings.

Logging

The repost_to_sm_from_htcc.py script writes audit logs in the repost_to_sm_from_htcc_<execution-time>/results.log file. If the disableFailedFolder parameter is not provided, and if there is an exception during recovery, the script will dump the recording metadata into repost_to_sm_from_htcc_<execution-time>/<ccid> file.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on November 9, 2017, at 03:15.