Instructions to use BricksDisplay/vits-cmn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use BricksDisplay/vits-cmn with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'BricksDisplay/vits-cmn');
Update README.md
Browse files
README.md
CHANGED
|
@@ -41,3 +41,17 @@ with torch.no_grad():
|
|
| 41 |
from IPython.display import Audio
|
| 42 |
Audio(output.audio[0], rate=16000)
|
| 43 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
from IPython.display import Audio
|
| 42 |
Audio(output.audio[0], rate=16000)
|
| 43 |
```
|
| 44 |
+
|
| 45 |
+
Using this checkpoint from Transformers.js:
|
| 46 |
+
|
| 47 |
+
```js
|
| 48 |
+
import { pipeline } from '@xenova/transformers';
|
| 49 |
+
import { pinyin } from 'pinyin-pro'; // Our use-case, using `pinyin-pro`
|
| 50 |
+
|
| 51 |
+
const synthesizer = await pipeline('text-to-audio', 'BricksDisplay/vits-cmn', { quantized: false })
|
| 52 |
+
console.log(await synthesizer(pinyin("中文")))
|
| 53 |
+
// {
|
| 54 |
+
// audio: Float32Array(?) [ ... ],
|
| 55 |
+
// sampling_rate: 16000
|
| 56 |
+
// }
|
| 57 |
+
```
|