Skip to content

Commit

Permalink
DC-399 (#476)
Browse files Browse the repository at this point in the history
Adds web sdk documentation
  • Loading branch information
pema-s authored Apr 12, 2022
1 parent 347add3 commit 2f95515
Show file tree
Hide file tree
Showing 7 changed files with 509 additions and 7 deletions.
17 changes: 17 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ import TabItem from '@theme/TabItem';

We continuously add new features and enhancements, fix critical bugs, and regularly deploy changes to improve performance. Keep a tab of our latest updates on this page.

### 12 April 2022

![sdk](/img/sdk-icon.png) <br/>
- **Availability of a new Web SDK package** that allows you to add Symbl’s Conversation Intelligence into your JavaScript application directly into the browser. <br/>
[Read more here](/docs/web-sdk/overview). <br/><br/>
#### Known Issues
- When an empty array is passed for `insightTypes` on `createConnection`, users still get those insights available on “ON” handlers for `questions`, `topics`, `action_items`, `follow_ups`.
- Web SDK does not show any errors when users do not pass or use or send invalid(v4 format) `connectionID` to subscribe to existing stream.
- If a user loses network for 30-40 seconds, the WebSocket connection does not recover with `noConnectionTimeout: 900`.
- If 2nd speaker joins the existing stream and passes the tracker object, Streaming API only returns the trackers that were passed by the original speaker.
- When the WebSocket Connection breaks and when the user switches network change from wifi to mobile hotspot, the connection does not recover.
- Web SDK does not handle Safari browser seamlessly.
- `session_modified` hander is not supported.
- Update Element is working for `Linear16` but not for `OPUS`.


### 14 March 2022

![api update](/img/api-update.png)
Expand Down Expand Up @@ -192,3 +208,4 @@ Availability of parameters with Streaming API for keeping the WebSocket connecti


### [Connect with us on Slack](https://symbldotai.slack.com/join/shared_invite/zt-4sic2s11-D3x496pll8UHSJ89cm78CA#/shared-invite/email) 💬

11 changes: 5 additions & 6 deletions docs/sdk-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Use Symbl's SDKs to directly add Symbl's capabilities onto your web conferencing
&nbsp;

<div class="sdk-card-container">
<a class="sdk-card sdk-card3-bg" href="/docs/web-sdk/overview">
<img class="sdk-card-logo" src={WebSdkLogo}></img>
<h3 class="sdk-card-header">Web SDK</h3>
</a>
<a class="sdk-card sdk-card1-bg" href="/docs/javascript-sdk/introduction">
<img class="sdk-card-logo" src={JavaScriptLogo}></img>
<h3 class="sdk-card-header">JavaScript</h3>
Expand All @@ -31,12 +35,6 @@ Use Symbl's SDKs to directly add Symbl's capabilities onto your web conferencing
<img class="sdk-card-logo" src={PythonLogo}></img>
<h3 class="sdk-card-header">Python</h3>
</a>

<a class="sdk-card sdk-card3-bg" href="https://github.com/symblai/symbl-web-sdk">
<img class="sdk-card-logo" src={WebSdkLogo}></img>
<h3 class="sdk-card-header">Web SDK</h3>
</a>

<a class="sdk-card sdk-card4-bg" href="https://github.com/ranjancse26/symbl-csharp-sdk">
<img class="sdk-card-logo" src={CsharpLogo}></img>
<h3 class="sdk-card-header">C#</h3>
Expand All @@ -51,3 +49,4 @@ Use Symbl's SDKs to directly add Symbl's capabilities onto your web conferencing

---


126 changes: 126 additions & 0 deletions docs/web-sdk/getting_live_transcrips_conversation_intelligence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
id: web-sdk-getting-live-transcripts
title: Getting Live Transcripts and Conversation Intelligence
sidebar_label: Getting Live Transcripts and Conversation Intelligence
slug: /web-sdk/web-sdk-getting-live-transcripts/
pagination_label: Getting Live Transcripts and Conversation Intelligence
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

---

This tutorial provides step-by-step instructions on how to receive live transcripts and Conversation Intelligence such as action items, topics, questions, trackers, and more using the Web SDK.

### Prerequisites

Following are the prerequisites for using the Web SDK:

- **App ID and Secret**: Ensure that you have your API Credentials which are the App ID and App Secret handy. You can get them from the [Symbl Platform](https://platform.symbl.ai/#/login). Alternatively, you can use your access token for authentication as well, see the [Authentication](https://docs.symbl.ai/docs/developer-tools/authentication/) page to learn more.
- **`npm` package manager**: Install the latest version of the `npm` package manager (Version 6.0.0 +).

See the list of web browsers supported in the [Browsers Supported](/docs/web-sdk/overview/#supported-browsers) section.

### Step 1: Install the Web SDK
#### Using npm

Install the Web SDK using npm with the following command:

```shell
npm i @symblai/[email protected]
```
:::note
You must have the latest version of npm package installed. If you don’t have it, run the following commands to get the latest:
```shell
npm install
```
:::

### Step 2: Import and Initialize
You can import the Web SDK in ES5 and ES6 syntax using the following code:

<Tabs
defaultValue="es5"
values={[
{ label: 'ES5', value: 'es5', },
{ label: 'ES6', value: 'es6', },
]
}>

<TabItem value="es5">

```js
var Symbl = require('@symblai/symbl-web-sdk');
var symbl = Symbl({
accesssToken: '<YOUR ACCESS TOKEN>'
});
});
```

</TabItem>

<TabItem value="es6">

```js
import Symbl from '@symblai/symbl-web-sdk';
var symbl = Symbl({
accesssToken: '<YOUR ACCESS TOKEN>'
});

```
</TabItem>
</Tabs>

To initialize the Web SDK, you can pass in an access token generated using [Symbl’s Authentication mechanism](https://docs.symbl.ai/docs/developer-tools/authentication/). Alternatively, you can use the App ID and App Secret from the [Symbl Platform](https://platform.symbl.ai). Using the App ID and App Secret is not meant for production usage, as those are meant be secret.

```js
const symbl = new Symbl(({
appId: '<your App ID>',
appSecret: '<your App Secret>',
// accessToken: '<your Access Token>', // Can be used instead of appId and appSecret
// basePath: '<your custom base path>',// optional
// logLevel: 'debug' // Sets which log level you want to view
});
```
### Step 3: Set Configuration and Start Connection
The code below shows the configuration as well as the Streaming API functions that will enable you to start live connection and receive Conversation Intelligence:
```js
const connectionConfig = {
disconnectOnStopRequest: false,
disconnectOnStopRequestTimeout: 1800,
noConnectionTimeout: 900,
insightTypes: ["follow_up", "action_item"],
config: {
meetingTitle: "Mic Test", // Name for meeting
confidenceThreshold: 0.7, //Minimum confidence score set for the API to consider an insight as valid.
timezoneOffset: 480, // Offset in minutes from UTC
languageCode: "en-US",

encoding: "OPUS",// Also supports LINEAR16
sampleRateHertz: 48000 // Rate of the incoming audio stream. Make sure the correct sample rate is provided for best results
},
trackers: [{
name: "Promotion Mention", // Name of the Tracker
vocabulary: ["We have a special promotion going on", "We have a sale right now on", "offer"] // Words or phrases that should be tracked
}],
speaker: {
userId: "[email protected]", // Unique identifier of the speaker
name: "john"
}
}

const connection = await symbl.createConnection(id) //this creates connection with streaming API

await connection.startProcessing(connectionConfig) //this starts processing
```
#### Configuration Parameters
You can pass any of the following `config` parameters:
Field | Required | Supported value | Default Value | Description
---------- | ------- | ------- | ------- | ------- |
```confidenceThreshold``` | Optional | >=0.5 to <=1.0 | 0.5 | Minimum confidence score that you can set for an API to consider it as valid insight. The minimum confidence score should be in the range >=0.5 to <=1 (greater than or equal to `0.5` and less than or equal to `1.0`.). Default value is `0.5`.
```speechRecognition``` | Optional | | | See Speech Recognition details on the [Speech Recognition](https://docs.symbl.ai/docs/streaming-api/api-reference/#speech-recognition) section.
```meetingTitle``` | Optional | | | The name of the meeting.
For more information, read the [Request Parameters](https://docs.symbl.ai/docs/streaming-api/api-reference/#request-parameters) section of the Streaming API.
Loading

0 comments on commit 2f95515

Please sign in to comment.