hans00 commited on
Commit
94a7184
1 Parent(s): 7b9818b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -0
README.md CHANGED
@@ -7,3 +7,25 @@ base_model: Jackellie/ellie-Bert-VITS2
7
  ---
8
 
9
  Taiwan accent TTS model from JackEllie.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
 
9
  Taiwan accent TTS model from JackEllie.
10
+
11
+ ## Usage
12
+
13
+ Using this checkpoint from Hugging Face Transformers:
14
+
15
+ ```python
16
+ from transformers import AutoModel, AutoProcessor
17
+ from scipy.io.wavfile import write
18
+ import torch
19
+
20
+ model_name = "BricksDisplay/ellie-Bert-VITS2"
21
+
22
+ model = AutoModel.from_pretrained(model_name, trust_remote=True)
23
+ processor = AutoProcessor.from_pretrained(model_name, trust_remote=True)
24
+
25
+ with torch.no_grad():
26
+ inputs = processor("你好", language="zh", return_tensors="pt")
27
+ result = model(**inputs)
28
+ result = result["waveform"]
29
+ write("output.wav", model.config.sampling_rate, result[0].numpy())
30
+
31
+ ```