Comments (22)
It’s missing some params.
Here’s an example using the pretrained model in a folder named /model, a file named test_lists that contains the text you want to convert to speech, and an output folder for the wave files/graphs.
python3 synthesis.py --hparams="builder=deepvoice3,preset=deepvoice3_ljspeech" model/20171213_deepvoice3_checkpoint_step000210000.pth test_lists.txt tests
from deepvoice3_pytorch.
I wasn't expecting to synthesize an audio file just yet.
The command you sent me also doesn't work, but for a different reason. Here's the error log I got. I created a test_lists.txt file with text to synthesize on each line.
Traceback (most recent call last):
File "synthesis.py", line 137, in
model, text, p=replace_pronunciation_prob, speaker_id=speaker_id, fast=True)
File "synthesis.py", line 66, in tts
sequence, text_positions=text_positions, speaker_ids=speaker_ids)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "D:\Projects\TTS-Tacotron\deepvoice3_pytorch-master\deepvoice3_pytorch_init_.py", line 79, in forward
text_positions, frame_positions, input_lengths)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "D:\Projects\TTS-Tacotron\deepvoice3_pytorch-master\deepvoice3_pytorch_init_.py", line 116, in forward
text_sequences, lengths=input_lengths, speaker_embed=speaker_embed)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "D:\Projects\TTS-Tacotron\deepvoice3_pytorch-master\deepvoice3_pytorch\deepvoice3.py", line 75, in forward
x = self.embed_tokens(text_sequences)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn\modules\sparse.py", line 103, in forward
self.scale_grad_by_freq, self.sparse
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\nn_functions\thnn\sparse.py", line 59, in forward
output = torch.index_select(weight, 0, indices.view(-1))
TypeError: torch.index_select received an invalid combination of arguments - got (torch.cuda.FloatTensor, int, torch.cuda.IntTensor), but expected (torch.cuda.FloatTensor source, int dim, torch.cuda.LongTensor index)
and here's the test_list.txt file:
howdy ho ready i am doctor
what is it what is it not the bees not the bees
I'm a vampire
I'm like a prickly pear
I'm a prickly pear
What the fuck is this shit
from deepvoice3_pytorch.
That's strange. Did you change the frontend in hparams?
Lines 10 to 12 in 9ed2214
from deepvoice3_pytorch.
The frontend is the same as what is written on your comment. should it be different?
from deepvoice3_pytorch.
It should be en
if you are using LJSpeech. Can you try the following code and see if it works?
In [1]: import deepvoice3_pytorch
In [2]: from deepvoice3_pytorch.frontend import en
In [3]: en.n_vocab
Out[3]: 149
In [4]: deepvoice3_pytorch.__version__
Out[4]: '0.0.3+446039d'
from deepvoice3_pytorch.
If it works,
Line 884 in 9ed2214
None
...from deepvoice3_pytorch.
I previously commented out "from .version import version" in "deepvoice3_pytorch/init.py" file because python kept returning an import error (module not found). I think that might have something to do with it. I was unable to run the forth command on the python terminal (deepvoice3_pytorch.version) but was able to run everything else from it. Where is the deepvoice3_pytorch.version package?
For my copy of the code, _frontend was defined as None in line 65 and defined later as "frontend = getattr(frontend, hparams.frontend)" in line 876. Should I try getting the latest version of the code?
from deepvoice3_pytorch.
Okay, the problem is that you didn't install the package. Please follow the installation guide. https://github.com/r9y9/deepvoice3_pytorch#installation. version.py
will be generated durning installation. I'd recommend the latest version, but pip install deepvoice3_pytorch
should work as well.
from deepvoice3_pytorch.
I tried both methods, but I'm getting an ambiguous error. Part of the problem is that I'm using Windows, and there were several hurdles involved because of it. Do you know what this might mean?
Obtaining file:///D:/Projects/TTS-Tacotron/deepvoice3_pytorch-master
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "D:\Projects\TTS-Tacotron\deepvoice3_pytorch-master\setup.py", line 19, in
['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\subprocess.py", line 316, in check_output
**kwargs).stdout
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\subprocess.py", line 383, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\subprocess.py", line 676, in init
restore_signals, start_new_session)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\subprocess.py", line 957, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
from deepvoice3_pytorch.
I fixed the particular problem, thank you. However, I'd recommend Linux unless you are sure you can solve the problems yourself. Some dependencies also have problems on WIndows. (r9y9/nnmnkwii#66, MattShannon/bandmat#6).
If you want to continue work on Windows, you might try the following commands:
conda install cython
pip install git+https://github.com/r9y9/bandmat@ci
pip install git+https://github.com/r9y9/nnmnkwii
pip install git+https://github.com/r9y9/deepvoice3_pytorch
I believe this should work on Windows. I mean, no errors happen at install time.
from deepvoice3_pytorch.
Thank you for the fix. I am now able to run training on windows, but have yet to synthesize anything due to the same bug mentioned above. I'm going to look over this tomorrow. I suspect that the solution is not something that's too complicated. I'll let you know if I continue experiencing problems.
from deepvoice3_pytorch.
I'm not sure PyTorch is supported on WIndows. As far as I can tell from the error message,
TypeError: torch.index_select received an invalid combination of arguments - got (torch.cuda.FloatTensor, int, torch.cuda.IntTensor), but expected (torch.cuda.FloatTensor source, int dim, torch.cuda.LongTensor index)
There's IntTensor somewhere, though LongTensor is expected. I suspect you are on 32-bit system? We may have to convert some tensors to type LongTensor explicitly. i.e., tensor = tensor.long()
.
from deepvoice3_pytorch.
The machine is 64 bit. If anything, I believe one of the packages are causing 32bit to run. Might be bandmat because I was having some trouble installing it on my computer.
from deepvoice3_pytorch.
Training doesn't seem to work either. The logs folder only has events.out.tfevents files and failed because of memory error.
Los event path: log/run-test2018-02-05_06-21-18.233857
819it [07:58, 1.34it/s]
Loss: 0.5317149023287754
819it [07:57, 1.34it/s]
Loss: 0.3216093134166848
819it [07:57, 1.34it/s]
Loss: 0.28948061595760716
819it [07:55, 1.34it/s]
Loss: 0.27628320753938257
819it [07:55, 1.34it/s]
Loss: 0.2665114902933293
36it [00:21, 1.53it/s]Traceback (most recent call last):
File "train.py", line 939, in
train_seq2seq=train_seq2seq, train_postnet=train_postnet)
File "train.py", line 576, in train
in tqdm(enumerate(data_loader)):
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\tqdm_tqdm.py", line 833, in iter
for obj in iterable:
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\utils\data\dataloader.py", line 210, in next
return self._process_next_batch(batch)
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\utils\data\dataloader.py", line 230, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
MemoryError: Traceback (most recent call last):
File "C:\Users\mwc2018\Anaconda3\envs\tensorflow\lib\site-packages\torch\utils\data\dataloader.py", line 42, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "D:\Projects\TTS-Tacotron\deepvoice3_pytorch-master\train.py", line 320, in collate_fn
dtype=np.float32)
MemoryError
from deepvoice3_pytorch.
I think I have figured out the problem.
In synthesis.py,
Find the line
sequence = Variable(torch.from_numpy(sequence)).unsqueeze(0)
and replace it with
sequence = Variable(torch.from_numpy(sequence)).unsqueeze(0).long()
from deepvoice3_pytorch.
@amilamad I don't think it's related to the issue. What are you trying to solve?
from deepvoice3_pytorch.
Im talking about the,
TypeError: torch.index_select received an invalid combination of arguments - got (torch.cuda.FloatTensor, int, torch.cuda.IntTensor), but expected (torch.cuda.FloatTensor source, int dim, torch.cuda.LongTensor index)
issue.
I got the same issue with the LJ data branch and master. After
sequence = Variable(torch.from_numpy(sequence)).unsqueeze(0).long()
it generated voice output for given text with good qulaity on windows.
And thanks for this open source project. I have tried few ML based tts projects and this gives me very good results. :)
from deepvoice3_pytorch.
@amilamad Nice! That looks good to me. Would you like to create a PR?
from deepvoice3_pytorch.
@r9y9 Sure, I will
from deepvoice3_pytorch.
Hopefully windows-specific issues with bandmat should now be fixed.
from deepvoice3_pytorch.
I'm closing this issue. Feel free to reopen if you still see the issue.
from deepvoice3_pytorch.
Hi! I meet the same problem about "AttributeError: 'NoneType' object has no attribute 'text_to_sequence'" Could you help me?@johnbie @r9y9
from deepvoice3_pytorch.
Related Issues (20)
- Key for all speaker_id's
- Slow down speaking rate?
- Samples cutting out early
- Using deprecated Tensorflow 1. HOT 1
- About audio parameters settings
- pre trained model works but goes crazy on some sentences which are a bit long
- DeepVoice3 multi-speaker TTS en demo.ipynb fixes HOT 2
- Problem with lws package HOT 2
- Error while loading the model HOT 1
- Deep voice multi-speaker on Colab has pip install torch==0.3.1 error
- Deep voice 3 multi speaker on Colab - failed building wheel for lws HOT 1
- Unknown hyperparameter type for use_preset HOT 2
- Dataset not available at link
- voice tone
- n_vocab AttributeError
- Installation nightmare
- train.py problem HOT 2
- 'SinusoidalEncoding' object has no attribute '_backend' HOT 1
- Both Sample Colab Notebooks No Longer Work HOT 2
- [CONTRIBUTION] Speech Dataset Generator
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 deepvoice3_pytorch.