Skip to content

Commit

Permalink
voice-transcript remove simplified theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AgnesCorpuz committed Jan 15, 2021
1 parent 857137e commit 6f85917
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions voice-transcript/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ steps:
content: |
This tutorial walks through the steps to get the sentiment score and voice transcript of voice interactions using the [Speech and Text Analytics API](/api/rest/v2/speechtextanalytics/).
To know more details on voice transcription, click [here](https://help.mypurecloud.com/articles/about-voice-transcription/?theme=simplified).
To know more details on voice transcription, click [here](https://help.mypurecloud.com/articles/about-voice-transcription).
For steps on how to configure voice transcription, visit this [article](https://help.mypurecloud.com/articles/configure-voice-transcription/?theme=simplified).
For steps on how to configure voice transcription, visit this [article](https://help.mypurecloud.com/articles/configure-voice-transcription).
- title: Input
content: |
For this tutorial, the user will be asked to input the conversation ID.
Expand Down Expand Up @@ -46,7 +46,7 @@ steps:
}
```
To know more about Sentiment Analysis, click [here](https://help.mypurecloud.com/articles/about-sentiment-analysis/?theme=simplified).
To know more about Sentiment Analysis, click [here](https://help.mypurecloud.com/articles/about-sentiment-analysis).
- title: Get Transcript URL
content: |
Expand Down
8 changes: 4 additions & 4 deletions voice-transcript/nodejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ prompt.get(schema, function (_err, result) {
function getConversationDetails(conversationId) {
conversationsApi.getConversation(conversationId)
.then((conversationDetails) => {
var customer = conversationDetails.participants.find(p => p.purpose == 'customer');
var communicationId = customer.calls[0].id;
let customer = conversationDetails.participants.find(p => p.purpose == 'customer');
let communicationId = customer.calls[0].id;

getSentimentScore(conversationId);
getTranscriptUrl(conversationId, communicationId);
Expand All @@ -59,7 +59,7 @@ function getSentimentScore(conversationId) {
function getTranscriptUrl(conversationId, communicationId) {
speechTextAnalyticsApi.getSpeechandtextanalyticsConversationCommunicationTranscripturl(conversationId, communicationId)
.then((data) => {
let settings = { method: "Get" };
let settings = { method: 'Get' };

// Fetch the returned JSON object from the S3 URL
fetch(data.url, settings)
Expand All @@ -68,7 +68,7 @@ function getTranscriptUrl(conversationId, communicationId) {
// Display transcript
for(phrase of json.transcripts[0].phrases) {
// Identify if Agent or Customer
var purpose = (phrase.participantPurpose == 'internal') ? 'Agent' : 'Customer';
let purpose = (phrase.participantPurpose == 'internal') ? 'Agent' : 'Customer';
console.log(purpose + ': ' + phrase.text);
}
});
Expand Down

0 comments on commit 6f85917

Please sign in to comment.