{"id":23139044,"url":"https://github.com/circuit/webrtc-bot-example","last_synced_at":"2025-08-17T11:33:27.429Z","repository":{"id":41063523,"uuid":"104285555","full_name":"circuit/webrtc-bot-example","owner":"circuit","description":"Electron-based Bot utilizing the WebRTC capabilities of the Circuit JS SDK","archived":false,"fork":false,"pushed_at":"2022-11-10T17:22:19.000Z","size":71,"stargazers_count":5,"open_issues_count":5,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-11T15:42:31.022Z","etag":null,"topics":["bot","circuit","circuit-sdk","electron","webrtc"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circuit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-21T01:20:36.000Z","updated_at":"2020-07-21T12:13:36.000Z","dependencies_parsed_at":"2022-08-31T16:11:30.352Z","dependency_job_id":null,"html_url":"https://github.com/circuit/webrtc-bot-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fwebrtc-bot-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fwebrtc-bot-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fwebrtc-bot-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fwebrtc-bot-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circuit","download_url":"https://codeload.github.com/circuit/webrtc-bot-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230121628,"owners_count":18176477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","circuit","circuit-sdk","electron","webrtc"],"created_at":"2024-12-17T13:13:09.588Z","updated_at":"2024-12-17T13:13:10.309Z","avatar_url":"https://github.com/circuit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webrtc-bot-example\n\n[Electron](https://electron.atom.io/)-based Bot utilizing the WebRTC capabilities of the [Circuit JS SDK](https://github.com/circuit/circuit-sdk).\n\n\u003e 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.\n\n## Scenarios covered in this example:\n### Greet participants by name when joining a conference\n* Using `callStatus` event listen for participants joining\n* Use [IBM Text to Speech](https://www.ibm.com/watson/services/text-to-speech/) service to generate audio buffer for greeting\n* Use the [AudioContext]((https://developer.mozilla.org/en-US/docs/Web/API/AudioContext)) of the Web Audio API to convert the audio buffer to a MediaStream\n* Use the new [`setAudioVideoStream`](https://circuitsandbox.net/sdk/classes/Client.html#method_setAudioVideoStream) API to transmit the greeting to the conference\n\n### Detect 5s of silence and play an announcement\n* Use `client.getRemoteStreams` and attach remote audio stream to an audio element (could also be done via `call.remoteAudioStream`)\n* Use `client.getLastRtpStats` to get `AudioLevelOutput` statistics to detect 5s of silence\n* Use IBM Text to Speech, Web Audio API and `setAudioVideoStream` to play audio as in scenario above\n\n\n## Getting Started\n\n* [Register an account](https://circuit.github.io/) on circuitsandbox.net (if you didn't yet)\n* [Register a bot](http://circuit.github.io/oauth) on the sandbox (OAuth 2.0 Client Credentials)\n\n### Run the app\n\n```bash\n    git clone https://github.com/circuit/webrtc-bot-example.git\n    cd webrtc-bot-example\n    cp config.json.template config.json\n    // Edit config.json with your credentials\n    npm install\n    npm start // or npm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircuit%2Fwebrtc-bot-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcircuit%2Fwebrtc-bot-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircuit%2Fwebrtc-bot-example/lists"}