Comments (11)
For Python2/3 compatibility, I recommend you to use flake8/hacking linter.
$ pip install hacking
$ flake8 . | grep "incompatible"
./src/utils/filt.py:23:17: H233 Python 3.x incompatible use of print operator
./src/utils/filt.py:25:17: H233 Python 3.x incompatible use of print operator
./src/utils/text2token.py:52:9: H233 Python 3.x incompatible use of print operator
./src/utils/text2token.py:87:9: H233 Python 3.x incompatible use of print operator
./egs/voxforge/asr1/local/filter_text.py:22:13: H233 Python 3.x incompatible use of print operator
./egs/voxforge/asr1/local/make_trans.py:20:5: H233 Python 3.x incompatible use of print operator
./egs/voxforge/asr1/local/make_trans.py:49:5: H233 Python 3.x incompatible use of print operator
./egs/csj/asr1/local/csj_rm_tag.py:25:9: H233 Python 3.x incompatible use of print operator
./egs/csj/asr1/local/csj_rm_tag.py:26:9: H233 Python 3.x incompatible use of print operator
from espnet.
@ShigekiKarita Thank you for your information.
I think at least we should add following lines to be compatible with python 3
.
from __future__ import print_function
from __future__ import division
from espnet.
In my opinion, there are no need to make scripts in src/utils
python2/3 compatible because they are single-file-complete and only depend on python2 standard lib. Even they do not need venv.
So I propose that we just use a shebang #!/usr/bin/env python2
instead of #!/usr/bin/env python
until python2 dies. I've done some exps successful with PR #20
from espnet.
I found that the Unicode issue is affected by LC_ALL=C
in path.sh
, which causes issues even we use Python 3. we need some investigation.
from espnet.
could you share a snippet of LC_ALL affected one ? maybe we can avoid it by unsetting within python
import locale
locale.setlocale(locale.LC_ALL, '')
from espnet.
Is it possible to have a readme file with the changes necessary to the master when someone want to use espnet using python 3?
I believe the recommended version to use is python 2.7?
from espnet.
Thanks, I will add it. Our travis CI actually checks both python 2.7 and 3.6 , and basic parts should be OK, but I don't fully test both cases.
from espnet.
@kan-bayashi, I think you're using python 3, right? Do you have any issues now?
from espnet.
I'm also using python3. I have known some issues like
- if kaldi installs python2 under tools (it can be happen when your python is 3), path.sh prefer kaldiโs python
- makefile has some hard coded lines like venv/lib/python2.7
- some utill scripts still have
#!/usr/bin/env python
but it should be#!/usr/bin/env python2
because it is not compatible to python3 and do not use third party modules.
from espnet.
TravisCI should use tools/Makefile to setup but kaldi is a problem. It took too long time to install and there is no test requires kaldi when I setup the CI. I think Makefile
should skip the kaldi build under the CI somehow.
I think many users do not compile kaldi everytime , they might put a link in tools/kaldi or install via conda
from espnet.
@ShigekiKarita you are correct. I also use a link to my Kaldi installation under the tools folder.
from espnet.
Related Issues (20)
- Changes that requires to be made while using wav2vec2.0(CLSRIL-23.pt) features for training CTC/Attention based training HOT 6
- Error when training VITS model for vctk dataset HOT 3
- No such parameter e_branchformer_ctc in encoder parameter HOT 3
- X-vector based TTS model packaging broken in tts.sh HOT 1
- USES `ref_channel` usage HOT 4
- Question regarding switching speakers, weights during runtime.
- Question about asr2.sh and its options to reproduce the librispeech_100 recipe. HOT 5
- An error when using LoRA for s3prl frontend. HOT 1
- TSE with Librimix: mismatch in number of speakers HOT 4
- Streaming ASR model latency issue HOT 6
- asr_train.py: error: unrecognized arguments: use_lora HOT 1
- Espnet Collect stats: s3prl Upstream 'hubert-large-ll60k' HOT 5
- How to use 960h LM? HOT 1
- about dc_crn training HOT 1
- Cannot retrieve the public link of the file when running espnet_tts_demo
- [ERROR] The torch version has been changed. Please report to espnet administrators make: *** [Makefile:203: fairscale.done] Error 1
- [ERROR] The torch version has been changed. Please report to espnet administrators make: *** [Makefile:203: fairscale.done] Error 1
- Which class or python script is used for training the linear preencoder used in the config file used during an ASR task which uses representations from XLSR-128 model??
- How to use whisper as frontend?
- Does conformer support batch_size > 1 in ASR task inference? HOT 1
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 espnet.