Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange tensor flow error due to an argument #11

Open
alvaroromerosc opened this issue Mar 21, 2018 · 3 comments

Comments

@alvaroromerosc
Copy link

@alvaroromerosc alvaroromerosc commented Mar 21, 2018

Hello,

First of all, thank you for your effort with the open-source TTS projects.
As summary, I'm trying to create a TTS of Spanish language using your open-source dc_tts.

To do that, I want to train in my laptop the net that you uploaded as "pre-trained net" in order to know if I will be able to train my own network for spanish (once I have the spanish database correctly), but I get an error of tensorflow due to an argument. I have all the libraries correctly installed and the LJ database downloaded.

The only thing that I did was to download the repository, fix correctly the database paths (LJ) and run the train script with parameter "1".

C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Invalid argument: TypeError: a bytes-like object is required, not 'str'

Thank you!

@Sladix

This comment has been minimized.

Copy link

@Sladix Sladix commented Mar 23, 2018

Hello, I'm encountering the same issue !

I'm on Windows 7 working with conda.
The synthetize script worked like a charm on the first try, but I'm still struggling with the same error as @alvaroromerosc .

Edit : Tried to add 'rb' as the codecs.open's mode but it doesn't seems to solve anything...
Edit2 : It seems that the issue is caused because I try to run the script in python 3.6 and this seems to be causing the issue
Edit 3 : Since I'm using windows, I can't run tensorflow with python < 3.5 according to the official tensorflow documentation but I'll try to use conda to see if I manage to get this working. I'm super excited about training this model with various data !

@Sladix

This comment has been minimized.

Copy link

@Sladix Sladix commented Mar 28, 2018

A quick update,

I can't get tensorflow working on windows with python 27, @Kyubyong, could you point me in the right direction to update your code so it would be compatible with python 3.6 ?
Thanks a lot !

@noetits

This comment has been minimized.

Copy link

@noetits noetits commented Jun 5, 2018

Hello,

I had the same issue with linux in python 3.
In my case, it comes from data_load.py (https://github.com/Kyubyong/dc_tts/blob/master/data_load.py)

Following your link that explain the issue, I searched how to convert bytes to string in python 3:
https://stackoverflow.com/questions/606191/convert-bytes-to-a-string

I replaced:
mel = "mels/{}".format(fname.replace("wav", "npy"))
mag = "mags/{}".format(fname.replace("wav", "npy"))

by

mel = "mels/{}".format(fname.decode("utf-8").replace("wav", "npy"))
mag = "mags/{}".format(fname.decode("utf-8").replace("wav", "npy"))

And it seems to work.
(Maybe it would be better to use try: ... except TypeError: ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.