Transformers.js 2.7.0 Adds Text‑to‑Speech Support and Demo Application
The new Transformers.js 2.7.0 release introduces text‑to‑speech capabilities, provides a simple browser demo, explains how to save audio with the wavefile NPM package, offers speaker selection from a large CMU Arctic dataset, and lists additional library updates.
Transformers.js author Joshua Lochner announced version 2.7.0, which adds text‑to‑speech functionality to the library.
Lochner will attend the 6th FEDAY conference remotely on November 18, with the event site at https://fequan.com/2023.
The feature can be used with just a few lines of code; a demonstration video is provided to illustrate the workflow.
Audio output can be saved as a .wav file by importing the wavefile NPM package.
The generated speech can also be played directly in the browser.
If the default speaker’s voice is not preferred, users can choose from over 7,000 speakers in the CMU Arctic dataset (see https://huggingface.co/datasets/Xenova/cmu-arctic-xvectors-extracted/tree/main).
Currently only the speecht5 model is supported for text‑to‑speech, with plans to add models such as Bark and MMS in the future.
A simple demo application has been released; contributions are welcome, and improvements can be shared via Twitter @xenovacom.
Demo link: https://huggingface.co/spaces/Xenova/text-to-speech-client. Source code: https://github.com/xenova/transformers.js/tree/main/examples/text-to-speech-client.
Additional updates include: Falcon tokenizer improvements, more example links, an enhanced example template, updated dependencies, and removal of post‑processing for < and > characters in generated documentation.
Rare Earth Juejin Tech Community
Juejin, a tech community that helps developers grow.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.