Code Monkey home page Code Monkey logo

webrtc-bot-example's Introduction

webrtc-bot-example

Electron-based Bot utilizing the WebRTC capabilities of the Circuit JS SDK.

Electron is based on node.js and Chromium and is therefore able to utilize the Circuit JS WebRTC APIs unlike a regular node.js app.

Scenarios covered in this example:

Greet participants by name when joining a conference

  • Using callStatus event listen for participants joining
  • Use IBM Text to Speech service to generate audio buffer for greeting
  • Use the AudioContext of the Web Audio API to convert the audio buffer to a MediaStream
  • Use the new setAudioVideoStream API to transmit the greeting to the conference

Detect 5s of silence and play an announcement

  • Use client.getRemoteStreams and attach remote audio stream to an audio element (could also be done via call.remoteAudioStream)
  • Use client.getLastRtpStats to get AudioLevelOutput statistics to detect 5s of silence
  • Use IBM Text to Speech, Web Audio API and setAudioVideoStream to play audio as in scenario above

Getting Started

Run the app

    git clone https://github.com/circuit/webrtc-bot-example.git
    cd webrtc-bot-example
    cp config.json.template config.json
    // Edit config.json with your credentials
    npm install
    npm start // or npm run dev

webrtc-bot-example's People

Contributors

dependabot[bot] avatar richardfazzio avatar rogeru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.