I am very new to both cmu sphinx and sourceforge. So please accept my
apology if this question is very basic, and or if I am asking it in a wrong
category.
I recently installed and run pocketsphinx on my virtualbox Ubuntu 14.0, and
seems it is working. I wanted to try the tensorflow version of sphinx. I
followed the steps here:
Traceback (most recent call last):
File "g2p.py", line 41, in <module>
tf.app.flags.DEFINE_float("learning_rate", 0.5, "Learning rate.")
File
"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/flags.py",
line 122, in DEFINE_float
_define_helper(flag_name, default_value, docstring, float)
File
"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/flags.py",
line 58, in _define_helper
type=flagtype)
File "/usr/lib/python2.7/argparse.py", line 1297, in add_argument
return self._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1671, in _add_action
self._optionals._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1498, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1311, in _add_action
self._check_conflict(action)
File "/usr/lib/python2.7/argparse.py", line 1449, in _check_conflict
conflict_handler(action, confl_optionals)
File "/usr/lib/python2.7/argparse.py", line 1456, in
_handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --learning_rate: conflicting option
string(s): --learning_rate</module>
I couldn't find a solution for this and really appreciate a help.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I solved this problem as following:
Since the flag names such as "learning_rate", .... in tensorflow is already defined pre-defined, I simply changed the flag names in the g2p.py code. For example I changed "learning_rate" to "learning_rate_1", and so on for all the flag names. This way, it doesn't give me the argparse.ArgumentError.
Now, I am able to use g2p.py in all --interactive , --decode and --evaluate modes.
Bests
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am very new to both cmu sphinx and sourceforge. So please accept my
apology if this question is very basic, and or if I am asking it in a wrong
category.
I recently installed and run pocketsphinx on my virtualbox Ubuntu 14.0, and
seems it is working. I wanted to try the tensorflow version of sphinx. I
followed the steps here:
https://github.com/cmusphinx/g2p-seq2seq
However, when I run this line
python g2p.py --interactive --model model_folder_path
I get this error message:
Traceback (most recent call last):
File "g2p.py", line 41, in <module>
tf.app.flags.DEFINE_float("learning_rate", 0.5, "Learning rate.")
File
"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/flags.py",
line 122, in DEFINE_float
_define_helper(flag_name, default_value, docstring, float)
File
"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/flags.py",
line 58, in _define_helper
type=flagtype)
File "/usr/lib/python2.7/argparse.py", line 1297, in add_argument
return self._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1671, in _add_action
self._optionals._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1498, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/usr/lib/python2.7/argparse.py", line 1311, in _add_action
self._check_conflict(action)
File "/usr/lib/python2.7/argparse.py", line 1449, in _check_conflict
conflict_handler(action, confl_optionals)
File "/usr/lib/python2.7/argparse.py", line 1456, in
_handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --learning_rate: conflicting option
string(s): --learning_rate</module>
I couldn't find a solution for this and really appreciate a help.
Thanks
This issue has been fixed in master, please pull again from github and try and let us know how it works.
Hi Nickolay,
Thanks for your response. I just saw it.
I solved this problem as following:
Since the flag names such as "learning_rate", .... in tensorflow is already defined pre-defined, I simply changed the flag names in the g2p.py code. For example I changed "learning_rate" to "learning_rate_1", and so on for all the flag names. This way, it doesn't give me the argparse.ArgumentError.
Now, I am able to use g2p.py in all --interactive , --decode and --evaluate modes.
Bests