bugfix
This commit is contained in:
parent
330d3cd077
commit
fa1e38952f
19
README.md
19
README.md
@ -1,4 +1,23 @@
|
||||
# TTS小模型
|
||||
我们创建一个webserver, 参考[这里](https://huggingface.com/nari-labs/dia-1.6b)提供的安装和代码
|
||||
```
|
||||
import soundfile as sf
|
||||
from dia.model import Dia
|
||||
|
||||
model = Dia.from_pretrained("nari-labs/Dia-1.6B")
|
||||
text = "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face."
|
||||
output = model.generate(text)
|
||||
sf.write("simple.mp3", output, 44100)
|
||||
```
|
||||
上述代码有三个问题
|
||||
|
||||
1. output的类型是np.int64,不被audio格式支持
|
||||
|
||||
2. sf.write不支持mp3格式,需要换成wav
|
||||
|
||||
3. 生成的wav文件没有语音
|
||||
|
||||
目前1,2,问题解决,第三个问题依然存在
|
||||
|
||||
## 依赖
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user