showing results for - "text to speech in node js"
Samuel
21 Oct 2018
1/*
2    This code comes from Vincent Lab
3    And it has a video version linked here: https://www.youtube.com/watch?v=SfeUTOlaWmk
4*/
5
6// Import dependencies
7const say = require("say");
8
9// Use default system voice and speed
10say.speak("Today will make node speak");
11
12// // Set the speed
13// say.speak("Hello!", "", 0.5);
14
15// Stop the text currently being spoken
16// say.stop();
17
18// Export Voice to file
19// const filename = "hello.wav";
20// say.export("Hello!", "", 0.75, filename, function (err) {
21//     if (err) {
22//         return console.error(err);
23//     }
24
25//     console.log(`Text has been saved to ${filename}`);
26// });