Marak / say.js

TTS (text to speech) for node.js. send text from node.js to your speakers.

Repository from Github https://github.comMarak/say.jsRepository from Github https://github.comMarak/say.js

Can you make it work with webpack?

Kuchiriel opened this issue · 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

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.

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