Skip to content

Commit

Permalink
Develop (#40)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
roshanijawale authored Aug 9, 2021
1 parent 1b22f40 commit 8a7cc5e
Show file tree
Hide file tree
Showing 23 changed files with 422 additions and 38 deletions.
9 changes: 9 additions & 0 deletions example/Async_API/Audio_API/append_audio_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@

#To get the questions from the conversation
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
11 changes: 10 additions & 1 deletion example/Async_API/Audio_API/append_audio_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
30 changes: 29 additions & 1 deletion example/Async_API/Audio_API/process_audio_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@
file = "<file_path>"

''' like this you can pass the parameter
entities = [
{
"customType": "custom_type",
"text": "entity_name"
}
]
trackers = [{
"name": "tracker_name",
"vocabulary": [
"vocabulary_1",
"vocabulary_2",
"vocabulary_n"
]
}]
params = {
'name': "Meeting",
"detectEntities": "true",
"enableAllTrackers":"true",
"entities":entities,
'trackers': trackers,
'enableSpeakerDiarization': "true",
"diarizationSpeakerCount": "2",
"channelMetadata": [
Expand Down Expand Up @@ -48,4 +67,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
34 changes: 32 additions & 2 deletions example/Async_API/Audio_API/process_audio_url.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
import symbl
'''
you can also pass other parameters with the payload
entities = [
{
"customType": "custom_type",
"text": "entity_name"
}
]
trackers = [{
"name": "tracker_name",
"vocabulary": [
"vocabulary_1",
"vocabulary_2",
"vocabulary_n"
]
}]
payload = {
'url': "<url>", #write the url path of the audio, which you want to process
'name': "TestingMeeting",
"detectEntities": "true",
"enableAllTrackers":"true",
"entities":entities,
'trackers': trackers,
'enableSpeakerDiarization': "true",
'diarizationSpeakerCount': "2",
'channelMetadata': [
Expand All @@ -23,8 +44,8 @@
}
]
}
'''
'''
payload = {'url': "<url>"} #write the url path of the audio, which you want to process
conversation_object = symbl.Audio.process_url(payload=payload)

Expand All @@ -47,4 +68,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
11 changes: 10 additions & 1 deletion example/Async_API/Text_API/append_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
31 changes: 31 additions & 0 deletions example/Async_API/Text_API/process_text.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
import symbl

#you can add the different vocabulary, which you would like to track
trackers = [{
"name": "text_tracker",
"vocabulary": [
"white",
"issues",
"vaccination"
]
}]
payload = {

"name": "TextAPI", # you can update the name of the conversation

#"trackers": trackers, #To detect the trackers

#"detectEntities": "true", #To get the entities

#To define Custom entities
"entities": [
{
"customType": "identify_org",
"text": "platform"
}
],
"messages": [
{
"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?"},
Expand Down Expand Up @@ -48,3 +70,12 @@

# To get the questions from the conversation
# print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
11 changes: 10 additions & 1 deletion example/Async_API/Video_API/append_video_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
11 changes: 10 additions & 1 deletion example/Async_API/Video_API/append_video_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
32 changes: 30 additions & 2 deletions example/Async_API/Video_API/process_video_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@

file = "<file_path>"
''' like this you can pass the parameter
entities = [
{
"customType": "custom_type",
"text": "entity_name"
}
]
trackers = [{
"name": "tracker_name",
"vocabulary": [
"vocabulary_1",
"vocabulary_2",
"vocabulary_n"
]
}]
params = {
'name': "TestingMeeting",
'name': "Meeting",
"detectEntities": "true",
"enableAllTrackers":"true",
"entities":entities,
'trackers': trackers,
'enableSpeakerDiarization': "true",
"diarizationSpeakerCount": "2",
"channelMetadata": [
Expand Down Expand Up @@ -47,4 +66,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
31 changes: 29 additions & 2 deletions example/Async_API/Video_API/process_video_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@

'''
you can also pass other parameters with the payload
entities = [
{
"customType": "custom_type",
"text": "entity_name"
}
]
trackers = [{
"name": "tracker_name",
"vocabulary": [
"vocabulary_1",
"vocabulary_2",
"vocabulary_n"
]
}]
payload = {
'url': "<url>", #write the url path of the video, which you want to process
'name': "TestingMeeting",
"detectEntities": "true",
"enableAllTrackers":"true",
"entities":entities,
'trackers': trackers,
'enableSpeakerDiarization': "true",
'diarizationSpeakerCount': "2",
'channelMetadata': [
Expand All @@ -26,7 +45,6 @@
]
}
conversation_object = symbl.Video.process_url(payload=payload)
'''

Expand All @@ -53,4 +71,13 @@
#print(conversation_object.get_topics())

#To get the questions from the conversation
#print(conversation_object.get_questions())
#print(conversation_object.get_questions())

# To get the analytics from the conversation
#print(conversation_object.get_analytics())

# To get the trackers from the conversation
#print(conversation_object.get_trackers())

# To get the entities from the conversation
#print(conversation_object.get_entities())
7 changes: 5 additions & 2 deletions example/Conversation_Class/conversation_class.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import symbl

conversation_id=1234567890 # Update with the conversation Id of your conversation
conversation_id=5180676375576576 # Update with the conversation Id of your conversation

print(symbl.Conversations.get_messages(conversation_id))
print(symbl.Conversations.get_conversation(conversation_id))
print(symbl.Conversations.get_action_items(conversation_id))
print(symbl.Conversations.get_follow_ups(conversation_id))
print(symbl.Conversations.get_members(conversation_id))
print(symbl.Conversations.get_topics(conversation_id))
print(symbl.Conversations.get_questions(conversation_id))
print(symbl.Conversations.get_questions(conversation_id))
print(symbl.Conversations.get_analytics(conversation_id))
print(symbl.Conversations.get_trackers(conversation_id))
print(symbl.Conversations.get_entities(conversation_id))
22 changes: 19 additions & 3 deletions example/Streaming_API/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@
'message': lambda message: print('printing the message response ', str(message))
# ,'message_response': lambda message: print('printing the transcription', str(message))
# ,'insight_response': lambda insight: print('printing the insight response ', str(insight))
# ,'tracker_response': lambda tracker: print('printing the tracker response ', str(tracker))
#,'tracker_response': lambda tracker: print('printing the tracker response ', str(tracker))
# ,'topic_response': lambda topic: print('printing the topic response ', str(topic))
}


#To access the Trackers API, you will need to specify 'tracker_response' event
trackers = [{
"name": "tracker_name",
"vocabulary": [
"hello",
"vocabulary_2",
"vocabulary_n"
]
}]


insight_types = ['question', 'action_item']

speaker = {
Expand All @@ -18,7 +30,7 @@
}

connection_object = symbl.Streaming.start_connection(
insight_types=insight_types, speaker=speaker)
insight_types=insight_types, speaker=speaker,trackers=trackers)

connection_object.subscribe(events)

Expand Down Expand Up @@ -46,4 +58,8 @@
#print(connection_object.conversation.get_topics())

#To get the questions from the conversation
#print(connection_object.conversation.get_questions())
#print(connection_object.conversation.get_questions())

# To get the analytics from the conversation
#print(connection_object.conversation.get_analytics())

Loading

0 comments on commit 8a7cc5e

Please sign in to comment.