Skip to content

New version #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 129 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
250e7d2
New Web SDK files.
Feb 25, 2022
9fc2f91
Push up more tests.
Feb 26, 2022
0f51861
Add more tests.
Mar 1, 2022
be65b2f
Add tests for audio stream.
Mar 2, 2022
5844b1e
Clean up tests, add more skeleton classes.
Mar 4, 2022
65edaa1
Add types - start implementation.
Mar 5, 2022
5925153
Start on implementation.
Mar 9, 2022
2f52ecc
Add unit tests for attachAudioDevice method.
Mar 9, 2022
dd807b0
unit test minor fix
moona3k Mar 9, 2022
ddcbedd
Add logger.
Mar 9, 2022
6c2ea90
Flesh out implementation, add more tests.
Mar 10, 2022
8a5d886
Add more passing unit tests.
Mar 10, 2022
d6044e6
Updates & fixs
moona3k Mar 11, 2022
d92b4cc
Add OpusAudioStream tests.
Mar 11, 2022
4bc37b1
Fix compilation, add ConnectionFactory tests.
Mar 11, 2022
b51cadf
Add more unit tests.
Mar 11, 2022
39ad6e5
Add tests for streaming api connection.
Mar 11, 2022
a6e4da2
Fix StreamingAPI tests.
Mar 12, 2022
7d09ced
Add mocks for createAndStartNewConectionn tests.
Mar 13, 2022
fd0a0b7
updates to streaming api validateConfig
moona3k Mar 14, 2022
9133f01
Add more tests.
Mar 14, 2022
8752358
Cleanup: Linting
stokes-christopher Mar 14, 2022
47ef237
validateConfig logic update
moona3k Mar 14, 2022
bb7b5a9
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
moona3k Mar 14, 2022
36c5f42
more updates
moona3k Mar 14, 2022
6eb678d
Cleanup: Linted File
stokes-christopher Mar 14, 2022
2958dd9
Cleanup: Linted File
stokes-christopher Mar 14, 2022
f8c6bbe
Fix symbl tests.
Mar 14, 2022
b0a720c
Add validation config tests.
Mar 14, 2022
eec6bce
negative test scenarios
moona3k Mar 15, 2022
520c4c3
Flesh out StreamingAPIConnection tests.
Mar 15, 2022
0e2560f
Fix test syntax.
Mar 15, 2022
937505c
Push up more comprehensive tests.
Mar 15, 2022
41bcbba
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Mar 15, 2022
7b804ad
Cleanup: ESLint cleanup
stokes-christopher Mar 15, 2022
339a190
Add audio processing logic.
Mar 15, 2022
89b80bd
Add audio processing logic.
Mar 15, 2022
1d0e485
Cleanup: change eslint rule to warn on complexity
stokes-christopher Mar 15, 2022
243bcb0
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Mar 15, 2022
7617c53
Cleanup: Linting continues
stokes-christopher Mar 15, 2022
a8fad97
Cleanup: ESLint changes
stokes-christopher Mar 15, 2022
c4609af
Feature: Add network connectivity check
stokes-christopher Mar 15, 2022
73518ab
Update: add NetworkEvent
stokes-christopher Mar 15, 2022
b032c5b
Cleanup: linting
stokes-christopher Mar 15, 2022
cc0e363
Update: add "offline" eventtype
stokes-christopher Mar 15, 2022
2d1d424
invalid config tests
moona3k Mar 16, 2022
9cdec66
Move everything to src.
Mar 16, 2022
db717ba
Fix tests.
Mar 16, 2022
6efc9e3
Cleanup: linting and comment placement
stokes-christopher Mar 16, 2022
6dec95c
Cleanup: linting and comment placement
stokes-christopher Mar 16, 2022
c6d61a3
Fix: password regex allow hyphen
stokes-christopher Mar 16, 2022
15ef260
Various changes.
Mar 16, 2022
2c61a10
Fix Opus audio stream.
Mar 16, 2022
d0c0eb9
Fix opus audio stream.
Mar 16, 2022
d0ef02f
Update: max valid connId value to 64
stokes-christopher Mar 16, 2022
b60f96e
Update: Add basic tests for connID regex
stokes-christopher Mar 16, 2022
adddffb
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Mar 16, 2022
2ed7b6b
Update: add regex tests
stokes-christopher Mar 17, 2022
44ba37c
Cleanup: linting
stokes-christopher Mar 17, 2022
e7f56ce
Cleanup: linting
stokes-christopher Mar 17, 2022
7249c29
Update: add test for wrong character
stokes-christopher Mar 17, 2022
91840f5
Cleanup: linting and comment placement
stokes-christopher Mar 17, 2022
f2eef54
Fix on syntax.
Mar 17, 2022
14d9b64
Feature: unit type test in wait
stokes-christopher Mar 17, 2022
a13a03f
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Mar 17, 2022
8ac5c76
Fix SubscribeAPIConnection issue.
Mar 17, 2022
c9defb2
Cleanup: remove old tests
stokes-christopher Mar 18, 2022
4ef4463
Update: Failing Streaming Tests
stokes-christopher Mar 18, 2022
4d77256
Update needed: Failed Tests
stokes-christopher Mar 22, 2022
e3f74f4
Update: uniqueness regex test
stokes-christopher Mar 25, 2022
4a530f2
Change createConnection interface, add AudioStream factory.
Mar 25, 2022
92a6a7d
Test Fix: update ConnectionFactory test with new params
stokes-christopher Mar 25, 2022
77352a1
Fix startProcessing tests.
Mar 25, 2022
0e1a63d
Update: ConnectionFactory tests audioStream
stokes-christopher Mar 25, 2022
3ec018e
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Mar 25, 2022
fb3bb92
Fix some tests.
Mar 26, 2022
2d025a8
Update: Linting and JSDocs
stokes-christopher Mar 28, 2022
d2f98a2
Update: tests no longer referencing config
stokes-christopher Mar 28, 2022
a2ce294
Update: JSDoc for registerAudioStreamCallback
stokes-christopher Mar 28, 2022
4b4a733
Update: JSDocs and linting changes
stokes-christopher Mar 28, 2022
2899b35
Fix various tests.
Mar 30, 2022
d8e5ce5
Fix compilation.
Mar 30, 2022
f5b6a85
Fix LINEAR16 tests.
Mar 30, 2022
4809c6b
Fix ondevicechange logic.
Mar 31, 2022
f9ed6eb
Update: JSDocs starting
stokes-christopher Mar 31, 2022
9a085ed
Fix: Function using await needs to be async
stokes-christopher Mar 31, 2022
8873c67
Update: JSDocs + linting
stokes-christopher Mar 31, 2022
93dbfef
Update: Linting + JSDoc
stokes-christopher Mar 31, 2022
b9cee10
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
cb30417
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
f5aa35d
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
c37578e
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
f447439
Update: linting
stokes-christopher Mar 31, 2022
9f78b8e
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
1d7df76
Update: lint+JSDocs networkconnectivity
stokes-christopher Mar 31, 2022
6527309
Update: linting
stokes-christopher Mar 31, 2022
773afe6
Update: linting+JSDocs Symbl
stokes-christopher Mar 31, 2022
7296b6e
Update: linting + JSDocs
stokes-christopher Mar 31, 2022
2aecaf1
Update: JSDocs class variables
stokes-christopher Mar 31, 2022
f76791f
Fix: type issues
stokes-christopher Mar 31, 2022
4f1e860
Fix context closing issue.
Apr 1, 2022
8c975f0
Update: save token in symbl init
stokes-christopher Apr 4, 2022
89f19d4
Fix: wrong type on token
stokes-christopher Apr 4, 2022
6f1add6
Update: saving accesstoken after authentication in constructor
stokes-christopher Apr 4, 2022
1475f87
Update: changes to js-sdk and authentication
stokes-christopher Apr 5, 2022
45e5350
Update: Setting oauth2 basics in constructor
stokes-christopher Apr 5, 2022
469e219
Update: only update oauth2 if token/id provided
stokes-christopher Apr 5, 2022
80d1ab3
Remove build files.
Apr 5, 2022
197c6c8
Update: linting tests
stokes-christopher Apr 5, 2022
46f0795
Merge branch 'new-version' of https://github.com/symblai/symbl-web-sd…
stokes-christopher Apr 5, 2022
47397f2
Cleanup: remove redundancy
stokes-christopher Apr 5, 2022
8e18d99
Fix audio source element logic.
Apr 5, 2022
9363ccc
ATM | added few more tests for initi function (#23)
atmnks Apr 6, 2022
7a21ca3
Cleanup: linting
stokes-christopher Apr 6, 2022
4ade69d
Cleanup: linting and sonarcloud fixes
stokes-christopher Apr 6, 2022
16db0b2
Cleanup: sonarcloud+linting
stokes-christopher Apr 6, 2022
c5079ff
Cleanup: linting
stokes-christopher Apr 6, 2022
71ed1df
Cleanup: linting
stokes-christopher Apr 6, 2022
9b83a26
Cleanup: linting
stokes-christopher Apr 6, 2022
598783e
Cleanup: linting
stokes-christopher Apr 6, 2022
a4b74ab
Fix audio element issue.
Apr 7, 2022
a393141
Fix issue with events not firing.
Apr 8, 2022
bd892a5
Add network logic back in.
Apr 11, 2022
f62274a
Try getting exact device first.
Apr 11, 2022
060b0c5
Lint files.
Apr 11, 2022
c18bb21
Cleanup: remove redundant undefined
stokes-christopher Apr 11, 2022
1d175f0
Cleanup: remove unused imports
stokes-christopher Apr 11, 2022
0c7374d
Update version.
Apr 12, 2022
9a5e05b
Bug fix.
Apr 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
**/*.test.ts
**/*.test.ts
src/old/*
src/types/*
24 changes: 13 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-implicit-any": "off",
"accessor-pairs": "error",
"array-bracket-newline": "error",
"array-bracket-spacing": "error",
Expand All @@ -36,14 +38,14 @@
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"complexity": "error",
"complexity": "warn",
"computed-property-spacing": "error",
"consistent-return": "error",
"consistent-this": "error",
"curly": "error",
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"default-param-last": "off",
"dot-location": "error",
"dot-notation": "error",
"eol-last": "error",
Expand Down Expand Up @@ -96,7 +98,7 @@
"no-div-regex": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-empty-function": "off",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
Expand Down Expand Up @@ -130,7 +132,7 @@
"no-new-wrappers": "error",
"no-nonoctal-decimal-escape": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-param-reassign": "off",
"no-plusplus": "error",
"no-promise-executor-return": "error",
"no-proto": "error",
Expand All @@ -147,12 +149,12 @@
"no-shadow": "error",
"no-tabs": "error",
"no-template-curly-in-string": "error",
"no-ternary": "error",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-undefined": "error",
"no-underscore-dangle": "error",
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable-loop": "error",
Expand Down Expand Up @@ -183,27 +185,27 @@
"padding-line-between-statements": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-destructuring": "off",
"prefer-exponentiation-operator": "error",
"prefer-named-capture-group": "error",
"prefer-named-capture-group": "off",
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-spread": "off",
"prefer-template": "error",
"quote-props": "error",
"quotes": "error",
"radix": "error",
"require-atomic-updates": "error",
"require-await": "error",
"require-unicode-regexp": "error",
"require-unicode-regexp": "off",
"rest-spread-spacing": "error",
"semi": "error",
"semi-spacing": "error",
"semi-style": "error",
"sort-imports": "error",
"sort-imports": "off",
"sort-keys": "error",
"sort-vars": "error",
"space-before-blocks": "error",
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/validate-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Validate build

on: push

jobs:
validate_build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]

steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install

- name: Run ESLint
run: npm run lint

- name: Run tests
run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
examples

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const connectionConfig = {
const stream = await symbl.createStream(connectionConfig);

// Send the start request
await stream.start(stream);
await symbl.start(stream);
})();

```
Expand Down Expand Up @@ -260,7 +260,7 @@ const connectionConfig = {
const stream = await symbl.createStream(connectionConfig);

// Send the start request
await stream.start(stream);
await symbl.start(stream);
})();
```

Expand All @@ -282,7 +282,7 @@ As a simple test of the Streaming API you can simply setup a live microphone and

Initialize the SDK and connect via the built-in websocket connector. This will output the live transcription to the console.

NOTE: The `symbl.startRealtimeRequest` function creates a new AudioContext, so the call must be made on user interaction, such as a button click.
NOTE: The `symbl.createStream` function creates a new AudioContext, so the call must be made on user interaction, such as a button click.

```js
symbl.init({
Expand Down Expand Up @@ -343,7 +343,8 @@ const connectionConfig = {
};

(async () => {
const connection = await symbl.startRealtimeRequest(connectionConfig);
const stream = await symbl.createStream(connectionConfig);
await symbl.start(stream);
})();
```

Expand All @@ -357,8 +358,8 @@ A quick snippet on how to use the mute method.

```js
(async () => {
const connection = await symbl.startRealtimeRequest(connectionConfig);
await symbl.mute(connection);
const stream = await symbl.createStream(connectionConfig);
await symbl.mute(stream);
})();

```
Expand All @@ -369,8 +370,8 @@ A quick snippet on how to use the unmute method.

```js
(async () => {
const connection = await symbl.startRealtimeRequest(connectionConfig);
await symbl.unmute(connection);
const stream = await symbl.createStream(connectionConfig);
await symbl.unmute(stream);
})();

```
Expand Down Expand Up @@ -431,7 +432,8 @@ const connectionConfig = {
};

(async () => {
const connection = await symbl.startRealtimeRequest(connectionConfig);
const stream = await symbl.createStream(connectionConfig);
await symbl.start(stream);
})();
```

Expand Down
23 changes: 15 additions & 8 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
import type {Config} from '@jest/types';

// Sync object
const config: Config.InitialOptions = {
verbose: true,

export default {
// All imported modules in your tests should be mocked automatically
// automock: false,

Expand Down Expand Up @@ -60,7 +60,13 @@ export default {
// globalTeardown: undefined,

// A set of global variables that need to be available in all test environments
// globals: {},
// globals: {
// 'ts-jest': {
// diagnostics: {
// ignoreCodes: [2304],
// },
// },
// },

// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
Expand Down Expand Up @@ -93,7 +99,7 @@ export default {
// notifyMode: "failure-change",

// A preset that is used as a base for Jest's configuration
// preset: undefined,
preset: 'ts-jest',

// Run tests from one or more projects
// projects: undefined,
Expand Down Expand Up @@ -125,7 +131,7 @@ export default {
// runner: "jest-runner",

// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],
setupFiles: ["./tests/setupTests.ts"],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],
Expand Down Expand Up @@ -192,3 +198,4 @@ export default {
// Whether to use watchman for file crawling
// watchman: true,
};
export default config;
Loading