{"id":17364681,"url":"https://github.com/tejasq/praise","last_synced_at":"2025-04-15T01:44:38.848Z","repository":{"id":40944415,"uuid":"135816140","full_name":"TejasQ/praise","owner":"TejasQ","description":"Do stuff with your voice in the browser.","archived":false,"fork":false,"pushed_at":"2022-12-09T08:58:55.000Z","size":646,"stargazers_count":13,"open_issues_count":15,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T13:44:41.442Z","etag":null,"topics":["experimental","speech-recognition","web-speech-api"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TejasQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-02T12:33:12.000Z","updated_at":"2023-03-22T12:49:42.000Z","dependencies_parsed_at":"2023-01-25T20:46:30.794Z","dependency_job_id":null,"html_url":"https://github.com/TejasQ/praise","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/TejasQ%2Fpraise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TejasQ%2Fpraise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TejasQ%2Fpraise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TejasQ%2Fpraise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TejasQ","download_url":"https://codeload.github.com/TejasQ/praise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991531,"owners_count":21194893,"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":["experimental","speech-recognition","web-speech-api"],"created_at":"2024-10-15T20:43:20.870Z","updated_at":"2025-04-15T01:44:38.830Z","avatar_url":"https://github.com/TejasQ.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Praise 🙌🏿\n\nPraise is a client-side helper that... well, _helps_ do things using your voice in a browser environment. This project uses the [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API), which is still an experimental browser technology and is only currently supported in [Google Chrome](https://www.google.com/intl/en/chrome/demos/speech.html). Use with discretion. At some point, as the Web Speech specification moves closer to finalization and inclusion, Praise aims to keep up with the changes.\n\n\u003e Disclaimer: the current [SpeechRecognition API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) (part of the Web Speech API) supported in Chrome requires an internet connection and connects to Google's Web Speech service under the hood.\n\n## Motivation\n\nI created this project on a Saturday afternoon in just a few hours in order to demonstrate the welcoming, efficient nature of JavaScript for [my talk at JSConf EU](https://2018.jsconf.eu/speakers/tejas-kumar-from-you-can-t-to-you-can-the-welcoming-nature-of-javascript.html).\n\n## Getting Started\n\nTo get up and running with Praise, it's pretty standard: simply install it with [`yarn`](https://yarnpkg.com/).\n\n- `yarn add praise`\n\n... done.\n\nOf course, you may also use [`npm`](https://www.npmjs.com/) if you are so inclined (`npm i praise --save`).\n\n## Basic Usage\n\nPraise exports a `createPraise` function that returns a `Praise` instance that can be started and stopped at your leisure, in a browser that _can_ and _wants to_ listen. Here's how a simple project can be set up.\n\nBe sure to include the compiled version of this file in a HTML file, using [Parcel](https://parceljs.org/), [Webpack](https://webpack.js.org/), [Poi](https://poi.js.org/) or a similar bundler.\n\n```js\nimport { createPraise } from \"praise\";\n\nconst whenISay = {\n  ooga: () =\u003e alert(\"booga\"),\n  \"am i pretty\": () =\u003e alert(\"the prettiest!\")\n};\n\nconst myPraiseListener = createPraise(whenISay); // for customizing, use createPrase(whenISay, myOptions)\nmyPraiseListener.start();\n```\n\nStarting this app in a browser, and then saying either _\"ooga\"_ or _\"am I pretty\"_ will execute their respective functions. Pretty cool, eh? This allows you to do _literally anything_ that you can do programatically with your voice.\n\n### Options\n\n`createPraise` takes an optional second argument specifying the following configuration options for more fine-grained control. Here are the defaults, when everything is left blank:\n\n```js\n{\n  /** Indicates whether Praise should keep listening or stop listening after the first match. */\n  keepListening: true;\n\n  /** Indicates whether Praise should return results _as you speak_ or after you stop speaking. */\n  onlyWhenIStop: false;\n\n  /** A minimum threshold of confidence for matches. A higher number hear means more accurate, but fewer matches. */\n  confidence: 0.8;\n\n  /** A callback executed on successful execution of a phrase callback that gets the result of the callback for a phrase. */\n  onSuccess: () =\u003e undefined;\n}\n```\n\n## Usage with [React](https://reactjs.org/)\n\nPraise also has React bindings! [react-praise](https://github.com/tejasq/react-praise) can do some nifty things in a React app, like [change presentation slides](https://github.com/tejasq/jsconf-eu-2018-slides) or other things. Feel free to submit Pull Requests that demonstrate your cool idea/use case!\n\n## Contributing\n\nOpen issues and make PRs as you wish.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftejasq%2Fpraise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftejasq%2Fpraise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftejasq%2Fpraise/lists"}