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

Decoding error #28

Closed
couragelfyang opened this issue Dec 18, 2019 · 2 comments
Closed

Decoding error #28

couragelfyang opened this issue Dec 18, 2019 · 2 comments

Comments

@couragelfyang
Copy link

Traceback (most recent call last):
    File "../../src/bin/recognize.py", line 69, in <module>
        recognize(args)
    File "../../src/bin/recognize.py", line 58, in recognize
        nbest_hyps = model.recognize(input, input_length, char_list, args)
    File "/home/tt/Speech-Transformer/src/transformer/transformer.py", line 46, in recognize
        args)
    File "/home/tt/Speech-Transformer/src/transformer/decode.py", line 222, in recognize_beam
        for x in hyp['yes'][0, 1:]]))
UnicodeEncodeError: 'ascii' codec can't encode character '\u751a' in position 6: ordinal not in range(128)

Any solution?

@neulqz
Copy link

neulqz commented Dec 18, 2019

I got the same error when i run script "run.sh",then I solve it by adding the following in run.sh ,hope it can help you .

export PYTHONIOENCODING=utf-8
if [ ${stage} -le 4 ]; then
echo "stage 4: Decoding"
......

@couragelfyang
Copy link
Author

@neulqz Yes, it works. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants