mozilla / DeepSpeech

DeepSpeech is an open source embedded (offline, on-device) speech-to-text engine which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

print(ds.stt(audio)) UnicodeEncodeError: 'utf-8' codec can't encode characters in position 558-559: surrogates not allowed

dindaya opened this issue · comments

Hi I am using deepspeech trained models "deepspeech-0.9.3-models-zh-CN.pbmm" and "deepspeech-0.9.3-models-zh-CN.scorer" for Mandarin inference in Ubuntu 18.04. It is working but for some audio files it is giving below error.

Error:
"print(ds.stt(audio))
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 558-559: surrogates not allowed"

I am not able to correct this error, any support will be helpful.

Regards,
Naval

For support and discussions, please use our Discourse forums.

If you've found a bug, or have a feature request, then please create an issue with the following information:

  • Have I written custom code (as opposed to running examples on an unmodified clone of the repository):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • TensorFlow installed from (our builds, or upstream TensorFlow):
  • TensorFlow version (use command below):
  • Python version:
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version:
  • GPU model and memory:
  • Exact command to reproduce:

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Please describe the problem clearly. Be sure to convey here why it's a bug or a feature request.

Include any logs or source code that would be helpful to diagnose the problem. For larger logs, link to a Gist, not a screenshot. If including tracebacks, please include the full traceback. Try to provide a reproducible test case.

For support and discussions, please use our Discourse forums.

commented

so how to fix it? I can't find any questions identical to this one. I come to this problem when performing the inference.