Retrieve Results
Get Phrase-by-Phrase Transcript
5 min
// // overview leveraging the unique interactionidentifier provided upon successfully declaring the audio interaction, this endpoint enables you to instantly retrieve a detailed phrase by phrase transcript for the audio file provided including precise word timings , confidence scores , and speaker labels when this get get successfully executes, an http status is returned to indicate the request was successful, along with a json response providing your detailed transcription output sample api response (truncated) { "allparticipants" { "phrases" \[ "thank", "you", "for", "calling", ], "phrasesegments" \[ { "starttimeoffset" 1410, "endtimeoffset" 1730, "phraseindex" 0, "score" 1 }, { "starttimeoffset" 1730, "endtimeoffset" 1810, "phraseindex" 1, "score" 1 }, ] } } if an error occurs when requesting to declare the interaction, a standard http status will be retuned to indicate the request was unsuccessful, along with a json response containing additional details to assist in troubleshooting // // request parameters & code examples tab examples url https api elevateai com v1 interactions interactionidentifier transcript name retrieve a phrase by phrase transcript method get request pathparameters kind required name interactionidentifier type string description interactionidentifier returned upon successfully declaring the interaction queryparameters headerparameters kind required name x api token type string description valid api key associated with your account for authentication and usage tracking kind optional name accept encoding type string description recommended for bandwidth optimization will be gzip deflate br bodydataparameters formdataparameters results languages id wov v6skqlwseavef84vd code n t allparticipants n t t phrases n t t t string n t t n t t phrasesegments n t t t starttimeoffset number n t t t endtimeoffset number n t t t phraseindex number n t t t score number n t t n t n t participantone n t t phrases n t t t string n t t n t t phrasesegments n t t t starttimeoffset number n t t t endtimeoffset number n t t t phraseindex number n t t t score number n t t n t n t participanttwo n t t phrases n t t t string n t t n t t phrasesegments n t t t starttimeoffset number n t t t endtimeoffset number n t t t phraseindex number n t t t score number n t t n t n t redactionsegments n t t starttimeoffset number n t t endtimeoffset number n t t result string n t t score number n t n language 200 customlabel id ypthsxrc k8r4z ys8dyf code n errormessage n language 401 customlabel id cnnwssw8rcabnp3vrvm75 code r n errormessage r n language 404 customlabel selectedlanguageid wov v6skqlwseavef84vd examples languages id hd 0aondtyph5nkyqvtfk code curl location g request get https api elevateai com v1 interactions interctionidentifier transcript n header x api token your api token n header content type application json n header accept encoding gzip deflate br language curl customlabel id e5gh4zixbbgtze2jimfqy code var request require request ; nvar options n method get n url https api elevateai com v1 interactions interctionidentifier transcript n headers n x api token your api token n content type application json n accept encoding gzip deflate br n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; language nodejs customlabel id dibviff8cbpbtza4jgpcm code var myheaders new headers ; nmyheaders append x api token your api token ; nmyheaders append content type application json ; nmyheaders append accept encoding gzip deflate br ; n nvar requestoptions n method get n headers myheaders n redirect follow n ; n nfetch https api elevateai com v1 interactions interctionidentifier transcript requestoptions n then response response text n then result console log result n catch error console log error error ; language javascript customlabel id q5dbqawvrri5gumffnex1 code import http client nimport json n nconn http client httpsconnection api elevateai com npayload nheaders n x api token your api token n content type application json n accept encoding gzip deflate br n nconn request get v1 interactions interctionidentifier transcript payload headers nres conn getresponse ndata res read nprint data decode utf 8 language python customlabel id syjyh6aococcj0ftbckhm code require uri nrequire json nrequire net http n nurl uri https api elevateai com v1 interactions interctionidentifier transcript n nhttps net http new url host url port nhttps use ssl true n nrequest net http get new url nrequest x api token your api token nrequest content type application json nrequest accept encoding gzip deflate br n nresponse https request request nputs response read body n language ruby customlabel id b gcgdtd9 lmirv4pagoy code var client new restclient https api elevateai com v1 interactions interctionidentifier transcript ; r nclient timeout 1; r nvar request new restrequest method get ; r nrequest addheader x api token your api token ; r nrequest addheader content type application json ; r nrequest addheader accept encoding gzip deflate br ; r nirestresponse response client execute request ; r nconsole writeline response content ; language csharp customlabel id cchh0amodxyixjv 9ezfn code ?php r n r n curl curl init ; r n r ncurl setopt array curl array r n curlopt url https api elevateai com v1 interactions 7binterctionidentifier 7d transcript r n curlopt returntransfer true r n curlopt encoding r n curlopt maxredirs 10 r n curlopt timeout 0 r n curlopt followlocation true r n curlopt http version curl http version 1 1 r n curlopt customrequest get r n curlopt httpheader array r n x api token your api token r n content type application json r n accept encoding gzip deflate br r n r n ; r n r n response curl exec curl ; r n r ncurl close curl ; r necho response; r n language php customlabel selectedlanguageid q5dbqawvrri5gumffnex1 description currentnewparameter label header parameter value headerparameters // // response schema schema element type description {participant} object top level for speaker label , identifying whether data in object represents speech associated with allparticipants or participantone and/or participanttwo {participant}/ phrases array of strings ordered list of each unique, non redacted phase spoken by participant in the interaction {participant}/ phrasesegments array of objects list of details associated with each utterance {participant}/phrasesegments/ starttimeoffset number start time of phrase (in milliseconds) {participant}/phrasesegments/ endtimeoffset number end time of phrase (in milliseconds) {participant}/phrasesegments/ phraseindex number index of phrase in participant /phrases {participant}/phrasesegments/ score float confidence score redactionsegments array of objects list of details associated with each redacted phrase redactionsegments/ starttimeoffset number start time of redacted phrase (in milliseconds) redactionsegments/ endtimeoffset number end time of redacted phrase (in milliseconds) redactionsegments/ result string reason for redaction, will be cvv , credit card , or social security redactionsegments/ score float confidence score