Skip to content

Commit 8a7cc5e

Browse files
Develop (#40)
* Roshani conversation data api (#24) * Added conversation data API * Updated version of symbl * excluded `_data` from calling function * Roshani readme changes (#28) * Added examples and changed readme file * Added changes in readme documents * Added changes in readme documents * updates hyperlinks * corrected links * Removed unnecessary imported packages * Fixed issues in readme file * Roshani readme changes (#29) * Added examples and changed readme file * Added changes in readme documents * Added changes in readme documents * updates hyperlinks * corrected links * Removed unnecessary imported packages * Fixed issues in readme file * Merged `roshani_readme_changes` with `develop` branch * Excluded Conversation data API (#31) "Added readme changes" * Fixed type mistake fixed 'Errros' to 'Errors' in readme doc * Added Conversation data API (#35) * Added Conversation Data API * Fixed hyperlink issues of readme doc * Fixed Append video URL link * Fixed issues of hyperlinks (#37) * Mvp 5 (#39) * Added Analytics, Trackers and Entities APIs * Changed version names * Added Parse date code * Updates examples * Fixed examples * Corrected content-type for payload * corrected object name in readme doc * Corrected test cases 70% * Fixed variable naming in Telephony and Streaming APIs example * Fixed Telephony events
1 parent 1b22f40 commit 8a7cc5e

23 files changed

+422
-38
lines changed

example/Async_API/Audio_API/append_audio_file.py

+9
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@
2626

2727
#To get the questions from the conversation
2828
#print(conversation_object.get_questions())
29+
30+
# To get the analytics from the conversation
31+
#print(conversation_object.get_analytics())
32+
33+
# To get the trackers from the conversation
34+
#print(conversation_object.get_trackers())
35+
36+
# To get the entities from the conversation
37+
#print(conversation_object.get_entities())

example/Async_API/Audio_API/append_audio_url.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,13 @@
2525
#print(conversation_object.get_topics())
2626

2727
#To get the questions from the conversation
28-
#print(conversation_object.get_questions())
28+
#print(conversation_object.get_questions())
29+
30+
# To get the analytics from the conversation
31+
#print(conversation_object.get_analytics())
32+
33+
# To get the trackers from the conversation
34+
#print(conversation_object.get_trackers())
35+
36+
# To get the entities from the conversation
37+
#print(conversation_object.get_entities())

example/Async_API/Audio_API/process_audio_file.py

+29-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,27 @@
33
file = "<file_path>"
44

55
''' like this you can pass the parameter
6+
entities = [
7+
{
8+
"customType": "custom_type",
9+
"text": "entity_name"
10+
}
11+
]
12+
13+
trackers = [{
14+
"name": "tracker_name",
15+
"vocabulary": [
16+
"vocabulary_1",
17+
"vocabulary_2",
18+
"vocabulary_n"
19+
]
20+
}]
621
params = {
722
'name': "Meeting",
23+
"detectEntities": "true",
24+
"enableAllTrackers":"true",
25+
"entities":entities,
26+
'trackers': trackers,
827
'enableSpeakerDiarization': "true",
928
"diarizationSpeakerCount": "2",
1029
"channelMetadata": [
@@ -48,4 +67,13 @@
4867
#print(conversation_object.get_topics())
4968

5069
#To get the questions from the conversation
51-
#print(conversation_object.get_questions())
70+
#print(conversation_object.get_questions())
71+
72+
# To get the analytics from the conversation
73+
#print(conversation_object.get_analytics())
74+
75+
# To get the trackers from the conversation
76+
#print(conversation_object.get_trackers())
77+
78+
# To get the entities from the conversation
79+
#print(conversation_object.get_entities())

example/Async_API/Audio_API/process_audio_url.py

+32-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
import symbl
22
'''
33
you can also pass other parameters with the payload
4+
5+
entities = [
6+
{
7+
"customType": "custom_type",
8+
"text": "entity_name"
9+
}
10+
]
11+
12+
trackers = [{
13+
"name": "tracker_name",
14+
"vocabulary": [
15+
"vocabulary_1",
16+
"vocabulary_2",
17+
"vocabulary_n"
18+
]
19+
}]
20+
421
payload = {
522
'url': "<url>", #write the url path of the audio, which you want to process
623
'name': "TestingMeeting",
24+
"detectEntities": "true",
25+
"enableAllTrackers":"true",
26+
"entities":entities,
27+
'trackers': trackers,
728
'enableSpeakerDiarization': "true",
829
'diarizationSpeakerCount': "2",
930
'channelMetadata': [
@@ -23,8 +44,8 @@
2344
}
2445
]
2546
}
26-
'''
2747
48+
'''
2849
payload = {'url': "<url>"} #write the url path of the audio, which you want to process
2950
conversation_object = symbl.Audio.process_url(payload=payload)
3051

@@ -47,4 +68,13 @@
4768
#print(conversation_object.get_topics())
4869

4970
#To get the questions from the conversation
50-
#print(conversation_object.get_questions())
71+
#print(conversation_object.get_questions())
72+
73+
# To get the analytics from the conversation
74+
#print(conversation_object.get_analytics())
75+
76+
# To get the trackers from the conversation
77+
#print(conversation_object.get_trackers())
78+
79+
# To get the entities from the conversation
80+
#print(conversation_object.get_entities())

example/Async_API/Text_API/append_text.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,13 @@
3838
#print(conversation_object.get_topics())
3939

4040
#To get the questions from the conversation
41-
#print(conversation_object.get_questions())
41+
#print(conversation_object.get_questions())
42+
43+
# To get the analytics from the conversation
44+
#print(conversation_object.get_analytics())
45+
46+
# To get the trackers from the conversation
47+
#print(conversation_object.get_trackers())
48+
49+
# To get the entities from the conversation
50+
#print(conversation_object.get_entities())

example/Async_API/Text_API/process_text.py

+31
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
import symbl
22

3+
#you can add the different vocabulary, which you would like to track
4+
trackers = [{
5+
"name": "text_tracker",
6+
"vocabulary": [
7+
"white",
8+
"issues",
9+
"vaccination"
10+
]
11+
}]
312
payload = {
13+
414
"name": "TextAPI", # you can update the name of the conversation
15+
16+
#"trackers": trackers, #To detect the trackers
17+
18+
#"detectEntities": "true", #To get the entities
19+
20+
#To define Custom entities
21+
"entities": [
22+
{
23+
"customType": "identify_org",
24+
"text": "platform"
25+
}
26+
],
527
"messages": [
628
{
729
"payload": {"content": "Hi Anthony. I saw your complaints about bad call reception on your mobile phone. Can I know what issues you are currently facing?"},
@@ -48,3 +70,12 @@
4870

4971
# To get the questions from the conversation
5072
# print(conversation_object.get_questions())
73+
74+
# To get the analytics from the conversation
75+
#print(conversation_object.get_analytics())
76+
77+
# To get the trackers from the conversation
78+
#print(conversation_object.get_trackers())
79+
80+
# To get the entities from the conversation
81+
#print(conversation_object.get_entities())

example/Async_API/Video_API/append_video_file.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,13 @@
2626
#print(conversation_object.get_topics())
2727

2828
#To get the questions from the conversation
29-
#print(conversation_object.get_questions())
29+
#print(conversation_object.get_questions())
30+
31+
# To get the analytics from the conversation
32+
#print(conversation_object.get_analytics())
33+
34+
# To get the trackers from the conversation
35+
#print(conversation_object.get_trackers())
36+
37+
# To get the entities from the conversation
38+
#print(conversation_object.get_entities())

example/Async_API/Video_API/append_video_url.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,13 @@
2525
#print(conversation_object.get_topics())
2626

2727
#To get the questions from the conversation
28-
#print(conversation_object.get_questions())
28+
#print(conversation_object.get_questions())
29+
30+
# To get the analytics from the conversation
31+
#print(conversation_object.get_analytics())
32+
33+
# To get the trackers from the conversation
34+
#print(conversation_object.get_trackers())
35+
36+
# To get the entities from the conversation
37+
#print(conversation_object.get_entities())

example/Async_API/Video_API/process_video_file.py

+30-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,27 @@
22

33
file = "<file_path>"
44
''' like this you can pass the parameter
5+
entities = [
6+
{
7+
"customType": "custom_type",
8+
"text": "entity_name"
9+
}
10+
]
11+
12+
trackers = [{
13+
"name": "tracker_name",
14+
"vocabulary": [
15+
"vocabulary_1",
16+
"vocabulary_2",
17+
"vocabulary_n"
18+
]
19+
}]
520
params = {
6-
'name': "TestingMeeting",
21+
'name': "Meeting",
22+
"detectEntities": "true",
23+
"enableAllTrackers":"true",
24+
"entities":entities,
25+
'trackers': trackers,
726
'enableSpeakerDiarization': "true",
827
"diarizationSpeakerCount": "2",
928
"channelMetadata": [
@@ -47,4 +66,13 @@
4766
#print(conversation_object.get_topics())
4867

4968
#To get the questions from the conversation
50-
#print(conversation_object.get_questions())
69+
#print(conversation_object.get_questions())
70+
71+
# To get the analytics from the conversation
72+
#print(conversation_object.get_analytics())
73+
74+
# To get the trackers from the conversation
75+
#print(conversation_object.get_trackers())
76+
77+
# To get the entities from the conversation
78+
#print(conversation_object.get_entities())

example/Async_API/Video_API/process_video_url.py

+29-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,29 @@
22

33
'''
44
you can also pass other parameters with the payload
5+
entities = [
6+
{
7+
"customType": "custom_type",
8+
"text": "entity_name"
9+
}
10+
]
11+
12+
trackers = [{
13+
"name": "tracker_name",
14+
"vocabulary": [
15+
"vocabulary_1",
16+
"vocabulary_2",
17+
"vocabulary_n"
18+
]
19+
}]
520
621
payload = {
722
'url': "<url>", #write the url path of the video, which you want to process
823
'name': "TestingMeeting",
24+
"detectEntities": "true",
25+
"enableAllTrackers":"true",
26+
"entities":entities,
27+
'trackers': trackers,
928
'enableSpeakerDiarization': "true",
1029
'diarizationSpeakerCount': "2",
1130
'channelMetadata': [
@@ -26,7 +45,6 @@
2645
]
2746
}
2847
29-
3048
conversation_object = symbl.Video.process_url(payload=payload)
3149
'''
3250

@@ -53,4 +71,13 @@
5371
#print(conversation_object.get_topics())
5472

5573
#To get the questions from the conversation
56-
#print(conversation_object.get_questions())
74+
#print(conversation_object.get_questions())
75+
76+
# To get the analytics from the conversation
77+
#print(conversation_object.get_analytics())
78+
79+
# To get the trackers from the conversation
80+
#print(conversation_object.get_trackers())
81+
82+
# To get the entities from the conversation
83+
#print(conversation_object.get_entities())
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import symbl
22

3-
conversation_id=1234567890 # Update with the conversation Id of your conversation
3+
conversation_id=5180676375576576 # Update with the conversation Id of your conversation
44

55
print(symbl.Conversations.get_messages(conversation_id))
66
print(symbl.Conversations.get_conversation(conversation_id))
77
print(symbl.Conversations.get_action_items(conversation_id))
88
print(symbl.Conversations.get_follow_ups(conversation_id))
99
print(symbl.Conversations.get_members(conversation_id))
1010
print(symbl.Conversations.get_topics(conversation_id))
11-
print(symbl.Conversations.get_questions(conversation_id))
11+
print(symbl.Conversations.get_questions(conversation_id))
12+
print(symbl.Conversations.get_analytics(conversation_id))
13+
print(symbl.Conversations.get_trackers(conversation_id))
14+
print(symbl.Conversations.get_entities(conversation_id))

example/Streaming_API/streaming.py

+19-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@
66
'message': lambda message: print('printing the message response ', str(message))
77
# ,'message_response': lambda message: print('printing the transcription', str(message))
88
# ,'insight_response': lambda insight: print('printing the insight response ', str(insight))
9-
# ,'tracker_response': lambda tracker: print('printing the tracker response ', str(tracker))
9+
#,'tracker_response': lambda tracker: print('printing the tracker response ', str(tracker))
1010
# ,'topic_response': lambda topic: print('printing the topic response ', str(topic))
1111
}
1212

13+
14+
#To access the Trackers API, you will need to specify 'tracker_response' event
15+
trackers = [{
16+
"name": "tracker_name",
17+
"vocabulary": [
18+
"hello",
19+
"vocabulary_2",
20+
"vocabulary_n"
21+
]
22+
}]
23+
24+
1325
insight_types = ['question', 'action_item']
1426

1527
speaker = {
@@ -18,7 +30,7 @@
1830
}
1931

2032
connection_object = symbl.Streaming.start_connection(
21-
insight_types=insight_types, speaker=speaker)
33+
insight_types=insight_types, speaker=speaker,trackers=trackers)
2234

2335
connection_object.subscribe(events)
2436

@@ -46,4 +58,8 @@
4658
#print(connection_object.conversation.get_topics())
4759

4860
#To get the questions from the conversation
49-
#print(connection_object.conversation.get_questions())
61+
#print(connection_object.conversation.get_questions())
62+
63+
# To get the analytics from the conversation
64+
#print(connection_object.conversation.get_analytics())
65+

0 commit comments

Comments
 (0)