Comments (11)
@FurkanGozukara
I just change the loader in solver.py
i think we need to load two data at same time
so maybe add
x_real_trg, emb_trg, f0_trg, len_trg = next(data_iter)
after line 142,145
now we have two data in one iteration
and i just use the preprocess in demo.ipynb
try to make same shape with this code below
f0_pred = P(uttr_org_pad, f0_trg_onehot)[0]
and use same loss as G
it work but i dont know is it correct or not
from speechsplit.
@FurkanGozukara
due to some reason i cant copy my whole code to you
All change in solver.py class Solver
but
- you need to create F0converter in build_model function
self.P = F0_Converter(self.hparams)
self.p_optimizer = torch.optim.Adam(self.P.parameters(), self.p_lr, [self.beta1, self.beta2], weight_decat = 0.000001)(or whatever you want)
- in reset_grad function you need to add
self.p_optimizer.zero_grad()
- in training loop (inside train function) fix the code be like
try:
x_real_org,emb_org,f0_org,len_org = next(data_iter)
x_real_trg,emb_trg,f0_trg,len_trg = next(data_iter)
except:
data_iter = iter(data_loader)
x_real_org,emb_org,f0_org,len_org = next(data_iter)
x_real_trg,emb_trg,f0_trg,len_trg = next(data_iter)
- preprocess f0_trg based on demo.ipynb (inside train function)
here's my code
f0_list = []
for i in range(f0_trg.shape[0]):
log_f0 = f0_trg[i].cpu().numpy()
flatten_log_f0 = log_f0.flatten()
f0_trg_quantized = quantize_f0_numpy(flatten_log_f0)[0]
f0_trg_onehot = torch.from_numpy(f0_trg_quantized).to(self.device)
f0_list.append(f0_trg_onehot)
f0_trg = torch.stack(f0_list)
- P forward (inside train function)
f0_pred = self.P(x_real_org,f0_trg)
p_loss_id = F.mse_loss(f0_pred,f0_trg,reduction='mean')
- add backward code (inside train function)
from speechsplit.
The training code for P is almost identical to solver.py. You can get it by modifying solver.py based on the description in the paper.
from speechsplit.
train.py or main.py? I only see main.py
from speechsplit.
train.py or main.py? I only see main.py
solver.py
from speechsplit.
I still have no idea how to train f0 converter ...
only need change code in solver.py...?
from speechsplit.
@shubham-IISc @hongyuntw any idea how to solve this problem? Any help appreciated
from speechsplit.
@hongyuntw thank you for answer but i didn't understand what you mean
could you show as whole code?
from speechsplit.
@hongyuntw thank you for answer
could you edit your answer and write top of them the class or method names where should I put them?
could you change this to a full example "self.p_optimizer = xxxx(whatever you want)"
from speechsplit.
@FurkanGozukara
ok done, hope this helps
from speechsplit.
@hongyuntw thank you very much for answer
I am getting error name 'F0_Converter' is not defined
Also what does "add backward code (inside train function)" means?
Here I have uploaded everything to a repository = https://github.com/FurkanGozukara/SpeechSplitTest
from speechsplit.
Related Issues (20)
- Content encoder definition HOT 2
- Obout downsampling implementation. HOT 1
- about Downsample Factor HOT 1
- Training for encoder (i.e. embedding) usage only? HOT 1
- Only works for speakers in the training dataset?
- How to build the validation data? HOT 4
- How to synthesis a speech which I need? HOT 1
- Array error HOT 1
- Question about padding HOT 3
- Could you show me the codes about how to draw the pitch contours picture?
- Is it very slow for the Wavenet vocoder to synthesize a voice HOT 5
- checkpoint_step001000000_ema.pth is missing HOT 1
- The program has an error message: ValueError: high <= 0 HOT 2
- Cuda error HOT 1
- 其他数据集 HOT 5
- 音色迁移的问题 HOT 4
- 关于编码器的问题 HOT 2
- 关于demo.ipynb的一些问题 HOT 5
- 关于训练效果 HOT 1
- Using encoder as speaker embedding extractor 关于使用编码器作为说话人嵌入提取器 HOT 4
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 speechsplit.