{"id":13624601,"url":"https://github.com/mtttmpl/speak-js","last_synced_at":"2025-04-16T00:32:49.417Z","repository":{"id":2843980,"uuid":"3847618","full_name":"mtttmpl/speak-js","owner":"mtttmpl","description":"Text-to-Speech in JavaScript","archived":false,"fork":false,"pushed_at":"2018-01-09T16:17:48.000Z","size":557,"stargazers_count":276,"open_issues_count":0,"forks_count":37,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-08-04T00:04:41.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chadsmith/node-liftmaster","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtttmpl.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-27T19:23:25.000Z","updated_at":"2024-08-01T00:45:56.000Z","dependencies_parsed_at":"2022-09-17T14:41:03.896Z","dependency_job_id":null,"html_url":"https://github.com/mtttmpl/speak-js","commit_stats":null,"previous_names":["mattytemple/speak-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtttmpl%2Fspeak-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtttmpl%2Fspeak-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtttmpl%2Fspeak-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtttmpl%2Fspeak-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtttmpl","download_url":"https://codeload.github.com/mtttmpl/speak-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691692,"owners_count":17186863,"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":[],"created_at":"2024-08-01T21:01:44.148Z","updated_at":"2024-11-08T13:30:49.001Z","avatar_url":"https://github.com/mtttmpl.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"speak.js\n========\n\nA port of the eSpeak speech synthesizer from C++ to JavaScript using Emscripten.\n\nEnables text-to-speech on the web using only JavaScript and HTML5.\n\nView a working demo at [http://projects.mattytemple.com/speak-js/](http://projects.mattytemple.com/speak-js/ \"Demo\").\n\nUsage\n-----\n\nVery simple! Do this:\n\n * Include the script in your html header,\n \n```html\n\u003cscript src=\"speakClient.js\"\u003e\u003c/script\u003e\n```\n\n   (and make sure you have speakClient.js available, as well as\n   speakWorker.js and speakGenerator.js)\n\n * Add a div with an audio element called 'audio' in your html body,\n\n```html\n\u003cdiv id=\"audio\"\u003e\u003c/div\u003e\n```\n\n * Call speak() to say stuff in JavaScript\n\n```javascript\nspeak('hello world!')\n```\n\nOptions\n-------\n\nYou can also specify some options with calling speak(), by doing\n\n```javascript\nspeak('hello world', { option1: value1, option2: value2 .. })\n```\n\navailable options are:\n\n * amplitude: How loud the voice will be (default: 100)\n * pitch: The voice pitch (default: 50)\n * speed: The speed at which to talk (words per minute) (default: 175)\n * voice: Which voice to use (for a non-default voice, requires you to\n          build speak.js to include the proper data. See Language Support\n          below) (default: en/en-us)\n * wordgap: Additional gap between words in 10 ms units (default: 0)\n * noWorker: Do not use a web worker (see below in 'Architecture')\n\nFor example\n\n```javascript\nspeak('hello world', { pitch: 100 })\n```\n\nwill talk in a very high-pitched voice.\n\nArchitecture\n------------\n\nspeakClient.js is the file that you interact with. It defines speak(), and\nwill load speakWorker.js in a web worker. speakWorker wraps around\nspeakGenerator.js, which does the actual work of converting a string into\na WAV file. The WAV data is returned to speak(), which then plays it in\nan HTML Audio element.\n\nYou can also use speak.js without a web worker. In that case, you don't\nneed speakWorker.js, but you do need to load speakGenerator.js along\nwith speakClient.js in your HTML page. speak(), if called with noWorker\nset to true in the options object, will directly call the WAV generation\ncode in speakGenerator.js instead of forwarding the call to a worker\nwhich would have done the same.\n\nLanguage Support\n----------------\n\neSpeak supports multiple languages so speak.js can too. To do this, you\nneed to build a custom version of speak.js:\n\nYou then need to call speak() with the `voice` option that tells it to use the\nright voice for your language. For example, for French this should work:\n\n```javascript\nspeak('boulanger', { voice: 'fr' })\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtttmpl%2Fspeak-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtttmpl%2Fspeak-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtttmpl%2Fspeak-js/lists"}