cmusphinx / g2p-seq2seq

G2P with Tensorflow
Other
670 stars 194 forks source link

TypeError: Expected binary or unicode string, got None #111

Closed cbsandeep10 closed 6 years ago

cbsandeep10 commented 6 years ago

I am getting this error while running interactive mode on cmudict model. tensor2tensor (1.6.0) tensorflow-gpu (1.5.0) cuda - 9.0 python - 3.5.2 g2p-seq2seq - pullled the latest from master branch

g2p-seq2seq --model_dir g2p-seq2seq-cmudict --interactive

Traceback (most recent call last): File "/usr/local/bin/g2p-seq2seq", line 9, in load_entry_point('g2p-seq2seq==6.1.1a0', 'console_scripts', 'g2p-seq2seq')() File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/app.py", line 105, in main g2p_model = G2PModel(params, file_path, is_training=False) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p.py", line 61, in init self.params.model_dir, file_path=file_path, is_training=is_training) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p_problem.py", line 62, in init vocab_filename) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 178, in load_create_vocabs vocab_list = build_vocab_list(data_path) File "/usr/local/lib/python3.5/dist-packages/g2p_seq2seq-6.1.1a0-py3.5.egg/g2p_seq2seq/g2p_encoder.py", line 160, in build_vocab_list for line in data_file: File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 214, in next return self.next() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 208, in next retval = self.readline() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 177, in readline self._preread_check() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 79, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 65, in as_bytes (bytes_or_text,))

nurtas-m commented 6 years ago

Probably, this error was occurred because you run "--interactive" mode before training the model. So, there are no previously trained model in "g2p-seq2seq-cmudict" directory. Check it, please. In new commit I added info message for model not found error.

cbsandeep10 commented 6 years ago

I am pretty sure there is model in the folder. I had downloaded the model from https://sourceforge.net/projects/cmusphinx/files/G2P%20Models/g2p-seq2seq-cmudict.tar.gz/download.

nurtas-m commented 6 years ago

Ok, I see. The problem is that the model from the link is outdated. I will add new pre-trained model by day's end.

cbsandeep10 commented 6 years ago

Thanks nurtas.

naok commented 6 years ago

Hello @nurtas-m I am having the same issue. Is the new model coming? Thanks in advance.