say.js icon indicating copy to clipboard operation
say.js copied to clipboard

Can you make it work with webpack?

Open Kuchiriel opened this issue 7 years ago • 2 comments

ERROR in ./node_modules/say/platform/win32.js
Module not found: Error: Can't resolve 'child_process' in '/home/trevor/Projects/Tudo/Code Related/Kia2/frontend-beta/node_modules/say/platform'
 @ ./node_modules/say/platform/win32.js 1:21-45
 @ ./node_modules/say/index.js
 @ ./node_modules/babel-loader/lib!./client/views/ai/index.js
 @ ./client/views/Home.vue
 @ ./client/router/index.js
 @ ./client/app.js
 @ ./client/index.js
 @ multi ./build/dev-client ./client/index.js

ERROR in ./node_modules/say/platform/base.js
Module not found: Error: Can't resolve 'child_process' in '/home/trevor/Projects/Tudo/Code Related/Kia2/frontend-beta/node_modules/say/platform'
 @ ./node_modules/say/platform/base.js 1:21-45
 @ ./node_modules/say/platform/linux.js
 @ ./node_modules/say/index.js
 @ ./node_modules/babel-loader/lib!./client/views/ai/index.js
 @ ./client/views/Home.vue
 @ ./client/router/index.js
 @ ./client/app.js
 @ ./client/index.js
 @ multi ./build/dev-client ./client/index.js

Kuchiriel avatar Jun 13 '18 17:06 Kuchiriel

You want to run this code in a web browser?

Looks like there is a browser API for speech synthesis: https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis

If someone wants to build out a shim for this that would be cool.

tlhunter avatar Jun 19 '18 06:06 tlhunter

This project might be useful, too: https://www.masswerk.at/mespeak/

tlhunter avatar Aug 12 '19 20:08 tlhunter