Text-to-speech

wfloat/wfloat-tts

    Use this model

    Install

    npm install @wfloat/wfloat-web

    Text to speech

    import { loadTextToSpeech } from '@wfloat/wfloat-web';
    const model = await loadTextToSpeech('wfloat/wfloat-tts');
    const generation = model.generate('Hello, how are you?');
    const result = await generation.result();
    console.log(result.audio.samples, result.audio.sampleRate);
    generation.dispose();
    await model.unload();

    Text to speech reference · Downloads and cleanup