Skip to content

Commit db35a1f

Browse files
author
dvonthenen
committed
Provide Remaining API Examples in Catalog
1 parent e08d928 commit db35a1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1996
-537
lines changed

.DS_Store

0 Bytes
Binary file not shown.

README.md

+53-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting Started - Samples
1+
# Getting Started - Examples/Samples
22

33
Symbl's APIs empower developers to enable:
44
- **Real-time** analysis of free-flowing discussions to automatically surface highly relevant summary discussion topics, contextual insights, suggestive action items, follow-ups, decisions, and questions.
@@ -8,34 +8,61 @@ Symbl's APIs empower developers to enable:
88

99
<hr />
1010

11-
## List of Sample Codes
11+
## List of Examples as Code
12+
13+
### Async (Offline, Pre-recorded, etc)
14+
15+
The Async APIs allow individuals to obtain conversation intelligence on offline,
16+
pre-recorded conversations in an audio format (mp3, wav, etc).
17+
18+
- [Action-Items](./examples/node/async/action-items)
19+
- [Analytics](./examples/node/async/analytics)
20+
- [Entities](./examples/node/async/entites)
21+
- [Follow-Ups](./examples/node/async/follow-ups)
22+
- [Messages](./examples/node/async/messages)
23+
- [Questions](./examples/node/async/questions)
24+
- [Summary](./examples/node/async/summary)
25+
- [Topics](./examples/node/async/topics)
26+
- [Trackers](./examples/node/async/trackers)
27+
28+
### Management (Tracker management)
29+
30+
The Management APIs allows individuals to create, list, delete Trackers that can be used
31+
to highlight important or significant words, topics, etc in a given conversation.
32+
33+
- [Create a Tracker](./examples/node/management/create)
34+
- [List all Trackers](./examples/node/management/list)
35+
- [Delete a Tracker](./examples/node/management/delete)
1236

1337
### Real-time
1438

15-
- [Real-time Topics using WebSockets](./examples/node/realtime/topics)
16-
- Connect directly using Streaming API to push audio and get Topics discussed
17-
in real-time.
18-
[Read More](./examples/node/realtime/topics/Readme.md)
19-
- [Real-time Trackers using WebSockets](./examples/node/realtime/trackers)
20-
- Connect directly using Streaming API to push audio and get Trackers discussed
21-
in real-time.
22-
[Read More](./examples/node/realtime/trackers/Readme.md)
39+
These example applications use WebSockets in order to using the Streaming APIs
40+
get real-time analysis on conversation for a variety of intelligence metrics. These
41+
examples make use of the Microphone in order to demonstrate the real-time
42+
analytics capabilities.
43+
44+
- [Topics](./examples/node/realtime/topics)
45+
- [Trackers](./examples/node/realtime/trackers)
46+
- [Questions](./examples/node/realtime/questions)
47+
- [Action-Items](./examples/node/realtime/action-items)
2348

2449
### Telephony
2550

51+
These example applications the Telephony APIs to get real-time analysis on conversation
52+
for a variety of intelligence metrics.
53+
2654
- [Passing different Audio Codecs](./examples/node/telephony/custom-audio-config)
2755
- [Realtime Output with PSTN Dialin using Voice SDK](./examples/node/telephony/realtime-insights-transcription)
2856
- Get the live transcription and insights events in a Telephone call.
29-
[Read More](./examples/node/telephony/realtime-insights-transcription/Readme.md)
3057
- [Intent Detection with PSTN Dial-In using Voice SDK](./examples/node/telephony/realtime-intent-detection)
3158
- Get the intents, real-time in a Telephone call.
32-
[Read More](./examples/node/telephony/realtime-intent-detection/Readme.md)
3359
- [PSTN Dial-in using Voice SDK](./examples/node/telephony/speaker-events)
3460
- Establishes a connection using a phone number through PSTN, to send speaker
3561
events, generate insights, and display a summary URL with the output. You
3662
can see how to initialize the Voice SDK, connect to the endpoint, push
3763
speaker events and get the summary URL.
38-
[Read More](./examples/node/telephony/speaker-events/Readme.md)
64+
65+
> **_NOTE:_** Validation on the `Telephony` examples are still pending. If you notice an issue, drop us a line!
3966
4067
## Install
4168

@@ -66,17 +93,20 @@ Make sure your `.env` file is configured correctly.
6693
Once you've configured the above, execute the `run-examples.sh` script.
6794

6895
```
69-
Syntax: run-example.sh [API_TYPE] [PROJECT_NAME] <SDK_LANG>
70-
API_TYPE: realtime or telephony
71-
72-
If PROJECT_NAME is missing, a list of available projects will be displayed on
73-
screen based on the API_TYPE selected.
74-
75-
Currently, the only accepted value for SDK_LANG is node, but is a optional parameter.
76-
77-
To list examples for realtime projects, run:
96+
Syntax: <SDK_LANG=lang> run-example.sh [API_TYPE] <PROJECT_NAME> <PARAM=VALUE>
97+
98+
Required Parameters:
99+
- API_TYPE (required): async, realtime or telephony
100+
101+
Optional parameters:
102+
- PROJECT_NAME (optional): if missing, will provide a list of projects
103+
- SDK_LANG (optional): environment variable to select the language
104+
- <PARAM=VALUE> (optional): some action require user input
105+
106+
Examples:
107+
To list examples for streaming projects, run:
78108
run-example.sh realitime
79-
109+
80110
To the realtime tracker example, run:
81111
run-example.sh realitime tracker
82112
```
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using the ActionItem Async API
2+
3+
This is a simple main-style sample application using Symbl's Async API. This application will post an audio file to the platform and obtain the ActionItem results when they become available.
4+
5+
## Getting started
6+
7+
Open `.env` file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get APP_ID and APP_SECRET from [https://platform.symbl.ai](https://platform.symbl.ai)
8+
9+
Most of the heavy lifting is done in the `common` library which you can read about its plumbing [here](../../common/README.md).
10+
11+
## Async Conversation Processing
12+
13+
Obtaining intelligence on ActionItems using the Async API is pretty straight forward, the steps are:
14+
15+
1. Login
16+
2. Post the audio file and wait for the Symbl platform to process it
17+
3. Retrieve the ActionItems
18+
19+
```
20+
async function main() {
21+
/*
22+
Login and get token
23+
*/
24+
var token = await common.Login();
25+
26+
/*
27+
Post the audio file to the Symbl platform
28+
*/
29+
var result = await post.Post(token, "All_I_Really_Want.mp3");
30+
31+
/*
32+
Process ActionItems for the audio file
33+
*/
34+
var actionItems = await intelligence.ActionItems(token, result.conversationId);
35+
output = JSON.parse(actionItems);
36+
console.log(output);
37+
}
38+
39+
main();
40+
```
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require('dotenv').config()
2+
const util = require('util')
3+
4+
const common = require('../../common/common.js');
5+
const post = require('../../common/post-file.js');
6+
const intelligence = require('../../common/intelligence.js');
7+
8+
async function main() {
9+
/*
10+
Login and get token
11+
*/
12+
var token = await common.Login();
13+
14+
/*
15+
Post the audio file to the Symbl platform
16+
*/
17+
var result = await post.Post(token, process.env.FILENAME);
18+
19+
/*
20+
Process ActionItems for the audio file
21+
*/
22+
var actionItems = await intelligence.ActionItems(token, result.conversationId);
23+
var output = JSON.parse(actionItems);
24+
console.log(util.inspect(output, false, null, true));
25+
}
26+
27+
main();
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using the Analytics Async API
2+
3+
This is a simple main-style sample application using Symbl's Async API. This application will post an audio file to the platform and obtain the Analytics results when they become available.
4+
5+
## Getting started
6+
7+
Open `.env` file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get APP_ID and APP_SECRET from [https://platform.symbl.ai](https://platform.symbl.ai)
8+
9+
Most of the heavy lifting is done in the `common` library which you can read about its plumbing [here](../../common/README.md).
10+
11+
## Async Conversation Processing
12+
13+
Obtaining intelligence on Analytics using the Async API is pretty straight forward, the steps are:
14+
15+
1. Login
16+
2. Post the audio file and wait for the Symbl platform to process it
17+
3. Retrieve the Analytics
18+
19+
```
20+
async function main() {
21+
/*
22+
Login and get token
23+
*/
24+
var token = await common.Login();
25+
26+
/*
27+
Post the audio file to the Symbl platform
28+
*/
29+
var result = await post.Post(token, "All_I_Really_Want.mp3");
30+
31+
/*
32+
Process Analytics for the audio file
33+
*/
34+
var analytics = await intelligence.Analytics(token, result.conversationId);
35+
output = JSON.parse(analytics);
36+
console.log(output);
37+
}
38+
39+
main();
40+
```
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require('dotenv').config()
2+
const util = require('util')
3+
4+
const common = require('../../common/common.js');
5+
const post = require('../../common/post-file.js');
6+
const intelligence = require('../../common/intelligence.js');
7+
8+
async function main() {
9+
/*
10+
Login and get token
11+
*/
12+
var token = await common.Login();
13+
14+
/*
15+
Post the audio file to the Symbl platform
16+
*/
17+
var result = await post.Post(token, process.env.FILENAME);
18+
19+
/*
20+
Process Analytics for the audio file
21+
*/
22+
var analytics = await intelligence.Analytics(token, result.conversationId);
23+
var output = JSON.parse(analytics);
24+
console.log(util.inspect(output, false, null, true));
25+
}
26+
27+
main();
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using the Entities Async API
2+
3+
This is a simple main-style sample application using Symbl's Async API. This application will post an audio file to the platform and obtain the Entities results when they become available.
4+
5+
## Getting started
6+
7+
Open `.env` file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get APP_ID and APP_SECRET from [https://platform.symbl.ai](https://platform.symbl.ai)
8+
9+
Most of the heavy lifting is done in the `common` library which you can read about its plumbing [here](../../common/README.md).
10+
11+
## Async Conversation Processing
12+
13+
Obtaining intelligence on Entities using the Async API is pretty straight forward, the steps are:
14+
15+
1. Login
16+
2. Post the audio file and wait for the Symbl platform to process it
17+
3. Retrieve the Entities
18+
19+
```
20+
async function main() {
21+
/*
22+
Login and get token
23+
*/
24+
var token = await common.Login();
25+
26+
/*
27+
Post the audio file to the Symbl platform
28+
*/
29+
var result = await post.Post(token, "All_I_Really_Want.mp3");
30+
31+
/*
32+
Process Entities for the audio file
33+
*/
34+
var entities = await intelligence.Entities(token, result.conversationId);
35+
output = JSON.parse(entities);
36+
console.log(output);
37+
}
38+
39+
main();
40+
```

examples/node/async/entities/index.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require('dotenv').config()
2+
const util = require('util')
3+
4+
const common = require('../../common/common.js');
5+
const post = require('../../common/post-file.js');
6+
const intelligence = require('../../common/intelligence.js');
7+
8+
async function main() {
9+
/*
10+
Login and get token
11+
*/
12+
var token = await common.Login();
13+
14+
/*
15+
Post the audio file to the Symbl platform
16+
*/
17+
var result = await post.Post(token, process.env.FILENAME);
18+
19+
/*
20+
Process Entites for the audio file
21+
*/
22+
var entities = await intelligence.Entities(token, result.conversationId);
23+
var output = JSON.parse(entities);
24+
console.log(util.inspect(output, false, null, true));
25+
}
26+
27+
main();
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Using the FollowUp Async API
2+
3+
This is a simple main-style sample application using Symbl's Async API. This application will post an audio file to the platform and obtain the FollowUp results when they become available.
4+
5+
## Getting started
6+
7+
Open `.env` file and add your APP_ID, APP_SECRET, SUMMARY_EMAIL. You can get APP_ID and APP_SECRET from [https://platform.symbl.ai](https://platform.symbl.ai)
8+
9+
Most of the heavy lifting is done in the `common` library which you can read about its plumbing [here](../../common/README.md).
10+
11+
## Async Conversation Processing
12+
13+
Obtaining intelligence on FollowUps using the Async API is pretty straight forward, the steps are:
14+
15+
1. Login
16+
2. Post the audio file and wait for the Symbl platform to process it
17+
3. Retrieve the FollowUps
18+
19+
```
20+
async function main() {
21+
/*
22+
Login and get token
23+
*/
24+
var token = await common.Login();
25+
26+
/*
27+
Post the audio file to the Symbl platform
28+
*/
29+
var result = await post.Post(token, "All_I_Really_Want.mp3");
30+
31+
/*
32+
Process FollowUps for the audio file
33+
*/
34+
var followUps = await intelligence.FollowUps(token, result.conversationId);
35+
output = JSON.parse(followUps);
36+
console.log(output);
37+
}
38+
39+
main();
40+
```
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require('dotenv').config()
2+
const util = require('util')
3+
4+
const common = require('../../common/common.js');
5+
const post = require('../../common/post-file.js');
6+
const intelligence = require('../../common/intelligence.js');
7+
8+
async function main() {
9+
/*
10+
Login and get token
11+
*/
12+
var token = await common.Login();
13+
14+
/*
15+
Post the audio file to the Symbl platform
16+
*/
17+
var result = await post.Post(token, process.env.FILENAME);
18+
19+
/*
20+
Process FollowUps for the audio file
21+
*/
22+
var followUps = await intelligence.FollowUps(token, result.conversationId);
23+
var output = JSON.parse(followUps);
24+
console.log(util.inspect(output, false, null, true));
25+
}
26+
27+
main();

0 commit comments

Comments
 (0)