Skip to content

Commit

Permalink
v3.0 web UI (#1126)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 authored Oct 23, 2023
1 parent 1055e0f commit 4574fbb
Show file tree
Hide file tree
Showing 34 changed files with 2,908 additions and 2,776 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/angular-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local Angular SDK
run: yarn && yarn build
working-directory: binding/angular

- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/angular
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/angular-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -42,6 +42,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local Angular SDK
run: yarn && yarn build
working-directory: binding/angular

- name: Install dependencies
run: yarn install

Expand All @@ -68,6 +76,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local Angular SDK
run: yarn && yarn build
working-directory: binding/angular

- name: Install dependencies
run: yarn install

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -46,6 +46,10 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Install dependencies
run: yarn install

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/react-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local React SDK
run: yarn && yarn build
working-directory: binding/react

- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/react
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -38,6 +38,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local React SDK
run: yarn && yarn build
working-directory: binding/react

- name: Install dependencies
run: yarn install

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -46,6 +46,10 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Install dependencies
run: yarn install

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/vue-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local Vue SDK
run: yarn && yarn build
working-directory: binding/vue

- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/vue
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/vue-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -37,6 +37,14 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Build Local Vue SDK
run: yarn && yarn build
working-directory: binding/vue

- name: Install dependencies
run: yarn install

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -46,6 +46,10 @@ jobs:
- name: Pre-build dependencies
run: npm install yarn

- name: Build Local Web SDK
run: yarn && yarn copywasm && yarn copyppn && yarn build
working-directory: binding/web

- name: Install dependencies
run: yarn install

Expand Down
6 changes: 3 additions & 3 deletions binding/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"@angular-eslint/template-parser": "~13.5.0",
"@angular/cli": "~13.3.9",
"@angular/compiler-cli": "~13.3.0",
"@picovoice/porcupine-web": "~2.2.0",
"@picovoice/web-voice-processor": "~4.0.6",
"@types/node": "^12.11.1",
"@picovoice/porcupine-web": "file:../web",
"@picovoice/web-voice-processor": "~4.0.8",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"copy-webpack-plugin": "^11.0.0",
Expand Down
4 changes: 2 additions & 2 deletions binding/angular/projects/porcupine-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@picovoice/porcupine-angular",
"description": "Angular service for Porcupine Web SDK",
"version": "2.2.1",
"version": "3.0.0",
"peerDependencies": {
"@angular/common": ">=13.0.0",
"@angular/core": ">=13.0.0",
Expand All @@ -20,7 +20,7 @@
"author": "Picovoice Inc",
"license": "Apache-2.0",
"dependencies": {
"@picovoice/porcupine-web": "=2.2.1",
"@picovoice/porcupine-web": "file:../../../web",
"tslib": "^2.3.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class PorcupineService implements OnDestroy {

try {
if (!this.porcupine) {
PorcupineWorker.setSdk('angular');
this.porcupine = await PorcupineWorker.create(
accessKey,
keywords,
Expand Down
26 changes: 13 additions & 13 deletions binding/angular/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1783,10 +1783,8 @@
node-addon-api "^3.2.1"
node-gyp-build "^4.3.0"

"@picovoice/porcupine-web@~2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@picovoice/porcupine-web/-/porcupine-web-2.2.0.tgz#d02fe8dc3ef7fd4baa8516dd45703f40c09adc8a"
integrity sha512-Sd6dK0fkNbZ/+XTm05vLN5E6LHHPY4vvHLSzdTF5nKDD52JBtd6g9WKpBjuHmfoF3YxqdyxqjeBFNdLtMFjZsQ==
"@picovoice/porcupine-web@file:../web":
version "3.0.0"
dependencies:
"@picovoice/web-utils" "=1.3.1"

Expand All @@ -1797,10 +1795,12 @@
dependencies:
commander "^9.2.0"

"@picovoice/web-voice-processor@~4.0.6":
version "4.0.6"
resolved "https://registry.yarnpkg.com/@picovoice/web-voice-processor/-/web-voice-processor-4.0.6.tgz#4769283b82f64d3625794f7290d47c6d477a3f41"
integrity sha512-Ykfy6hrWFpOklfeN7rSJb5CGim8wDu7J+l8imRYyQxWHWVV1Wu5S8FW69zkJmwiDG2Wx+M2+h0SCMS+hNM5qow==
"@picovoice/web-voice-processor@~4.0.8":
version "4.0.8"
resolved "https://registry.yarnpkg.com/@picovoice/web-voice-processor/-/web-voice-processor-4.0.8.tgz#95247a5393cac4d16490a53feb0f413c902ee5fa"
integrity sha512-/OSHn8YKniMo0jP5EwGimLOxvLQl/Yx4Hs+LydNmoSu4hfBrDdzhhfhB79118uDiK4aUUKx2A/RAD9TG0mQ/ng==
dependencies:
"@picovoice/web-utils" "=1.3.1"

"@rollup/plugin-json@^4.1.0":
version "4.1.0"
Expand Down Expand Up @@ -1956,16 +1956,16 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.9.tgz#02d013de7058cea16d36168ef2fc653464cfbad4"
integrity sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==

"@types/node@^12.11.1":
version "12.20.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==

"@types/node@^14.14.31":
version "14.18.36"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835"
integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==

"@types/node@^18.11.9":
version "18.18.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.6.tgz#26da694f75cdb057750f49d099da5e3f3824cb3e"
integrity sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==

"@types/parse-json@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
Expand Down
4 changes: 2 additions & 2 deletions binding/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@picovoice/porcupine-react",
"version": "2.2.1",
"version": "3.0.0",
"description": "React component for Porcupine Web SDK",
"entry": "src/index.ts",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"test": "cypress run --component"
},
"dependencies": {
"@picovoice/porcupine-web": "=2.2.1"
"@picovoice/porcupine-web": "file:../web"
},
"devDependencies": {
"@babel/core": "^7.21.3",
Expand Down
1 change: 1 addition & 0 deletions binding/react/src/use_porcupine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const usePorcupine = (): {

try {
if (!porcupineRef.current) {
PorcupineWorker.setSdk('react');
porcupineRef.current = await PorcupineWorker.create(
accessKey,
keywords,
Expand Down
Loading

0 comments on commit 4574fbb

Please sign in to comment.