Code Monkey home page Code Monkey logo

Comments (17)

40740 avatar 40740 commented on July 21, 2024

我尝试读了代码,因为对python非常不熟悉,基本上很难处理。

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

1.不同的语言需要模型支持,比如使用方言需要该模型是用方言数据训练的。如果你使用的是粤语模型但还是发生这个错误,那可能是我的bug,可以发给我研究一下。
2.需要看看你发送的ssml以及vits-simple-api的报错,从post报错来看很难找到问题。
3.npy文件存储的是numpy数组,理论上来说可以将多个npy文件合并为一个,实现将新的情感数据追加到原npy中,也比较方便。

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

1.粤语用的是https://huggingface.co/spaces/skytnt/moe-tts 这个的model14 有粤语,大佬可以试试。
2.smml是这样的:

smm='<speak lang="zh" format="wav" length="1.2" model="w2v2-vits"><voice id="0" emotion="1">这几天心里颇不宁静。</voice></speak>'

2.1.vits-simple-api 好像没
3.这样的话,在操作上如果想多加一个情绪,要先追加到原npy,多了一步,哈哈哈相对上麻烦了,毕竟都想偷懒一下。(戳手手)

另外,我用的快速部署包,不知道是不是因为一键包没同步最新的代码问题。

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

这样的话我之后加个能同时加载不同npy的方法吧。快速部署包里的是旧代码,需要手动更新代码。

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

我尝试使用了仓库里的saved_model/17,发现是我忘记添加chinese_dialect_cleaners的判断所致,现已修复 e72da74
同时加载不同npy现在也支持了 af26b22

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

哇,神仙老大,辛苦了。orz 感谢付出。 SMMLL 那个我还没测出来,我用最新代码需要安装环境,卡在fasttext 一直安装不上,在和chatgpt 找解决方法。 老大也可以试试 SMMLL 最新代码是不是可行。

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

我本地是可以用ssml的,fasttext快速部署包里也装了,如果你是想自己装的话我在文档里也写了Windows安装fasttext的方法

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

同一个模型和配置文件,但是加载多个npy报错,用之前单个就可以,
image

Traceback (most recent call last):
  File "D:\ai\vits\api\app.py", line 28, in <module>
    tts = merge_model(app.config["MODEL_LIST"])
  File "D:\ai\vits\api\utils\merge.py", line 96, in merge_model
    obj = vits(model=i[0], config=i[1], model_=i[2])
  File "D:\ai\vits\api\voice.py", line 54, in __init__
    self.load_model(model, model_)
  File "D:\ai\vits\api\voice.py", line 69, in load_model
    self.emotion_reference = np.append(self.emotion_reference, tmp, axis=0)
  File "<__array_function__ internals>", line 180, in append
  File "C:\Users\lin85\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\lib\function_base.py", line 5444, in append
    return concatenate((arr, values), axis=axis)
  File "<__array_function__ internals>", line 180, in concatenate
ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 2 dimension(s) and the array at index 1 has 1 dimension(s)

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

是npy维度的问题,可以把这个npy文件发给我看看吗

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

bigshuaige.zip
修改后缀即可

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

是npy维度的问题,可以把这个npy文件发给我看吗

不过是同一样npy文件,用[]就不能加载,去掉就可以加载。

感觉可以和MoeGoe那样后加载npy文件,这样就不用list了,哦,不过那样ssml 好像就有点麻烦了。哈哈哈

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

改好了,只有一个情感维度的npy默认是列向量,转成行向量就可以了 4fd9173
尽量是提前把npy文件生成好再去加载,这样调用api会比较方便。本来还可以通过上传参考音频来调节情感,但是想到每次调用都要上传文件就太不方便所以阉割掉了 🤣

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

MoeGoe

MoeGoe就是有这两个功能哈哈哈,所以哈哈哈。

对了,我用方言测试了,还是不行,会直接把[GD][SH] 读出来,还是普通话。

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

看下日志

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] finish in 2.98s
INFO:werkzeug:127.0.0.1 - - [19/May/2023 17:33:10] "GET /voice/w2v2-vits?text=[GD]小美来到小帅的公司[GD]&id=0 HTTP/1.1" 200 -
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] finish in 2.82s
INFO:werkzeug:127.0.0.1 - - [19/May/2023 17:33:13] "GET /voice/w2v2-vits?text=[GD]小美来到小帅的公司[GD]&id=0 HTTP/1.1" 200 -
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] id:0 format:wav lang:AUTO length:1.0 noise:0.33 noisew:0.4 emotion:0
INFO:vits-simple-api:[w2v2] len:17 text:[GD]小美来到小帅的公司[GD]
DEBUG:vits-simple-api:[[ZH]GD]小美来到小帅的公司[GD][ZH]
INFO:vits-simple-api:[w2v2] finish in 8.45s

from vits-simple-api.

Artrajz avatar Artrajz commented on July 21, 2024

方言不支持自动识别,因为都是中文汉字没法区分😢,所以要指定lang=gd
如果是输入的文本本身就带[GD],可以用lang=mix

from vits-simple-api.

40740 avatar 40740 commented on July 21, 2024

方言不支持自动识别,因为都是中文汉字没法区分😢,所以要指定lang=gd 如果是输入的文本本身就带[GD],可以用lang=mix

ok 了 是我没操作对,感谢感谢

from vits-simple-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.