how to use this model by transformers.js

#1
by tianzhaotong - opened

can u give a example code?

BRICKS org
β€’
edited Apr 15
import { pipeline } from '@xenova/transformers';
import { pinyin } from 'pinyin-pro'; // Our use-case, using `pinyin-pro`

const synthesizer = await pipeline('text-to-audio', 'BricksDisplay/vits-cmn', { quantized: false })
console.log(await synthesizer(pinyin('ζ–‡ε­—')))
// {
//   audio: Float32Array(?) [ ... ],
//   sampling_rate: 16000
// }
BRICKS org

Note: Transformers.js (ONNX) version does not support speaker_id, so it will fixed in 0

hans00 changed discussion status to closed

Sign up or log in to comment