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 |
+
```
|