Closed Th3G33k closed 5 months ago
Thanks for this! 🤗 Could you provide a reference for where this code was adapted from? Another thing which should be updated is that this should work if running from node.js.
Also, it might even be a good idea to wrap the output of these pipelines into a Audio
class, which has a .save(path)
method. This will simplify the usage a lot, and will align well with the RawImage
class.
const synthesizer = await pipeline('text-to-speech', 'Xenova/mms-tts-eng');
const output = await synthesizer('Hello, my dog is cute');
output.save("audio.wav");
Example use :