/flect-chime-sdk-demo

Primary LanguageTypeScriptApache License 2.0Apache-2.0

FLECT Chime meeting

This is a video conference system with amazon chime sdk. This software uses AWS as backend. If you have AWS account, it is very easy to deploy. And this software has various features such as fast and accurate virtual backgournd, noise suppression, sounde effect and BGM. And this software has features to assist video conferencing, whiteboard, text chat, recording.

Features

  • integrated with amazon cognito
  • tileview

tileview

  • virtual background
    • BodyPix and GoogleMeet

virtualbackground

whiteboard

  • chat

  • recording

recorder

Experimental Feature (pre-release)

  • Amongus automute and share screen.

image

see detail

Installation

Prerequisite

(1) setup AWS Credential

It is assumed that AWS Credential is configured. If you have not yet done so, please refer to this page to configure it.

https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html

(2) AWS CLI

AWS CLI install

https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-cliv2-linux.html
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-cliv2-windows.html

(3) install node

see nodejs's offical page

If you use debian as a root, below may help.

$ ### install nodejs
$ apt install -y curl
$ curl -sL https://deb.nodesource.com/setup_lts.x | bash -
$ apt install -y nodejs

$ ### install n and upgrade node, npm.
$ npm install -g n
$ n latest
$ npm update -g npm

(4) install docker (optional)

If you want to build HMM (Headless Meeting Manager), you should install docker. HMM run on AWS Fargate which needs docker image. In building process, this docker image is created.

see docker offical page

You can disable HMM, in backend config mentioned later.

Build backend

(1) define stack name

Define the stack name for backend.

$ emacs backend/bin/config.ts

export const BACKEND_STACK_NAME = 'BackendStack' # <-- You should change. (*1)
export const FRONTEND_LOCAL_DEV = false          # <-- Set false for deployment(only for developper).
export const USE_DOCKER = false                   # <-- If you want to build HMM, changet to true(only for developper).

(*1) This demo uses S3 bucket whose name is defined with this value. So, this value should be global unique.

(2) build and deploy backend

(2-1) For linux and mac

$ cd backend
$ npm install
$ npm run build_all

(2-2) For Windows

It is better to use debian on docker or wsl2 and follow (2-1) above. If you really want to use windows, you can use this command. However, it is not guaranteed.

$ cd backend
$ npm install
$ npm run build_all

Build frontend

Note: frontend and fontend2 are depricated. Please use frontend3

(1) build

when you run npm run build, you get the information of backend

(1-1) For linux and mac

$ cd frontend3
$ npm install
$ npm run build

(1-2) For Windows

It is better to use debian on docker or wsl2 and follow (1-1) above. If you really want to use windows, you can use this command. However, it is not guaranteed.

$ cd frontend3
$ npm install
$ npm run build
$ node bin/importBackendSetting.js
$ node script/list_resources.js
$ npx react-scripts build

(2) deploy frontend

(2-1) For linux and mac

$ sh sync.sh

(2-2) For Windows

It is better to use debian on docker or wsl2 and follow (1-1) above. If you really want to use windows, open sync.sh with the notepad and exec the command in the file.

(3) access to the demo

You can find URL of demo in demo_url.txt. Please access this URL with browser.

Delete Stack

At first, delete all data from backet. You can get the bucket name with this command.

$ cd backend
$ cat cfn_outputs.json |grep -e "Bucket"
    "BucketDomainName": "xxxxxxxxxxxx.s3.amazonaws.com",
    "Bucket": "xxxxxxxxxxxxxxxxxxxx",                       <- this is bucket name
    "BucketWebsiteDomainName": "xxxxxxxxxxxxxx.s3-website-us-east-1.amazonaws.com"

Then, execute this command.

$ npx cdk destroy

Warning!!

In this demo, google meet model for virtual background is used. At the time I started develop, the license of the model is APACHE-2.0. But currently the license is changed and not APACHE-2.0 any more. I'm not a lawyer, and I don't know much about it, but I generally believe that license changes do not apply retroactively to previous deliverables. However, you should obtain and(or) use the model at your own risk.

Detail about this is here

Acknowledgement

Resources

  1. Images from https://www.irasutoya.com/
  2. Sounds from https://otologic.jp
  3. movie from https://www.youtube.com/, https://pixabay.com/ja/videos/

Appendix

update cdk

$ sudo npm update -g aws-cdk

tail Log

aws logs tail --follow  API-Gateway-Execution-Logs_gvrxxxx89/prod

memo (Japanese)

ローカルで開発する場合は、Clientから起動してから先にdokcer containerで起動する。 meeting_URLはconsoleから取れる。

backend/lib/manager$ docker build -t hmm .

docker run -p 3000:3000 -v pwd:/work --env MEETING_URL="xxx" --env BUCKET_ARN="xxx" hmm