Comments (5)
alignment.py
from fastspeech.
I'm sorry to reply you so late.
from fastspeech.
您好,谢谢您的实现以及回复,对我很有帮助.
但关于alignment.py中的get_D函数我还有一些问题
def get_D(alignment):
D = np.array([0 for _ in range(np.shape(alignment)[1])])
for i in range(np.shape(alignment)[0]):
max_index = alignment[i].tolist().index(alignment[i].max())
D[max_index] = D[max_index] + 1
for i in range(np.shape(D)[0]):
if D[i] > 0:
D[i] = D[i] - 1
return D
其中为什么需要以下的步骤?
for i in range(np.shape(D)[0]):
if D[i] > 0:
D[i] = D[i] - 1
我加上这一步之后,sum(D)=S-T(S and T are the lengths of the ground-truth spectrograms and phonemes),我对原文的理解应该是sum(D)=S.
希望您有空可以帮忙解答一下疑惑,谢谢!
from fastspeech.
不好意思,现在才看到。
那段代码具体的意思是
首先alignment的第二维是字符的长度,
for i in range(np.shape(alignment)[0]):
max_index = alignment[i].tolist().index(alignment[i].max())
D[max_index] = D[max_index] + 1
为的是找到每个mel列中对应的最大的字符的index
D就是一个长度为字符数的计数器
for i in range(np.shape(D)[0]):
if D[i] > 0:
D[i] = D[i] - 1
上面这一步的目的是为了将所有计数减一,并防止0变成负一,因为在之后的代码中,计数为1的字符实际上会扩充成2个,所以需要减一。
from fastspeech.
好的,了解了,非常感谢!
from fastspeech.
Related Issues (20)
- Is this still maintained?
- training stops in few seconds and no checkpoint file created HOT 3
- error in new commit HOT 9
- How to get alignment? HOT 8
- Preprocess.py got stuck: Tried to debug
- Have anyone tried using LSTM to replace FFT block?
- What is the difference between postnet and CBHG? HOT 3
- 请问训练多久得到的pretrain model呢?然后,请问使用了多少GPU呢? HOT 1
- Resume training from checkpoint result in NaN? HOT 1
- How to extract alignment from tacotron2? HOT 6
- long int 转换成float erro
- denoiser HOT 1
- some question about squeezewave denoiser
- onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from fastwave.onnx failed:Type Error: Type parameter (T) bound to different types (tensor(double) and tensor(float) in node ().
- Expected object of backend CUDA but got backend CPU for argument #3 'index' HOT 1
- duration loss calulated in log domain or linear domain
- wav in chinese HOT 1
- Error when training new model for another language
- BUG:OSError: sndfile library not found HOT 1
- RuntimeError: stack expects each tensor to be equal size, but got [40, 240] at entry 0 and [78, 202] at entry 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastspeech.